[BUG] Languages Filipino, Hebrew and Norwegian not working (#467), version 1.3.2.10

This commit is contained in:
Markus Hofknecht 2023-08-25 15:22:27 +02:00
parent dbd0f04e40
commit d20e843863
5 changed files with 34 additions and 6 deletions

View file

@ -280,7 +280,7 @@
<value>Bakgrunn av pil mens musen svever over den</value>
</data>
<data name="Color scheme dark" xml:space="preserve">
<value>Mørkt fargevalg</value>
<value>Fargeskjema mørkt</value>
</data>
<data name="Color scheme bright" xml:space="preserve">
<value>Lys fargevalg</value>
@ -316,10 +316,10 @@
<value>Ikoner</value>
</data>
<data name="Set by context menu " xml:space="preserve">
<value>Angis av kontekstmenyen</value>
<value>Sett av kontekstmeny</value>
</data>
<data name="Set as directory" xml:space="preserve">
<value>Sett som katalog</value>
<value>Angi som katalog</value>
</data>
<data name="loading" xml:space="preserve">
<value>lasting</value>

View file

@ -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))

View file

@ -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"),