Merge pull request #658 from irihitech/various

remove scale transform in Button &  simplify OnPlatform use case
This commit is contained in:
Dong Bin
2025-04-25 12:07:19 +08:00
committed by GitHub
4 changed files with 6 additions and 43 deletions

View File

@@ -86,10 +86,6 @@
</ControlTemplate>
</Setter>
<Style Selector="^:pressed">
<Setter Property="RenderTransform" Value="scale(0.98)" />
</Style>
<Style Selector="^.Primary">
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultPrimaryForeground}" />
</Style>

View File

@@ -23,9 +23,6 @@
</Border>
</ControlTemplate>
</Setter>
<Style Selector="^:pressed">
<Setter Property="RenderTransform" Value="scale(0.98)" />
</Style>
<Style Selector="^:pointerover /template/ Border#PART_Background">
<Setter Property="BorderBrush" Value="{DynamicResource ButtonDefaultPointeroverBorderBrush}" />
<Setter Property="Background" Value="{DynamicResource ButtonDefaultPointeroverBackground}" />
@@ -66,9 +63,6 @@
</Border>
</ControlTemplate>
</Setter>
<Style Selector="^:pressed">
<Setter Property="RenderTransform" Value="scale(0.98)" />
</Style>
<Style Selector="^:pointerover /template/ Border#PART_Background">
<Setter Property="Background" Value="{DynamicResource ButtonSolidPrimaryPointeroverBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource ButtonSolidPrimaryPointeroverBorderBrush}" />

View File

@@ -11,39 +11,12 @@
<Setter Property="ExtendClientAreaTitleBarHeightHint" Value="-1" />
<Setter Property="ExtendClientAreaToDecorationsHint" Value="True" />
<Setter Property="u:OverlayDialogHost.IsModalStatusScope" Value="True" />
<Setter Property="IsMinimizeButtonVisible">
<OnPlatform>
<On Options="Default, Windows, Linux">
<x:Boolean>True</x:Boolean>
</On>
<On Options="macOS">
<x:Boolean>False</x:Boolean>
</On>
</OnPlatform>
</Setter>
<Setter Property="IsRestoreButtonVisible">
<OnPlatform>
<On Options="Default, Windows, Linux">
<x:Boolean>True</x:Boolean>
</On>
<On Options="macOS">
<x:Boolean>False</x:Boolean>
</On>
</OnPlatform>
</Setter>
<Setter Property="IsCloseButtonVisible">
<OnPlatform>
<On Options="Default, Windows, Linux">
<x:Boolean>True</x:Boolean>
</On>
<On Options="macOS">
<x:Boolean>False</x:Boolean>
</On>
</OnPlatform>
</Setter>
<Setter Property="IsMinimizeButtonVisible" Value="{OnPlatform {x:True},macOS={x:False}}" />
<Setter Property="IsRestoreButtonVisible" Value="{OnPlatform {x:True},macOS={x:False}}" />
<Setter Property="IsCloseButtonVisible" Value="{OnPlatform {x:True},macOS={x:False}}"/>
<Setter Property="SystemDecorations">
<OnPlatform>
<On Options="Default, Windows, macOS">
<On Options="Default">
<SystemDecorations>Full</SystemDecorations>
</On>
<On Options="Linux">