mirror of
https://github.com/Hofknecht/SystemTrayMenu.git
synced 2024-07-09 08:16:41 +12:00
Fix target framework version and unintentionally reintroduced code
This commit is contained in:
parent
65a7340171
commit
c5f9977c7d
|
@ -1,6 +1,6 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net7.0-windows</TargetFramework>
|
<TargetFramework>net7.0-windows10.0.22000.0</TargetFramework>
|
||||||
<SelfContained>true</SelfContained>
|
<SelfContained>true</SelfContained>
|
||||||
<RuntimeIdentifiers>win-x64</RuntimeIdentifiers>
|
<RuntimeIdentifiers>win-x64</RuntimeIdentifiers>
|
||||||
<UseWPF>True</UseWPF>
|
<UseWPF>True</UseWPF>
|
||||||
|
|
|
@ -960,33 +960,6 @@ namespace SystemTrayMenu.UserInterface
|
||||||
double icoWidth = 16 * Scaling.FactorByDpi;
|
double icoWidth = 16 * Scaling.FactorByDpi;
|
||||||
Resources["ColumnIconWidth"] = Math.Ceiling(icoWidth * factorIconSizeInPercent * Scaling.Factor);
|
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
|
// Margin of the windowFrame is allowed to exceed the boundaries, so we just add them afterwards
|
||||||
Resources["ColumnTextMaxWidth"] = Math.Ceiling(
|
Resources["ColumnTextMaxWidth"] = Math.Ceiling(
|
||||||
((double)Scaling.Factor * Scaling.FactorByDpi * 400D * (Settings.Default.WidthMaxInPercent / 100D))
|
((double)Scaling.Factor * Scaling.FactorByDpi * 400D * (Settings.Default.WidthMaxInPercent / 100D))
|
||||||
|
|
Loading…
Reference in a new issue