Files
Ursa.Avalonia/src/Ursa.Themes.Semi/Controls/DialogShared.axaml
Zhang Dian 81b3635a2d fix: fix various issues.
* fix CornerRadius of CloseButton.
* add IsVisible to Content of DualBadge.
* remove Geometry & sys:.
2025-01-19 18:18:34 +08:00

57 lines
2.5 KiB
XML

<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Design.PreviewWith>
<StackPanel Orientation="Horizontal" Margin="20">
<Button Theme="{DynamicResource CloseButton}" />
<Button Theme="{DynamicResource OverlayCloseButton}" />
<Button Theme="{DynamicResource NotificationCloseButton}" />
<Button Theme="{DynamicResource ToastCloseButton}" />
</StackPanel>
</Design.PreviewWith>
<ControlTheme x:Key="OverlayCloseButton" TargetType="Button">
<Setter Property="CornerRadius" Value="3" />
<Setter Property="Height" Value="24" />
<Setter Property="Width" Value="24" />
<Setter Property="Padding" Value="4" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="Template">
<ControlTemplate TargetType="Button">
<Border
Padding="{TemplateBinding Padding}"
Background="Transparent"
CornerRadius="{TemplateBinding CornerRadius}">
<PathIcon
Foreground="{DynamicResource SemiColorText1}"
Theme="{StaticResource InnerPathIcon}"
Data="{DynamicResource SemiIconClose}" />
</Border>
</ControlTemplate>
</Setter>
<Style Selector="^:pointerover /template/ Border">
<Setter Property="Background" Value="{DynamicResource SemiColorFill1}" />
</Style>
<Style Selector="^:pressed /template/ Border">
<Setter Property="Background" Value="{DynamicResource SemiColorFill2}" />
</Style>
</ControlTheme>
<ControlTheme
x:Key="CloseButton"
BasedOn="{StaticResource OverlayCloseButton}"
TargetType="Button">
<Style Selector="^:pointerover /template/ Border">
<Setter Property="Background" Value="{DynamicResource CaptionButtonClosePointeroverBackground}" />
</Style>
<Style Selector="^:pointerover /template/ PathIcon">
<Setter Property="Foreground" Value="White" />
</Style>
<Style Selector="^:pressed /template/ Border">
<Setter Property="Background" Value="{DynamicResource CaptionButtonClosePressedBackground}" />
</Style>
<Style Selector="^:pressed /template/ PathIcon">
<Setter Property="Foreground" Value="White" />
</Style>
</ControlTheme>
</ResourceDictionary>