From f85462ffeca939c58d6947ea06b7df1db5cb819a Mon Sep 17 00:00:00 2001 From: Mbucari Date: Mon, 10 Jul 2023 09:10:58 -0600 Subject: [PATCH] Fix setting Panel2MinSize min width bug (#666) --- Source/LibationWinForms/Form1.ProcessQueue.cs | 6 ++---- Source/LibationWinForms/Form1.cs | 3 ++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Source/LibationWinForms/Form1.ProcessQueue.cs b/Source/LibationWinForms/Form1.ProcessQueue.cs index 0b984354..ab9c1147 100644 --- a/Source/LibationWinForms/Form1.ProcessQueue.cs +++ b/Source/LibationWinForms/Form1.ProcessQueue.cs @@ -4,7 +4,6 @@ using LibationFileManager; using LibationUiBase.GridView; using LibationWinForms.ProcessQueue; using System; -using System.Collections.Generic; using System.Linq; using System.Windows.Forms; @@ -12,15 +11,14 @@ namespace LibationWinForms { public partial class Form1 { - int WidthChange = 0; private void Configure_ProcessQueue() { processBookQueue1.popoutBtn.Click += ProcessBookQueue1_PopOut; - splitContainer1.Panel2MinSize = this.DpiScale(350); - var coppalseState = Configuration.Instance.GetNonString(defaultValue: false, nameof(splitContainer1.Panel2Collapsed)); + WidthChange = splitContainer1.Panel2.Width + splitContainer1.SplitterWidth; int width = this.Width; + var coppalseState = Configuration.Instance.GetNonString(defaultValue: false, nameof(splitContainer1.Panel2Collapsed)); SetQueueCollapseState(coppalseState); this.Width = width; } diff --git a/Source/LibationWinForms/Form1.cs b/Source/LibationWinForms/Form1.cs index 45eecf66..b7031136 100644 --- a/Source/LibationWinForms/Form1.cs +++ b/Source/LibationWinForms/Form1.cs @@ -14,7 +14,8 @@ namespace LibationWinForms public Form1() { InitializeComponent(); - + //Set this size before restoring form size and position + splitContainer1.Panel2MinSize = this.DpiScale(350); this.RestoreSizeAndLocation(Configuration.Instance); this.FormClosing += (_, _) => this.SaveSizeAndLocation(Configuration.Instance);