Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
kikipoulet committed Jul 5, 2024
2 parents 0666024 + 41cb4d1 commit 7fc9ffc
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 23 deletions.
26 changes: 21 additions & 5 deletions SukiUI/Controls/SukiSideMenu.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
HorizontalAlignment="{TemplateBinding TogglePaneButtonPosition}"
VerticalAlignment="Top"
Classes="Basic"
Cursor="Hand"
DockPanel.Dock="Top">
<Panel>
<PathIcon Name="PART_ExpandIcon"
Expand Down Expand Up @@ -81,12 +82,27 @@
</SplitView>
</ControlTemplate>
</Setter>
<Style Selector="^[IsToggleButtonVisible=False] /template/ Button#PART_SidebarToggleButton">
<Setter Property="Opacity" Value="0" />
<Setter Property="IsHitTestVisible" Value="False" />
<Style Selector="^[IsToggleButtonVisible=False]">
<Style Selector="^[IsMenuExpanded=False]">
<Style Selector="^ /template/ Button#PART_SidebarToggleButton">
<Setter Property="Opacity" Value="0" />
<Setter Property="IsVisible" Value="False" />
</Style>
</Style>
<Style Selector="^[IsMenuExpanded=True]">
<Style Selector="^ /template/ Button#PART_SidebarToggleButton">
<Setter Property="Opacity" Value="0" />
<Setter Property="IsHitTestVisible" Value="False" />
</Style>
</Style>
</Style>
<Style Selector="^[IsMenuExpanded=False] /template/ PathIcon#PART_ExpandIcon">
<Setter Property="RenderTransform" Value="rotate(-180deg)" />
<Style Selector="^[IsMenuExpanded=False]">
<Style Selector="^ /template/ PathIcon#PART_ExpandIcon">
<Setter Property="RenderTransform" Value="rotate(-180deg)" />
</Style>
<Style Selector="^ /template/ Grid#PART_Spacer">
<Setter Property="Height" Value="0" />
</Style>
</Style>
</ControlTheme>
<ControlTheme x:Key="{x:Type suki:SukiSideMenu}"
Expand Down
4 changes: 2 additions & 2 deletions SukiUI/Theme/Button.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<Setter Property="Background" Value="{DynamicResource SukiBackground}" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="HorizontalContentAlignment" Value="Center" />

<Setter Property="FontFamily" Value="{DynamicResource DefaultFontFamily}" />
<Setter Property="FontSize" Value="15" />
<Setter Property="Padding" Value="20,8" />
<Setter Property="Template">
Expand All @@ -36,7 +36,7 @@
<ContentPresenter HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
Content="{TemplateBinding Content}"
FontFamily="avares://SukiUI/CustomFont#Quicksand"
FontFamily="{TemplateBinding FontFamily}"
FontSize="{TemplateBinding FontSize}"
FontWeight="DemiBold"
RecognizesAccessKey="True" />
Expand Down
30 changes: 16 additions & 14 deletions SukiUI/Theme/DropDownButton.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="FontSize" Value="15" />
<Setter Property="Padding" Value="20,8" />
<Setter Property="FontWeight" Value="DemiBold"></Setter>
<Setter Property="FontFamily" Value="{DynamicResource DefaultFontFamily}" />
<Setter Property="FontWeight" Value="DemiBold" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
Expand All @@ -21,7 +22,7 @@
CornerRadius="{TemplateBinding CornerRadius}">
<Border.Transitions>
<Transitions>
<BrushTransition Property="BorderBrush" Duration="0:0:0.25"></BrushTransition>
<BrushTransition Property="BorderBrush" Duration="0:0:0.25" />
</Transitions>
</Border.Transitions>
<Grid Name="InnerGrid">
Expand All @@ -32,35 +33,36 @@

<ContentPresenter Name="PART_ContentPresenter"
Grid.Column="0"
FontFamily="{StaticResource QuicksandFont}"
FontWeight="{TemplateBinding FontWeight}"
Padding="{TemplateBinding Padding}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}"
RecognizesAccessKey="True" >
FontFamily="{TemplateBinding FontFamily}"
FontWeight="{TemplateBinding FontWeight}"
RecognizesAccessKey="True">
<ContentPresenter.Transitions>
<Transitions>
<BrushTransition Property="Foreground" Duration="0:0:0.25"></BrushTransition>
<BrushTransition Property="BorderBrush" Duration="0:0:0.25"></BrushTransition>
<BrushTransition Property="Foreground" Duration="0:0:0.25" />
<BrushTransition Property="BorderBrush" Duration="0:0:0.25" />
</Transitions>
</ContentPresenter.Transitions>
</ContentPresenter>

<PathIcon Grid.Column="1"
Width="12" Name="PART_Icon"
<PathIcon Name="PART_Icon"
Grid.Column="1"
Width="12"
Height="12"
Margin="0,0,10,0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Data="{x:Static content:Icons.ChevronDown}"
Foreground="{DynamicResource SukiText}"
IsHitTestVisible="False"
UseLayoutRounding="False" >
UseLayoutRounding="False">
<PathIcon.Transitions>
<Transitions>
<BrushTransition Property="Foreground" Duration="0:0:0.25"></BrushTransition>
<BrushTransition Property="Foreground" Duration="0:0:0.25" />
</Transitions>
</PathIcon.Transitions>
</PathIcon>
Expand All @@ -71,8 +73,8 @@
</Setter.Value>
</Setter>



<Style Selector="^:pointerover">
<Style Selector="^ /template/ TextBlock">
<Setter Property="Foreground" Value="{DynamicResource SukiPrimaryColor}" />
Expand All @@ -84,7 +86,7 @@
<Style Selector="^ /template/ Border">
<Setter Property="BorderBrush" Value="{DynamicResource SukiPrimaryColor}" />
</Style>

<Style Selector="^ /template/ PathIcon#PART_Icon">
<Setter Property="Foreground" Value="{DynamicResource SukiPrimaryColor}" />
</Style>
Expand Down
2 changes: 1 addition & 1 deletion SukiUI/Theme/Index.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<system:TimeSpan x:Key="ShortAnimationDuration">0.2</system:TimeSpan>
<Easing x:Key="MenuEasing">CircularEaseOut</Easing>

<FontFamily x:Key="QuicksandFont">avares://SukiUI/CustomFont#Quicksand</FontFamily>
<FontFamily x:Key="DefaultFontFamily">avares://SukiUI/CustomFont#Quicksand</FontFamily>

<ResourceDictionary.MergedDictionaries>
<ResourceInclude Source="avares://sukiUI/Theme/TextBlock.xaml" />
Expand Down
2 changes: 1 addition & 1 deletion SukiUI/Theme/TextBlock.xaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ControlTheme x:Key="SukiTextBlockStyle" TargetType="TextBlock">
<Setter Property="FontSize" Value="14" />
<Setter Property="FontFamily" Value="{StaticResource QuicksandFont}" />
<Setter Property="FontFamily" Value="{DynamicResource DefaultFontFamily}" />

<Style Selector="^.h4">
<Setter Property="Margin" Value="0 7 0 10" />
Expand Down

0 comments on commit 7fc9ffc

Please sign in to comment.