From 36ceb2b9af91c02b66962c34751dfec06b66cd27 Mon Sep 17 00:00:00 2001 From: Markus Hofknecht Date: Fri, 11 Feb 2022 20:48:11 +0100 Subject: [PATCH] [BUG] "Pixel maximum menu width" not working as expected (#319), version 1.2.6.5 --- Properties/AssemblyInfo.cs | 4 ++-- UserInterface/Menu.Designer.cs | 4 ++-- UserInterface/Menu.cs | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index d827b19..9138f26 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -39,5 +39,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.2.6.4")] -[assembly: AssemblyFileVersion("1.2.6.4")] +[assembly: AssemblyVersion("1.2.6.5")] +[assembly: AssemblyFileVersion("1.2.6.5")] diff --git a/UserInterface/Menu.Designer.cs b/UserInterface/Menu.Designer.cs index dbcfb3a..92ca678 100644 --- a/UserInterface/Menu.Designer.cs +++ b/UserInterface/Menu.Designer.cs @@ -113,7 +113,7 @@ // // tableLayoutPanelSearch // - this.tableLayoutPanelSearch.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); + this.tableLayoutPanelSearch.Anchor = System.Windows.Forms.AnchorStyles.Left; this.tableLayoutPanelSearch.AutoSize = true; this.tableLayoutPanelSearch.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.tableLayoutPanelSearch.BackColor = System.Drawing.Color.White; @@ -127,7 +127,7 @@ this.tableLayoutPanelSearch.Name = "tableLayoutPanelSearch"; this.tableLayoutPanelSearch.RowCount = 1; this.tableLayoutPanelSearch.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tableLayoutPanelSearch.Size = new System.Drawing.Size(153, 22); + this.tableLayoutPanelSearch.Size = new System.Drawing.Size(128, 22); this.tableLayoutPanelSearch.TabIndex = 5; this.tableLayoutPanelSearch.MouseWheel += new System.Windows.Forms.MouseEventHandler(this.DgvMouseWheel); // diff --git a/UserInterface/Menu.cs b/UserInterface/Menu.cs index ca01853..80d9a61 100644 --- a/UserInterface/Menu.cs +++ b/UserInterface/Menu.cs @@ -717,6 +717,8 @@ namespace SystemTrayMenu.UserInterface dgv.Width = widthIcon + widthText; } + tableLayoutPanelSearch.MinimumSize = new Size(dgv.Width + widthScrollbar, 0); + // Only scaling correct with Sans Serif for textBoxSearch. Workaround: textBoxSearch.Font = new Font( "Segoe UI",