fix(desktop): keep Cut-off Settings button visible beside the checkbox

The automatic scrap cut-offs checkbox's dynamic text (spacing and tail
length) could grow wide enough to push the adjacent Cut-off Settings
button past the side panel's edge. Wrap the checkbox text and stack
the button below it instead of beside it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
ajandClaude Sonnet 5 committed 2026-10-15 21:12:18 -04:00
1 parent 04c9f748f9
commit f99ba97b28
1 file changed
+8 -2
+8 -2
View File
@@ -58,7 +58,7 @@ internal sealed class CuttingInspectionPanel : UserControl
private readonly Button previousButton = new() { Text = "Previous", AutoSize = true };
private readonly Button nextButton = new() { Text = "Next", AutoSize = true };
private readonly CheckBox keepOrderCheckBox = new() { Text = "Keep current part order", AutoSize = true };
private readonly CheckBox autoCutOffsCheckBox = new() { AutoSize = true };
private readonly CheckBox autoCutOffsCheckBox = new() { AutoSize = true, MaximumSize = new Size(440, 0) };
private readonly FlowLayoutPanel existingWorkBanner = new()
{
AutoSize = true,
@@ -148,7 +148,13 @@ internal sealed class CuttingInspectionPanel : UserControl
units = editor.Nest.Units;
cutOffOptions = lastCutOffOptions.TryGetValue(units, out var last) ? Copy(last) : DefaultCutOffOptions(units);
ShowCutOffOptions();
var cutOffRow = new FlowLayoutPanel { AutoSize = true, WrapContents = false, Margin = Padding.Empty };
var cutOffRow = new FlowLayoutPanel
{
AutoSize = true,
FlowDirection = FlowDirection.TopDown,
WrapContents = false,
Margin = Padding.Empty
};
cutOffRow.Controls.AddRange([autoCutOffsCheckBox, cutOffSettingsButton]);
existingWorkLabel.Font = new Font(Font, FontStyle.Bold);
existingWorkBanner.Controls.AddRange([existingWorkLabel, clearExistingButton]);