Fix setting Panel2MinSize min width bug (#666)

This commit is contained in:
Mbucari 2023-07-10 09:10:58 -06:00
parent 156349c293
commit f85462ffec
2 changed files with 4 additions and 5 deletions

View File

@ -4,7 +4,6 @@ using LibationFileManager;
using LibationUiBase.GridView; using LibationUiBase.GridView;
using LibationWinForms.ProcessQueue; using LibationWinForms.ProcessQueue;
using System; using System;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Windows.Forms; using System.Windows.Forms;
@ -12,15 +11,14 @@ namespace LibationWinForms
{ {
public partial class Form1 public partial class Form1
{ {
int WidthChange = 0; int WidthChange = 0;
private void Configure_ProcessQueue() private void Configure_ProcessQueue()
{ {
processBookQueue1.popoutBtn.Click += ProcessBookQueue1_PopOut; 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; WidthChange = splitContainer1.Panel2.Width + splitContainer1.SplitterWidth;
int width = this.Width; int width = this.Width;
var coppalseState = Configuration.Instance.GetNonString(defaultValue: false, nameof(splitContainer1.Panel2Collapsed));
SetQueueCollapseState(coppalseState); SetQueueCollapseState(coppalseState);
this.Width = width; this.Width = width;
} }

View File

@ -14,7 +14,8 @@ namespace LibationWinForms
public Form1() public Form1()
{ {
InitializeComponent(); InitializeComponent();
//Set this size before restoring form size and position
splitContainer1.Panel2MinSize = this.DpiScale(350);
this.RestoreSizeAndLocation(Configuration.Instance); this.RestoreSizeAndLocation(Configuration.Instance);
this.FormClosing += (_, _) => this.SaveSizeAndLocation(Configuration.Instance); this.FormClosing += (_, _) => this.SaveSizeAndLocation(Configuration.Instance);