fix: only fix content margin on Windows platform after window maximized

This commit is contained in:
leo 2024-06-13 12:31:45 +08:00
parent f5b35d3db2
commit f3bbf79f4f
2 changed files with 6 additions and 0 deletions

View file

@ -30,6 +30,10 @@
<Style Selector="Window[WindowState=Maximized]"> <Style Selector="Window[WindowState=Maximized]">
<Setter Property="BorderThickness" Value="0"/> <Setter Property="BorderThickness" Value="0"/>
<Setter Property="Padding" Value="0"/>
</Style>
<Style Selector="Window[WindowState=Maximized].fix_maximized_padding">
<Setter Property="Padding" Value="6"/> <Setter Property="Padding" Value="6"/>
</Style> </Style>

View file

@ -14,6 +14,8 @@ namespace SourceGit.Views
{ {
if (OperatingSystem.IsLinux()) if (OperatingSystem.IsLinux())
Classes.Add("custom_window_frame"); Classes.Add("custom_window_frame");
else if (OperatingSystem.IsWindows())
Classes.Add("fix_maximized_padding");
} }
protected override void OnApplyTemplate(TemplateAppliedEventArgs e) protected override void OnApplyTemplate(TemplateAppliedEventArgs e)