diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index 3606ce1..9c099be 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.3.0.16")] -[assembly: AssemblyFileVersion("1.3.0.16")] +[assembly: AssemblyVersion("1.3.0.17")] +[assembly: AssemblyFileVersion("1.3.0.17")] diff --git a/UserInterface/Menu.cs b/UserInterface/Menu.cs index a38dfcc..9042cab 100644 --- a/UserInterface/Menu.cs +++ b/UserInterface/Menu.cs @@ -386,10 +386,9 @@ namespace SystemTrayMenu.UserInterface if (!Config.ShowSearchBar) { - tableLayoutPanelSearch.AutoSize = false; - tableLayoutPanelSearch.Height = 0; textBoxSearch.AutoSize = false; - textBoxSearch.Height = 0; + textBoxSearch.Size = new Size(0, 0); + textBoxSearch.Margin = new Padding(0); pictureBoxSearch.Visible = false; panelLine.Visible = false; } diff --git a/Utilities/DataGridViewExtensions.cs b/Utilities/DataGridViewExtensions.cs index c8fc288..00715bd 100644 --- a/Utilities/DataGridViewExtensions.cs +++ b/Utilities/DataGridViewExtensions.cs @@ -4,6 +4,7 @@ namespace SystemTrayMenu.Utilities { + using System; using System.Data; using System.Drawing; using System.Windows.Forms; @@ -36,11 +37,7 @@ namespace SystemTrayMenu.Utilities int widthMaxInPixel = (int)(Scaling.Factor * Scaling.FactorByDpi * 400f * (Properties.Settings.Default.WidthMaxInPercent / 100f)); - if (widthMax > widthMaxInPixel) - { - widthMax = widthMaxInPixel; - } - + widthMax = Math.Min(widthMax, widthMaxInPixel); dgv.Columns[1].Width = (int)(widthMax + 0.5); double factorIconSizeInPercent = Properties.Settings.Default.IconSizeInPercent / 100f;