Fix overflowing/clipped UI text and give buttons a consistent flat style

Instruction and status labels used AutoSize/fixed widths with no wrap
constraint, so long Italian paragraphs and network paths ran past the
window edge or got clipped instead of wrapping. Report dialogs had
fixed-height labels that clipped multi-line text. ProgressForm's folder
label could overflow its non-resizable dialog.

- Labels now wrap responsively (TableLayoutPanel column at 100% + Dock=Top)
  instead of a fixed pixel cap, so they reflow when the window is resized.
- Report dialog labels switched from fixed Height to AutoSize.
- ProgressForm's folder label truncates with ellipsis + tooltip, matching
  the existing pattern used by the import status label.
- Added ApplicationHighDpiMode=PerMonitorV2 to fix control proportions on
  scaled displays.
- Added UiStile.cs: shared flat button style (primary/secondary), rounded
  corners for the wizard nav buttons, and AutoSize+padding on all buttons
  so button size always matches its text (fixes text getting clipped when
  a hardcoded Size was too narrow for the label).
- Fase 5's drag&drop .asm list now fills available vertical space instead
  of a fixed 680x160 box.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
davideandClaude Sonnet 5 committed 2026-09-21 10:40:32 +02:00
1 parent 6511d58b01
commit ba18d682f3
8 files changed
+166 -64

No files matched your search

+9 -1
View File
@@ -8,6 +8,7 @@ public sealed class ProgressForm : Form
private readonly Label _lblDettaglio = new();
private readonly Label _lblEta = new();
private readonly Button _btnAnnulla = new();
private readonly ToolTip _tipCartella = new();
public event EventHandler? Annullato;
@@ -23,7 +24,12 @@ public sealed class ProgressForm : Form
_lblCartella.Text = "Preparazione...";
_lblCartella.Location = new Point(16, 16);
_lblCartella.AutoSize = true;
// AutoSize=false + AutoEllipsis: un percorso lungo (share di rete) va troncato con "..."
// invece di sforare il bordo del dialog, che è FixedDialog e non si può allargare.
// Il testo completo resta disponibile nel tooltip (stesso pattern di Form1._lblImportStatus).
_lblCartella.AutoSize = false;
_lblCartella.AutoEllipsis = true;
_lblCartella.Size = new Size(428, 20);
_lblCartella.Font = new Font(Font, FontStyle.Bold);
_progressBar.Location = new Point(16, 44);
@@ -46,6 +52,7 @@ public sealed class ProgressForm : Form
_btnAnnulla.Text = "Annulla";
_btnAnnulla.Location = new Point(354, 152);
_btnAnnulla.Size = new Size(90, 28);
UiStile.Secondario(_btnAnnulla);
_btnAnnulla.Click += (_, e) => Annullato?.Invoke(this, e);
Controls.AddRange(new Control[]
@@ -57,6 +64,7 @@ public sealed class ProgressForm : Form
public void Aggiorna(ScanProgress p)
{
_lblCartella.Text = $"Scansione {p.Cartella}...";
_tipCartella.SetToolTip(_lblCartella, _lblCartella.Text);
if (p.PrevistiTotali > 0)
{