-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #261 from YJammak/main
Use DefaultDemiBold to set the DemiBold in the style to avoid blurring caused by being too thick in some fonts
- Loading branch information
Showing
24 changed files
with
415 additions
and
307 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,72 +1,105 @@ | ||
<UserControl xmlns="https://github.com/avaloniaui" | ||
<UserControl x:Class="SukiUI.Controls.MessageBox" | ||
xmlns="https://github.com/avaloniaui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:content="clr-namespace:SukiUI.Content" | ||
xmlns:controls="clr-namespace:SukiUI.Controls" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:controls="clr-namespace:SukiUI.Controls" | ||
xmlns:content="clr-namespace:SukiUI.Content" | ||
mc:Ignorable="d" d:DesignWidth="480" Width="480" | ||
x:Class="SukiUI.Controls.MessageBox"> | ||
Width="480" | ||
d:DesignWidth="480" | ||
mc:Ignorable="d"> | ||
<UserControl.Styles> | ||
<Style Selector="controls|MessageBox"> | ||
<Setter Property="Template"> | ||
<ControlTemplate> | ||
<Panel> | ||
<Border Background="{DynamicResource SukiCardBackground}" BorderBrush="{DynamicResource SukiBorderBrush}" BorderThickness="1" CornerRadius="25" Margin="0,90,0,0"> | ||
<Border CornerRadius="25" ClipToBounds="True"> | ||
<Panel> | ||
<Panel IsVisible="{DynamicResource IsDark}"> | ||
|
||
<Panel.Background> | ||
<LinearGradientBrush StartPoint="0%,0%" EndPoint="100%,100%"> | ||
<GradientStop Color="{DynamicResource SukiAccentColor3}" Offset="0"></GradientStop> | ||
<GradientStop Color="{DynamicResource SukiPrimaryColor15}" Offset="1"></GradientStop> | ||
<Panel> | ||
<Border Margin="0,90,0,0" | ||
Background="{DynamicResource SukiCardBackground}" | ||
BorderBrush="{DynamicResource SukiBorderBrush}" | ||
BorderThickness="1" | ||
CornerRadius="25"> | ||
<Border ClipToBounds="True" CornerRadius="25"> | ||
<Panel> | ||
<Panel IsVisible="{DynamicResource IsDark}"> | ||
|
||
</LinearGradientBrush> | ||
</Panel.Background> | ||
|
||
</Panel> | ||
|
||
<Panel IsVisible="{DynamicResource IsLight}"> | ||
<Panel.Background> | ||
<LinearGradientBrush StartPoint="0%,0%" EndPoint="100%,100%"> | ||
<GradientStop Color="{DynamicResource SukiAccentColor5}" Offset="0"></GradientStop> | ||
<GradientStop Color="{DynamicResource SukiPrimaryColor7}" Offset="1"></GradientStop> | ||
<Panel.Background> | ||
<LinearGradientBrush StartPoint="0%,0%" EndPoint="100%,100%"> | ||
<GradientStop Offset="0" Color="{DynamicResource SukiAccentColor3}" /> | ||
<GradientStop Offset="1" Color="{DynamicResource SukiPrimaryColor15}" /> | ||
|
||
</LinearGradientBrush> | ||
</Panel.Background> | ||
</Panel> | ||
<StackPanel> | ||
<TextBlock Margin="0,60,0,0" Text="{TemplateBinding Title}" FontWeight="DemiBold" FontSize="26" HorizontalAlignment="Center" Foreground="{DynamicResource SukiText}"></TextBlock> | ||
<ContentPresenter Margin="30,20,30,30" Content="{TemplateBinding Content}" FontWeight="DemiBold" TextWrapping="Wrap" Foreground="{DynamicResource SukiLowText}"></ContentPresenter> | ||
<StackPanel IsVisible="{TemplateBinding ShowActionButton}" Orientation="Horizontal" Spacing="15" Margin="0,0,30,30" HorizontalAlignment="Right"> | ||
|
||
<Button Name="ButtonAction" Classes="Flat" Content="{TemplateBinding ActionButtonContent}"></Button> | ||
</StackPanel> | ||
</StackPanel> | ||
</Panel> | ||
</Border> | ||
</Border> | ||
|
||
<Border CornerRadius="50" Margin="0,50,0,0" Height="60" Width="70" HorizontalAlignment="Center" VerticalAlignment="Top" BoxShadow="{DynamicResource SukiBigPopupShadow}"></Border> | ||
<Border | ||
Margin="0,20,0,0" Background="#fafafa" Width="100" Height="100" CornerRadius="50" VerticalAlignment="Top" HorizontalAlignment="Center"> | ||
<Border CornerRadius="50" ClipToBounds="True"> | ||
<Panel> | ||
<Panel Opacity="1" Background="{TemplateBinding Foreground}"> | ||
|
||
</Panel> | ||
|
||
<PathIcon Width="28" Margin="0,0,0,0" | ||
Height="28" HorizontalAlignment="Center" VerticalAlignment="Center" | ||
Data="{TemplateBinding Icon}" | ||
Foreground="White" /> | ||
</LinearGradientBrush> | ||
</Panel.Background> | ||
|
||
</Panel> | ||
|
||
</Panel> | ||
</Border> | ||
</Border> | ||
</Panel> | ||
<Panel IsVisible="{DynamicResource IsLight}"> | ||
<Panel.Background> | ||
<LinearGradientBrush StartPoint="0%,0%" EndPoint="100%,100%"> | ||
<GradientStop Offset="0" Color="{DynamicResource SukiAccentColor5}" /> | ||
<GradientStop Offset="1" Color="{DynamicResource SukiPrimaryColor7}" /> | ||
|
||
</LinearGradientBrush> | ||
</Panel.Background> | ||
</Panel> | ||
<StackPanel> | ||
<TextBlock Margin="0,60,0,0" | ||
HorizontalAlignment="Center" | ||
FontSize="26" | ||
FontWeight="{DynamicResource DefaultDemiBold}" | ||
Foreground="{DynamicResource SukiText}" | ||
Text="{TemplateBinding Title}" /> | ||
<ContentPresenter Margin="30,20,30,30" | ||
Content="{TemplateBinding Content}" | ||
FontWeight="{DynamicResource DefaultDemiBold}" | ||
Foreground="{DynamicResource SukiLowText}" | ||
TextWrapping="Wrap" /> | ||
<StackPanel Margin="0,0,30,30" | ||
HorizontalAlignment="Right" | ||
IsVisible="{TemplateBinding ShowActionButton}" | ||
Orientation="Horizontal" | ||
Spacing="15"> | ||
|
||
<Button Name="ButtonAction" | ||
Classes="Flat" | ||
Content="{TemplateBinding ActionButtonContent}" /> | ||
</StackPanel> | ||
</StackPanel> | ||
</Panel> | ||
</Border> | ||
</Border> | ||
|
||
<Border Width="70" | ||
Height="60" | ||
Margin="0,50,0,0" | ||
HorizontalAlignment="Center" | ||
VerticalAlignment="Top" | ||
BoxShadow="{DynamicResource SukiBigPopupShadow}" | ||
CornerRadius="50" /> | ||
<Border Width="100" | ||
Height="100" | ||
Margin="0,20,0,0" | ||
HorizontalAlignment="Center" | ||
VerticalAlignment="Top" | ||
Background="#fafafa" | ||
CornerRadius="50"> | ||
<Border ClipToBounds="True" CornerRadius="50"> | ||
<Panel> | ||
<Panel Background="{TemplateBinding Foreground}" Opacity="1" /> | ||
|
||
<PathIcon Width="28" | ||
Height="28" | ||
Margin="0,0,0,0" | ||
HorizontalAlignment="Center" | ||
VerticalAlignment="Center" | ||
Data="{TemplateBinding Icon}" | ||
Foreground="White" /> | ||
|
||
</Panel> | ||
</Border> | ||
</Border> | ||
</Panel> | ||
</ControlTemplate> | ||
</Setter> | ||
</Style> | ||
</UserControl.Styles> | ||
</Style> | ||
</UserControl.Styles> | ||
</UserControl> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.