Compare commits

..

2 commits

Author SHA1 Message Date
2dust
e0f005bd96 up 7.9.1
Some checks are pending
release Linux / build (Release) (push) Waiting to run
release macOS / build (Release) (push) Waiting to run
release Windows desktop (Avalonia UI) / build (Release) (push) Waiting to run
release Windows / build (Release) (push) Waiting to run
2025-02-18 18:58:19 +08:00
2dust
2cacc372ad Optimize desktop DataGrid RowHeight adjusts with font size 2025-02-18 18:48:29 +08:00
5 changed files with 21 additions and 2 deletions

View file

@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<Version>7.9.0</Version>
<Version>7.9.1</Version>
</PropertyGroup>
<PropertyGroup>

View file

@ -20,4 +20,7 @@
<Style Selector="Grid.Margin8">
<Setter Property="Margin" Value="8" />
</Style>
</Styles>
<Style Selector="DataGrid">
<Setter Property="RowHeight" Value="24" />
</Style>
</Styles>

View file

@ -119,6 +119,17 @@ namespace v2rayN.Desktop.ViewModels
Value = size,
});
Application.Current?.Styles.Add(style);
ModifyFontSizeEx(size);
}
private void ModifyFontSizeEx(double size)
{
//DataGrid
var rowHeight = 20 + (size / 2);
var style = new Style(x => x.OfType<DataGrid>());
style.Add(new Setter(DataGrid.RowHeightProperty, rowHeight));
Application.Current?.Styles.Add(style);
}
private void ModifyFontFamily()

View file

@ -787,6 +787,7 @@
Classes="Margin8" />
<TextBlock
x:Name="labLinuxSudoPassword"
Grid.Row="7"
Grid.Column="0"
VerticalAlignment="Center"
@ -800,6 +801,7 @@
HorizontalAlignment="Left"
Classes="Margin8" />
<TextBlock
x:Name="labLinuxSudoPasswordTip"
Grid.Row="7"
Grid.Column="2"
VerticalAlignment="Center"

View file

@ -174,6 +174,9 @@ namespace v2rayN.Desktop.Views
if (Utils.IsWindows())
{
txbSettingsExceptionTip2.IsVisible = false;
txtLinuxSudoPassword.IsVisible = false;
labLinuxSudoPassword.IsVisible = false;
labLinuxSudoPasswordTip.IsVisible = false;
}
else
{