diff --git a/Resources/Languages/lang.tl.resx b/Resources/Languages/lang.fil.resx similarity index 100% rename from Resources/Languages/lang.tl.resx rename to Resources/Languages/lang.fil.resx diff --git a/Resources/Languages/lang.iw.resx b/Resources/Languages/lang.he.resx similarity index 100% rename from Resources/Languages/lang.iw.resx rename to Resources/Languages/lang.he.resx diff --git a/Resources/Languages/lang.no.resx b/Resources/Languages/lang.nb.resx similarity index 99% rename from Resources/Languages/lang.no.resx rename to Resources/Languages/lang.nb.resx index 43f3320..eb677b7 100644 --- a/Resources/Languages/lang.no.resx +++ b/Resources/Languages/lang.nb.resx @@ -280,7 +280,7 @@ Bakgrunn av pil mens musen svever over den - Mørkt fargevalg + Fargeskjema mørkt Lys fargevalg @@ -316,10 +316,10 @@ Ikoner - Angis av kontekstmenyen + Sett av kontekstmeny - Sett som katalog + Angi som katalog lasting diff --git a/UserInterface/Menu.xaml.cs b/UserInterface/Menu.xaml.cs index db1013e..8832dc3 100644 --- a/UserInterface/Menu.xaml.cs +++ b/UserInterface/Menu.xaml.cs @@ -7,6 +7,7 @@ namespace SystemTrayMenu.UserInterface using System; using System.Collections.Generic; using System.Collections.Specialized; + using System.Globalization; using System.IO; using System.Windows; using System.Windows.Controls; @@ -959,6 +960,33 @@ namespace SystemTrayMenu.UserInterface double icoWidth = 16 * Scaling.FactorByDpi; Resources["ColumnIconWidth"] = Math.Ceiling(icoWidth * factorIconSizeInPercent * Scaling.Factor); + double renderedMaxWidth = 0D; + foreach (RowData item in dgv.Items) + { + double renderedWidth = new FormattedText( + item.ColumnText, + CultureInfo.CurrentCulture, + FlowDirection.LeftToRight, + new Typeface(dgv.FontFamily, dgv.FontStyle, dgv.FontWeight, dgv.FontStretch), + dgv.FontSize, + dgv.Foreground, + VisualTreeHelper.GetDpi(this).PixelsPerDip).Width; + if (renderedWidth > renderedMaxWidth) + { + renderedMaxWidth = renderedWidth; + } + } + + //if (renderedMaxWidth == 0D) + //{ + // renderedMaxWidth = 99999D; + //} + + // Margin of the windowFrame is allowed to exceed the boundaries, so we just add them afterwards + //Resources["ColumnTextMaxWidth"] = Math.Ceiling( + // Math.Min(renderedMaxWidth, (double)Scaling.Factor * Scaling.FactorByDpi * 400D * (Settings.Default.WidthMaxInPercent / 100D)) + // + windowFrame.Margin.Left + windowFrame.Margin.Right); + // Margin of the windowFrame is allowed to exceed the boundaries, so we just add them afterwards Resources["ColumnTextMaxWidth"] = Math.Ceiling( ((double)Scaling.Factor * Scaling.FactorByDpi * 400D * (Settings.Default.WidthMaxInPercent / 100D)) diff --git a/UserInterface/SettingsWindow.xaml.cs b/UserInterface/SettingsWindow.xaml.cs index 453b8e6..f5cf348 100644 --- a/UserInterface/SettingsWindow.xaml.cs +++ b/UserInterface/SettingsWindow.xaml.cs @@ -91,7 +91,7 @@ namespace SystemTrayMenu.UserInterface new ("Español", "es"), new ("Esperanto", "eo"), new ("euskara", "eu"), - new ("Filipino", "tl"), + new ("Filipino", "fil"), new ("Français", "fr"), new ("Italian", "it"), new ("galego", "gl"), @@ -107,7 +107,7 @@ namespace SystemTrayMenu.UserInterface new ("Malti", "mt"), new ("Melayu", "ms"), new ("Nederlands", "nl"), - new ("norsk", "no"), + new ("norsk", "nb"), new ("Polski", "pl"), new ("Português (Brasil)", "pt-BR"), new ("português (Portugal)", "pt-PT"), @@ -128,7 +128,7 @@ namespace SystemTrayMenu.UserInterface new ("ქართული", "ka"), new ("հայերեն", "hy"), new ("יידיש", "yi"), - new ("עִברִית", "iw"), + new ("עִברִית", "he"), new ("اردو", "ur"), new ("عربي", "ar"), new ("فارسی", "fa"),