mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-20 07:19:18 +01:00
Merge pull request #113 from MihaelaStoica/CA-139888
CA-139888: Changing window size should not change the number of items mi...
This commit is contained in:
commit
fdbfbb3453
@ -114,13 +114,14 @@ namespace XenAdmin.Controls.MainWindowControls
|
||||
|
||||
protected override void OnResize(EventArgs e)
|
||||
{
|
||||
int panel2Height = splitContainer1.Panel2.Height;
|
||||
|
||||
base.OnResize(e);
|
||||
|
||||
splitContainer1.Panel1MinSize = splitContainer1.ClientSize.Height - toolStripBig.MaximumSize.Height - splitContainer1.SplitterWidth;
|
||||
|
||||
int maxSplitterDistance = splitContainer1.ClientSize.Height - toolStripSmall.MaximumSize.Height - splitContainer1.SplitterWidth;
|
||||
if (splitContainer1.SplitterDistance > maxSplitterDistance)
|
||||
splitContainer1.SplitterDistance = maxSplitterDistance;
|
||||
// Recalculate splitter distance so that Panel2.Height is preserved
|
||||
splitContainer1.SplitterDistance = splitContainer1.ClientSize.Height - panel2Height - splitContainer1.SplitterWidth;
|
||||
}
|
||||
|
||||
#region Accessors
|
||||
|
Loading…
Reference in New Issue
Block a user