feat: make overlay close button style align with semi design.
This commit is contained in:
@@ -45,7 +45,7 @@
|
|||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Margin="0,24,24,0"
|
Margin="0,24,24,0"
|
||||||
DockPanel.Dock="Right"
|
DockPanel.Dock="Right"
|
||||||
Theme="{DynamicResource CloseButton}" />
|
Theme="{DynamicResource OverlayCloseButton}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
@@ -192,7 +192,7 @@
|
|||||||
Grid.Column="2"
|
Grid.Column="2"
|
||||||
Margin="0,24,24,0"
|
Margin="0,24,24,0"
|
||||||
DockPanel.Dock="Right"
|
DockPanel.Dock="Right"
|
||||||
Theme="{DynamicResource CloseButton}" />
|
Theme="{DynamicResource OverlayCloseButton}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
<StackPanel
|
<StackPanel
|
||||||
Grid.Row="2"
|
Grid.Row="2"
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
<!-- Add Resources Here -->
|
<!-- Add Resources Here -->
|
||||||
|
|
||||||
<ControlTheme x:Key="CloseButton" TargetType="Button">
|
<ControlTheme x:Key="CloseButton" TargetType="Button">
|
||||||
<Setter Property="CornerRadius" Value="6" />
|
<Setter Property="CornerRadius" Value="6" />
|
||||||
<Setter Property="Margin" Value="0, 4" />
|
<Setter Property="Margin" Value="0, 4" />
|
||||||
@@ -39,4 +38,34 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|
||||||
|
<ControlTheme x:Key="OverlayCloseButton" TargetType="Button">
|
||||||
|
<Setter Property="CornerRadius" Value="6" />
|
||||||
|
<Setter Property="Margin" Value="0, 4" />
|
||||||
|
<Setter Property="Padding" Value="4" />
|
||||||
|
<Setter Property="Height" Value="28" />
|
||||||
|
<Setter Property="Width" Value="28" />
|
||||||
|
<Setter Property="Cursor" Value="Hand" />
|
||||||
|
<Setter Property="VerticalAlignment" Value="Stretch" />
|
||||||
|
<Setter Property="Template">
|
||||||
|
<ControlTemplate TargetType="Button">
|
||||||
|
<Border
|
||||||
|
Name="PART_Border"
|
||||||
|
Padding="{TemplateBinding Padding}"
|
||||||
|
Background="Transparent"
|
||||||
|
CornerRadius="{TemplateBinding CornerRadius}">
|
||||||
|
<PathIcon
|
||||||
|
Width="12"
|
||||||
|
Height="12"
|
||||||
|
Data="{DynamicResource WindowCloseIconGlyph}"/>
|
||||||
|
</Border>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter>
|
||||||
|
<Style Selector="^:pointerover /template/ Border">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonDefaultPointeroverBackground}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:pressed /template/ Border">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ButtonDefaultPressedBackground}" />
|
||||||
|
</Style>
|
||||||
|
</ControlTheme>
|
||||||
|
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Margin="0,24,24,0"
|
Margin="0,24,24,0"
|
||||||
DockPanel.Dock="Right"
|
DockPanel.Dock="Right"
|
||||||
Theme="{DynamicResource CloseButton}" />
|
Theme="{DynamicResource OverlayCloseButton}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
@@ -107,7 +107,7 @@
|
|||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Margin="0,24,24,0"
|
Margin="0,24,24,0"
|
||||||
DockPanel.Dock="Right"
|
DockPanel.Dock="Right"
|
||||||
Theme="{DynamicResource CloseButton}" />
|
Theme="{DynamicResource OverlayCloseButton}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
<StackPanel
|
<StackPanel
|
||||||
Grid.Row="2"
|
Grid.Row="2"
|
||||||
|
|||||||
@@ -193,7 +193,7 @@
|
|||||||
Name="{x:Static u:MessageBoxWindow.PART_CloseButton}"
|
Name="{x:Static u:MessageBoxWindow.PART_CloseButton}"
|
||||||
Grid.Column="2"
|
Grid.Column="2"
|
||||||
Margin="0,24,24,0"
|
Margin="0,24,24,0"
|
||||||
Theme="{DynamicResource CloseButton}" />
|
Theme="{DynamicResource OverlayCloseButton}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid
|
<Grid
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
|
|||||||
Reference in New Issue
Block a user