Skip to content

Commit

Permalink
Merge pull request #261 from YJammak/main
Browse files Browse the repository at this point in the history
Use DefaultDemiBold to set the DemiBold in the style to avoid blurring caused by being too thick in some fonts
  • Loading branch information
kikipoulet authored Aug 6, 2024
2 parents 9f4e3c6 + 11aa6e3 commit 5252b5e
Show file tree
Hide file tree
Showing 24 changed files with 415 additions and 307 deletions.
2 changes: 1 addition & 1 deletion SukiUI/Controls/BusyArea.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
LastChildFill="True">
<TextBlock Margin="10"
DockPanel.Dock="Bottom"
FontWeight="DemiBold"
FontWeight="{DynamicResource DefaultDemiBold}"
IsVisible="{TemplateBinding BusyText,
Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
Text="{TemplateBinding BusyText}" />
Expand Down
17 changes: 10 additions & 7 deletions SukiUI/Controls/InfoBadge.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
Height="400"
Margin="0,20,0,0"
Spacing="20">
<controls:InfoBadge Appearance="Info" Header="Info"
<controls:InfoBadge Appearance="Info"
CornerPosition="TopRight"
>
Header="Info">

<Button Content="Log In" />
</controls:InfoBadge>
<controls:InfoBadge Appearance="Warning"
Expand Down Expand Up @@ -72,14 +72,17 @@
CornerRadius="{TemplateBinding CornerRadius}"
IsVisible="{Binding !!Header, RelativeSource={RelativeSource TemplatedParent}}"
UseLayoutRounding="False">
<ContentPresenter Name="PART_HeaderPresenter" Margin="2"
HorizontalAlignment="Center" FontWeight="DemiBold"
VerticalAlignment="Center" Foreground="White"
<ContentPresenter Name="PART_HeaderPresenter"
Margin="2"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Focusable="False"
FontWeight="{DynamicResource DefaultDemiBold}"
Foreground="White"
IsTabStop="False">
<ContentPresenter.Styles>
<Style Selector="TextBlock">
<Setter Property="FontSize" Value="13"></Setter>
<Setter Property="FontSize" Value="13" />
</Style>
</ContentPresenter.Styles>
<ContentPresenter.Content>
Expand Down
151 changes: 92 additions & 59 deletions SukiUI/Controls/MessageBox.axaml
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>
12 changes: 7 additions & 5 deletions SukiUI/Controls/SettingsLayout.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
</Style>

<Style Selector="RadioButton.MenuChip:checked">
<Setter Property="TextBlock.FontWeight" Value="DemiBold" />
<Setter Property="TextBlock.FontWeight" Value="{DynamicResource DefaultDemiBold}" />

<Setter Property="BorderThickness" Value="0,0,0,0" />
<Setter Property="BorderBrush" Value="{DynamicResource SukiPrimaryColor}" />
Expand All @@ -72,7 +72,7 @@


<Style Selector="RadioButton.MenuChip:checked TextBlock">
<Setter Property="FontWeight" Value="DemiBold" />
<Setter Property="FontWeight" Value="{DynamicResource DefaultDemiBold}" />
<Setter Property="Foreground" Value="{DynamicResource SukiPrimaryColor}" />
</Style>

Expand Down Expand Up @@ -102,7 +102,7 @@

</Setter>

<Setter Property="TextBlock.FontWeight" Value="DemiBold" />
<Setter Property="TextBlock.FontWeight" Value="{DynamicResource DefaultDemiBold}" />
<Setter Property="TextBlock.Foreground" Value="{DynamicResource SukiPrimaryColor}" />
<Setter Property="Background" Value="{DynamicResource SukiPrimaryColor10}" />
<Setter Property="BorderBrush" Value="{DynamicResource SukiPrimaryColor}" />
Expand All @@ -128,8 +128,10 @@
Margin="0,25,0,0"
HorizontalAlignment="Left"
DockPanel.Dock="Left" />
<ScrollViewer Classes="Stack" Name="MyScroll">
<StackPanel theme:StackPanelExtensions.AnimatedScroll="True" Name="StackItems" Margin="-10,0" />
<ScrollViewer Name="MyScroll" Classes="Stack">
<StackPanel Name="StackItems"
Margin="-10,0"
theme:StackPanelExtensions.AnimatedScroll="True" />
</ScrollViewer>
</DockPanel>
</ControlTemplate>
Expand Down
Loading

0 comments on commit 5252b5e

Please sign in to comment.