From 5b2499900f26f20fa1d500a2e75abb24d63fbd1b Mon Sep 17 00:00:00 2001 From: niklascfw Date: Sat, 14 Nov 2026 13:16:21 +0100 Subject: [PATCH] Desktop installer: show release channel in its own group box Same style as the other radio groups, placed below the drive selection. --- desktop/OmniNX.DesktopInstaller/MainForm.cs | 53 ++++++++++----------- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/desktop/OmniNX.DesktopInstaller/MainForm.cs b/desktop/OmniNX.DesktopInstaller/MainForm.cs index d8dd9b2..e623b23 100644 --- a/desktop/OmniNX.DesktopInstaller/MainForm.cs +++ b/desktop/OmniNX.DesktopInstaller/MainForm.cs @@ -54,7 +54,7 @@ public sealed class MainForm : Form { Dock = DockStyle.Fill, ColumnCount = 1, - RowCount = 8, + RowCount = 9, Padding = new Padding(12), }; root.RowStyles.Add(new RowStyle(SizeType.AutoSize)); @@ -64,16 +64,18 @@ public sealed class MainForm : Form root.RowStyles.Add(new RowStyle(SizeType.AutoSize)); root.RowStyles.Add(new RowStyle(SizeType.AutoSize)); root.RowStyles.Add(new RowStyle(SizeType.AutoSize)); + root.RowStyles.Add(new RowStyle(SizeType.AutoSize)); root.RowStyles.Add(new RowStyle(SizeType.Percent, 100)); root.Controls.Add(BuildHeaderPanel(), 0, 0); root.Controls.Add(BuildDrivePanel(), 0, 1); - root.Controls.Add(BuildVariantPanel(), 0, 2); - root.Controls.Add(BuildRamPanel(), 0, 3); - root.Controls.Add(BuildHekatePanel(), 0, 4); - root.Controls.Add(BuildOptionsPanel(), 0, 5); - root.Controls.Add(BuildActionPanel(), 0, 6); - root.Controls.Add(BuildLogPanel(), 0, 7); + root.Controls.Add(BuildChannelPanel(), 0, 2); + root.Controls.Add(BuildVariantPanel(), 0, 3); + root.Controls.Add(BuildRamPanel(), 0, 4); + root.Controls.Add(BuildHekatePanel(), 0, 5); + root.Controls.Add(BuildOptionsPanel(), 0, 6); + root.Controls.Add(BuildActionPanel(), 0, 7); + root.Controls.Add(BuildLogPanel(), 0, 8); Controls.Add(root); } @@ -85,11 +87,10 @@ public sealed class MainForm : Form AutoSize = true, Dock = DockStyle.Fill, ColumnCount = 1, - RowCount = 3, + RowCount = 2, }; panel.RowStyles.Add(new RowStyle(SizeType.AutoSize)); panel.RowStyles.Add(new RowStyle(SizeType.AutoSize)); - panel.RowStyles.Add(new RowStyle(SizeType.AutoSize)); var title = new Label { @@ -120,27 +121,25 @@ public sealed class MainForm : Form releaseRow.Controls.Add(_releaseLabel); releaseRow.Controls.Add(_checkReleaseButton); - // Release channel: stable releases or the master build (internal testing) - _channelRelease = new RadioButton { Text = "Release", AutoSize = true, Checked = true, Margin = new Padding(0, 0, 16, 0) }; - _channelMaster = new RadioButton { Text = "Master (Instabil)", AutoSize = true, ForeColor = Color.DarkOrange }; + panel.Controls.Add(title, 0, 0); + panel.Controls.Add(releaseRow, 0, 1); + return panel; + } + + // Release channel: stable releases or the master build (internal testing) + private Control BuildChannelPanel() + { + var group = new GroupBox { Text = "Release Channel", Dock = DockStyle.Fill, AutoSize = true, Padding = new Padding(10) }; + var flow = new FlowLayoutPanel { Dock = DockStyle.Fill, AutoSize = true }; + + _channelRelease = new RadioButton { Text = "Release", AutoSize = true, Checked = true, Margin = new Padding(0, 0, 24, 0) }; + _channelMaster = new RadioButton { Text = "Master (Instabil)", AutoSize = true }; _channelRelease.CheckedChanged += OnChannelChanged; _channelMaster.CheckedChanged += OnChannelChanged; - var channelRow = new FlowLayoutPanel - { - AutoSize = true, - WrapContents = false, - Dock = DockStyle.Fill, - Margin = new Padding(0, 0, 0, 4), - }; - channelRow.Controls.Add(new Label { Text = "Channel:", AutoSize = true, Anchor = AnchorStyles.Left, Margin = new Padding(0, 3, 8, 0) }); - channelRow.Controls.Add(_channelRelease); - channelRow.Controls.Add(_channelMaster); - - panel.Controls.Add(title, 0, 0); - panel.Controls.Add(releaseRow, 0, 1); - panel.Controls.Add(channelRow, 0, 2); - return panel; + flow.Controls.AddRange([_channelRelease, _channelMaster]); + group.Controls.Add(flow); + return group; } private ReleaseChannel SelectedChannel =>