From d85af7f8a5e5030d02d012af87d10b290d274ce1 Mon Sep 17 00:00:00 2001 From: Letsibogo Ramadi Date: Thu, 9 Mar 2017 17:35:26 +0000 Subject: [PATCH 1/2] CA-245626 - Properties dialog content clipped when content panel is made smaller In addition to adding scrollbars when content panel size is reduced using splitter, I also fixed the teal top panel issue from the base class so that it is applied to all VerticallyTabbedDialog implementations. Signed-off-by: Letsibogo Ramadi --- XenAdmin/Dialogs/PropertiesDialog.Designer.cs | 15 ++--- XenAdmin/Dialogs/PropertiesDialog.resx | 63 ++++++++----------- .../VerticallyTabbedDialog.Designer.cs | 2 +- XenAdmin/Dialogs/VerticallyTabbedDialog.resx | 49 +++++++++------ 4 files changed, 65 insertions(+), 64 deletions(-) diff --git a/XenAdmin/Dialogs/PropertiesDialog.Designer.cs b/XenAdmin/Dialogs/PropertiesDialog.Designer.cs index fb6b654bd..b4ff0d7de 100644 --- a/XenAdmin/Dialogs/PropertiesDialog.Designer.cs +++ b/XenAdmin/Dialogs/PropertiesDialog.Designer.cs @@ -32,14 +32,16 @@ namespace XenAdmin.Dialogs private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PropertiesDialog)); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit(); this.splitContainer.Panel1.SuspendLayout(); + this.splitContainer.Panel2.SuspendLayout(); this.splitContainer.SuspendLayout(); + this.blueBorder.SuspendLayout(); this.SuspendLayout(); // // ContentPanel // resources.ApplyResources(this.ContentPanel, "ContentPanel"); - this.ContentPanel.MinimumSize = new System.Drawing.Size(500, 500); // // verticalTabs // @@ -60,13 +62,9 @@ namespace XenAdmin.Dialogs // resources.ApplyResources(this.splitContainer, "splitContainer"); // - // splitContainer.Panel1 + // blueBorder // - resources.ApplyResources(this.splitContainer.Panel1, "splitContainer.Panel1"); - // - // splitContainer.Panel2 - // - resources.ApplyResources(this.splitContainer.Panel2, "splitContainer.Panel2"); + resources.ApplyResources(this.blueBorder, "blueBorder"); // // PropertiesDialog // @@ -74,7 +72,10 @@ namespace XenAdmin.Dialogs this.Name = "PropertiesDialog"; this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.PropertiesDialog_FormClosed); this.splitContainer.Panel1.ResumeLayout(false); + this.splitContainer.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit(); this.splitContainer.ResumeLayout(false); + this.blueBorder.ResumeLayout(false); this.ResumeLayout(false); } diff --git a/XenAdmin/Dialogs/PropertiesDialog.resx b/XenAdmin/Dialogs/PropertiesDialog.resx index 07f36cf20..2a9282c8b 100644 --- a/XenAdmin/Dialogs/PropertiesDialog.resx +++ b/XenAdmin/Dialogs/PropertiesDialog.resx @@ -112,26 +112,23 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + Top, Left - + True Fill - - - Segoe UI, 9pt - + 0, 0 @@ -145,7 +142,7 @@ ContentPanel - System.Windows.Forms.Panel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 blueBorder @@ -153,9 +150,6 @@ 1 - - Segoe UI, 9pt - 206, 511 @@ -171,9 +165,6 @@ 0 - - Segoe UI, 9pt - 800, 529 @@ -181,7 +172,7 @@ cancelButton - System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 $this @@ -189,20 +180,14 @@ 1 - - Segoe UI, 9pt - 720, 529 - - OK - okButton - System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 $this @@ -210,17 +195,11 @@ 2 - - Segoe UI, 9pt - - - Segoe UI, 9pt - splitContainer.Panel1 - System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 splitContainer @@ -228,14 +207,11 @@ 0 - - Segoe UI, 9pt - splitContainer.Panel2 - System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 splitContainer @@ -253,7 +229,7 @@ splitContainer - System.Windows.Forms.SplitContainer, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.SplitContainer, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 $this @@ -261,7 +237,22 @@ 0 - + + 653, 511 + + + blueBorder + + + XenAdmin.Controls.BlueBorderPanel, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + + + splitContainer.Panel2 + + + 0 + + True diff --git a/XenAdmin/Dialogs/VerticallyTabbedDialog.Designer.cs b/XenAdmin/Dialogs/VerticallyTabbedDialog.Designer.cs index 3d2d6177f..70313e98f 100644 --- a/XenAdmin/Dialogs/VerticallyTabbedDialog.Designer.cs +++ b/XenAdmin/Dialogs/VerticallyTabbedDialog.Designer.cs @@ -82,9 +82,9 @@ namespace XenAdmin.Dialogs // // TopPanel // - resources.ApplyResources(this.TopPanel, "TopPanel"); this.TopPanel.Controls.Add(this.TabImage); this.TopPanel.Controls.Add(this.TabTitle); + resources.ApplyResources(this.TopPanel, "TopPanel"); this.TopPanel.Name = "TopPanel"; this.TopPanel.Scheme = XenAdmin.Controls.GradientPanel.GradientPanel.Schemes.Tab; // diff --git a/XenAdmin/Dialogs/VerticallyTabbedDialog.resx b/XenAdmin/Dialogs/VerticallyTabbedDialog.resx index dfb20e6be..bf6b24396 100644 --- a/XenAdmin/Dialogs/VerticallyTabbedDialog.resx +++ b/XenAdmin/Dialogs/VerticallyTabbedDialog.resx @@ -112,16 +112,16 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + Top, Bottom, Left, Right - + Segoe UI, 9pt @@ -134,7 +134,7 @@ Segoe UI, 9pt - + False @@ -169,7 +169,7 @@ splitContainer.Panel1 - System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 splitContainer @@ -177,9 +177,6 @@ 0 - - Top, Left, Right - Segoe UI, 9pt @@ -202,7 +199,7 @@ TabImage - System.Windows.Forms.PictureBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 TopPanel @@ -217,10 +214,10 @@ Segoe UI, 9.75pt - 34, 0 + 34, 8 - 519, 39 + 517, 20 8 @@ -232,7 +229,7 @@ TabTitle - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 TopPanel @@ -240,6 +237,9 @@ 1 + + Top + Segoe UI, 9pt @@ -250,7 +250,7 @@ 3, 3, 3, 0 - 555, 39 + 554, 39 10 @@ -270,6 +270,15 @@ Top, Bottom, Left, Right + + True + + + 5, 5 + + + 530, 0 + Segoe UI, 9pt @@ -286,7 +295,7 @@ ContentPanel - System.Windows.Forms.Panel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 blueBorder @@ -331,7 +340,7 @@ splitContainer.Panel2 - System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 splitContainer @@ -352,7 +361,7 @@ splitContainer - System.Windows.Forms.SplitContainer, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.SplitContainer, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 $this @@ -388,7 +397,7 @@ cancelButton - System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 $this @@ -424,7 +433,7 @@ okButton - System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 $this @@ -432,7 +441,7 @@ 2 - + True From e6b912173d0ff1db7972b3726dca903b4d77c2ca Mon Sep 17 00:00:00 2001 From: Letsibogo Ramadi Date: Thu, 9 Mar 2017 17:38:04 +0000 Subject: [PATCH 2/2] CA-147612 - EN: background should expand to the right border. Also fixed appearance to be consistent with other Vertically Tabbed Dialogs Signed-off-by: Letsibogo Ramadi --- .../Wlb/WlbConfigurationDialog.Designer.cs | 2 - .../Dialogs/Wlb/WlbConfigurationDialog.cs | 11 -- .../Dialogs/Wlb/WlbConfigurationDialog.resx | 167 +++--------------- .../Wlb/WlbAdvancedSettingsPage.Designer.cs | 1 - 4 files changed, 28 insertions(+), 153 deletions(-) diff --git a/XenAdmin/Dialogs/Wlb/WlbConfigurationDialog.Designer.cs b/XenAdmin/Dialogs/Wlb/WlbConfigurationDialog.Designer.cs index 20e2679dd..0cda58f34 100644 --- a/XenAdmin/Dialogs/Wlb/WlbConfigurationDialog.Designer.cs +++ b/XenAdmin/Dialogs/Wlb/WlbConfigurationDialog.Designer.cs @@ -124,14 +124,12 @@ namespace XenAdmin.Dialogs.Wlb // this.wlbAdvancedSettingsPage.BackColor = System.Drawing.Color.Transparent; resources.ApplyResources(this.wlbAdvancedSettingsPage, "wlbAdvancedSettingsPage"); - this.wlbAdvancedSettingsPage.MinimumSize = new System.Drawing.Size(560, 560); this.wlbAdvancedSettingsPage.Name = "wlbAdvancedSettingsPage"; // // WlbConfigurationDialog // resources.ApplyResources(this, "$this"); this.Name = "WlbConfigurationDialog"; - this.SizeChanged += new System.EventHandler(this.WlbConfigurationDialog_SizeChanged); this.Controls.SetChildIndex(this.cancelButton, 0); this.Controls.SetChildIndex(this.okButton, 0); this.Controls.SetChildIndex(this.splitContainer, 0); diff --git a/XenAdmin/Dialogs/Wlb/WlbConfigurationDialog.cs b/XenAdmin/Dialogs/Wlb/WlbConfigurationDialog.cs index dd692ae7a..c0dc69e9e 100644 --- a/XenAdmin/Dialogs/Wlb/WlbConfigurationDialog.cs +++ b/XenAdmin/Dialogs/Wlb/WlbConfigurationDialog.cs @@ -218,16 +218,5 @@ namespace XenAdmin.Dialogs.Wlb } } } - - private void WlbConfigurationDialog_SizeChanged(object sender, EventArgs e) - { - // When the size of configuration dialog is changed, - // the SplitContainer panels should expand and contract correspondingly. - // Originally the dialog height is 750, SplitContainer height is 674, - // the difference is 76. - // The SplitContainer height must track the change of the dialog height. - splitContainer.Height = this.Height - 76; - } - } } diff --git a/XenAdmin/Dialogs/Wlb/WlbConfigurationDialog.resx b/XenAdmin/Dialogs/Wlb/WlbConfigurationDialog.resx index 4e05816fc..6d7c34190 100644 --- a/XenAdmin/Dialogs/Wlb/WlbConfigurationDialog.resx +++ b/XenAdmin/Dialogs/Wlb/WlbConfigurationDialog.resx @@ -112,23 +112,19 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + Top, Left - - - True - Fill - + Segoe UI, 9pt @@ -136,8 +132,9 @@ 10, 49 - 552, 613 + 556, 599 + 1 @@ -163,7 +160,7 @@ 10, 49 - 552, 613 + 556, 599 2 @@ -190,7 +187,7 @@ 10, 49 - 552, 613 + 556, 599 2 @@ -217,7 +214,7 @@ 10, 49 - 552, 613 + 556, 599 0 @@ -244,7 +241,7 @@ 10, 49 - 552, 613 + 556, 599 3 @@ -271,7 +268,7 @@ 10, 49 - 560, 613 + 560, 599 0 @@ -298,13 +295,13 @@ 10, 49, 10, 10 - 572, 672 + 576, 658 ContentPanel - System.Windows.Forms.Panel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 blueBorder @@ -312,11 +309,8 @@ 1 - - 20, 0 - - 216, 674 + 229, 660 verticalTabs @@ -330,62 +324,44 @@ 0 - - Bottom, Right - - 738, 682 + 738, 681 cancelButton - System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 $this - 3 - - - Bottom, Right + 2 - 647, 682 + 647, 681 okButton - System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 $this - 2 - - - Top, Left - - - Top - - - 0, 43 + 1 10, 3, 10, 3 - - 20, 0, 0, 0 - splitContainer.Panel1 - System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 splitContainer @@ -393,14 +369,11 @@ 0 - - 0, 0, 20, 0 - splitContainer.Panel2 - System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 splitContainer @@ -412,16 +385,16 @@ 400 - 834, 674 + 811, 660 - 236 + 229 splitContainer - System.Windows.Forms.SplitContainer, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.SplitContainer, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 $this @@ -430,7 +403,7 @@ 0 - 574, 674 + 578, 660 blueBorder @@ -444,98 +417,14 @@ 0 - - True - - - GrowAndShrink - - - 3 - - - True - - - True - - - GrowAndShrink - - - Fill - - - Segoe UI, 9pt - - - 131, 8 - - - 570, 27 - - - 0 - - - False - - - deprecationBanner - - - XenAdmin.Controls.DeprecationBanner, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - - - tableLayoutPanel1 - - - 0 - - - Top - - - Segoe UI, 9pt - - - 0, 0 - - - 5, 5, 5, 5 - - - 1 - - - 834, 43 - - - 7 - - - tableLayoutPanel1 - - - System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 1 - - - <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="deprecationBanner" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /></Controls><Columns Styles="Percent,15,Percent,70,Percent,15" /><Rows Styles="Percent,100" /></TableLayoutSettings> - - + True 96, 96 - 834, 712 + 834, 711 Tahoma, 8pt diff --git a/XenAdmin/SettingsPanels/Wlb/WlbAdvancedSettingsPage.Designer.cs b/XenAdmin/SettingsPanels/Wlb/WlbAdvancedSettingsPage.Designer.cs index 3c6bc2863..238e007ec 100644 --- a/XenAdmin/SettingsPanels/Wlb/WlbAdvancedSettingsPage.Designer.cs +++ b/XenAdmin/SettingsPanels/Wlb/WlbAdvancedSettingsPage.Designer.cs @@ -460,7 +460,6 @@ namespace XenAdmin.SettingsPanels this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; this.BackColor = System.Drawing.SystemColors.Window; this.Controls.Add(this.tableLayoutPanel1); - this.MinimumSize = new System.Drawing.Size(560, 560); this.Name = "WlbAdvancedSettingsPage"; this.tableLayoutPanel1.ResumeLayout(false); this.tableLayoutPanel1.PerformLayout();