Browse Source

fix: fix caption button fluent theme and default theme.

pull/9216/head
rabbitism 4 years ago
parent
commit
8dab69663f
  1. 10
      src/Avalonia.Themes.Fluent/Controls/CaptionButtons.xaml
  2. 10
      src/Avalonia.Themes.Simple/Controls/CaptionButtons.xaml

10
src/Avalonia.Themes.Fluent/Controls/CaptionButtons.xaml

@ -41,7 +41,7 @@
Theme="{StaticResource FluentCaptionButton}"
IsVisible="False">
<Viewbox Width="11" Margin="2">
<Path Name="FullScreenButtonPath"
<Path Name="PART_FullScreenButtonPath"
Stretch="UniformToFill"
Fill="{TemplateBinding Foreground}"
Data="M2048 2048v-819h-205v469l-1493 -1493h469v-205h-819v819h205v-469l1493 1493h-469v205h819z" />
@ -61,7 +61,7 @@
<Viewbox.RenderTransform>
<RotateTransform Angle="-90" />
</Viewbox.RenderTransform>
<Path Name="RestoreButtonPath"
<Path Name="PART_RestoreButtonPath"
Stretch="UniformToFill"
Fill="{TemplateBinding Foreground}"
Data="M2048 2048v-2048h-2048v2048h2048zM1843 1843h-1638v-1638h1638v1638z"/>
@ -80,17 +80,17 @@
</StackPanel>
</ControlTemplate>
</Setter>
<Style Selector="^:maximized /template/ Path#RestoreButtonPath">
<Style Selector="^:maximized /template/ Path#PART_RestoreButtonPath">
<Setter Property="Data" Value="M2048 410h-410v-410h-1638v1638h410v410h1638v-1638zM1434 1434h-1229v-1229h1229v1229zM1843 1843h-1229v-205h1024v-1024h205v1229z" />
</Style>
<Style Selector="^:fullscreen /template/ Path#PART_FullScreenButtonPath">
<Setter Property="IsVisible" Value="True" />
<Setter Property="Data" Value="M205 1024h819v-819h-205v469l-674 -674l-145 145l674 674h-469v205zM1374 1229h469v-205h-819v819h205v-469l674 674l145 -145z" />
</Style>
<Style Selector="^:fullscreen /template/ Panel#PART_RestoreButton">
<Style Selector="^:fullscreen /template/ Button#PART_RestoreButton">
<Setter Property="IsVisible" Value="False" />
</Style>
<Style Selector="^:fullscreen /template/ Panel#PART_MinimiseButton">
<Style Selector="^:fullscreen /template/ Button#PART_MinimiseButton">
<Setter Property="IsVisible" Value="False" />
</Style>
</ControlTheme>

10
src/Avalonia.Themes.Simple/Controls/CaptionButtons.xaml

@ -47,7 +47,7 @@
Theme="{StaticResource SimpleCaptionButton}">
<Viewbox Width="11"
Margin="2">
<Path Name="FullScreenButtonPath"
<Path Name="PART_FullScreenButtonPath"
Data="M2048 2048v-819h-205v469l-1493 -1493h469v-205h-819v819h205v-469l1493 1493h-469v205h819z"
Fill="{TemplateBinding Foreground}"
Stretch="UniformToFill" />
@ -69,7 +69,7 @@
<Viewbox.RenderTransform>
<RotateTransform Angle="-90" />
</Viewbox.RenderTransform>
<Path Name="RestoreButtonPath"
<Path Name="PART_RestoreButtonPath"
Data="M2048 2048v-2048h-2048v2048h2048zM1843 1843h-1638v-1638h1638v1638z"
Fill="{TemplateBinding Foreground}"
Stretch="UniformToFill" />
@ -89,17 +89,17 @@
</StackPanel>
</ControlTemplate>
</Setter>
<Style Selector="^:maximized /template/ Path#RestoreButtonPath">
<Style Selector="^:maximized /template/ Path#PART_RestoreButtonPath">
<Setter Property="Data" Value="M2048 410h-410v-410h-1638v1638h410v410h1638v-1638zM1434 1434h-1229v-1229h1229v1229zM1843 1843h-1229v-205h1024v-1024h205v1229z" />
</Style>
<Style Selector="^:fullscreen /template/ Path#PART_FullScreenButtonPath">
<Setter Property="IsVisible" Value="True" />
<Setter Property="Data" Value="M205 1024h819v-819h-205v469l-674 -674l-145 145l674 674h-469v205zM1374 1229h469v-205h-819v819h205v-469l674 674l145 -145z" />
</Style>
<Style Selector="^:fullscreen /template/ Panel#PART_RestoreButton">
<Style Selector="^:fullscreen /template/ Button#PART_RestoreButton">
<Setter Property="IsVisible" Value="False" />
</Style>
<Style Selector="^:fullscreen /template/ Panel#PART_MinimiseButton">
<Style Selector="^:fullscreen /template/ Button#PART_MinimiseButton">
<Setter Property="IsVisible" Value="False" />
</Style>
</ControlTheme>

Loading…
Cancel
Save