Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix various issues. #551

Merged
merged 3 commits into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions demo/Ursa.Demo/Views/TitleBarRightContent.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
<StackPanel Orientation="Horizontal">
<Button
Padding="8"
Width="32"
Height="32"
Theme="{DynamicResource BorderlessButton}"
Click="OpenRepository">
<PathIcon
Expand Down
16 changes: 8 additions & 8 deletions src/Ursa.Themes.Semi/Controls/Calendar.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,8 @@
Foreground="{TemplateBinding Foreground}"
Theme="{DynamicResource BorderlessButton}">
<PathIcon
Width="{DynamicResource CalenderViewPathIconWidth}"
Height="{DynamicResource CalenderViewPathIconHeight}"
Theme="{StaticResource InnerPathIcon}"
Classes="Large"
Data="{DynamicResource CalendarViewFastForwardGlyph}"
Foreground="{DynamicResource CalendarItemIconForeground}" />
</Button>
Expand All @@ -219,8 +219,8 @@
Foreground="{TemplateBinding Foreground}"
Theme="{DynamicResource BorderlessButton}">
<PathIcon
Width="{DynamicResource CalenderViewPathIconWidth}"
Height="{DynamicResource CalenderViewPathIconHeight}"
Theme="{StaticResource InnerPathIcon}"
Classes="Large"
Data="{DynamicResource CalendarItemPreviousIconGlyph}"
Foreground="{DynamicResource CalendarItemIconForeground}" />
</Button>
Expand Down Expand Up @@ -253,8 +253,8 @@
Foreground="{TemplateBinding Foreground}"
Theme="{DynamicResource BorderlessButton}">
<PathIcon
Width="{DynamicResource CalenderViewPathIconWidth}"
Height="{DynamicResource CalenderViewPathIconHeight}"
Theme="{StaticResource InnerPathIcon}"
Classes="Large"
Data="{DynamicResource CalendarItemNextIconGlyph}"
Foreground="{DynamicResource CalendarItemIconForeground}" />
</Button>
Expand All @@ -265,8 +265,8 @@
Foreground="{TemplateBinding Foreground}"
Theme="{DynamicResource BorderlessButton}">
<PathIcon
Width="{DynamicResource CalenderViewPathIconWidth}"
Height="{DynamicResource CalenderViewPathIconHeight}"
Theme="{StaticResource InnerPathIcon}"
Classes="Large"
Data="{DynamicResource CalendarViewFastBackwardGlyph}"
Foreground="{DynamicResource CalendarItemIconForeground}" />
</Button>
Expand Down
2 changes: 1 addition & 1 deletion src/Ursa.Themes.Semi/Controls/DialogShared.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</Design.PreviewWith>

<ControlTheme x:Key="OverlayCloseButton" TargetType="Button">
<Setter Property="CornerRadius" Value="6" />
<Setter Property="CornerRadius" Value="3" />
<Setter Property="Height" Value="24" />
<Setter Property="Width" Value="24" />
<Setter Property="Padding" Value="4" />
Expand Down
1 change: 1 addition & 0 deletions src/Ursa.Themes.Semi/Controls/DualBadge.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
Name="{x:Static u:DualBadge.PART_ContentPresenter}"
Grid.Column="1"
TextElement.FontSize="{TemplateBinding FontSize}"
IsVisible="{TemplateBinding Content,Converter={x:Static ObjectConverters.IsNotNull}}"
Foreground="{TemplateBinding Foreground}"
Background="{TemplateBinding Background}"
Padding="{TemplateBinding Padding}"
Expand Down
3 changes: 1 addition & 2 deletions src/Ursa.Themes.Semi/Controls/NavMenu.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@
<PathIcon
Name="PART_ExpanderIcon"
Grid.Column="2"
Width="8"
Height="8"
Theme="{StaticResource InnerPathIcon}"
Margin="12,0"
Data="{DynamicResource NavigationMenuItemExpandIconGlyph}"
Foreground="{DynamicResource NavigationMenuItemExpandIconForeground}">
Expand Down
24 changes: 8 additions & 16 deletions src/Ursa.Themes.Semi/Controls/Pagination.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,14 @@
<StackPanel Orientation="Horizontal">
<u:PaginationButton Name="{x:Static u:Pagination.PART_PreviousButton}" u:DisabledAdorner.IsEnabled="True">
<PathIcon
Width="12"
Height="12"
Theme="{StaticResource InnerPathIcon}"
Data="{DynamicResource PaginationBackwardGlyph}"
Foreground="{DynamicResource PaginationButtonIconForeground}" />
</u:PaginationButton>
<StackPanel Name="{x:Static u:Pagination.PART_ButtonPanel}" Orientation="Horizontal" />
<u:PaginationButton Name="{x:Static u:Pagination.PART_NextButton}" u:DisabledAdorner.IsEnabled="True">
<PathIcon
Width="12"
Height="12"
Theme="{StaticResource InnerPathIcon}"
Data="{DynamicResource PaginationForwardGlyph}"
Foreground="{DynamicResource PaginationButtonIconForeground}" />
</u:PaginationButton>
Expand Down Expand Up @@ -58,8 +56,7 @@
<StackPanel Orientation="Horizontal">
<u:PaginationButton Name="{x:Static u:Pagination.PART_PreviousButton}" u:DisabledAdorner.IsEnabled="True">
<PathIcon
Width="12"
Height="12"
Theme="{StaticResource InnerPathIcon}"
Data="{DynamicResource PaginationBackwardGlyph}"
Foreground="{DynamicResource PaginationButtonIconForeground}" />
</u:PaginationButton>
Expand Down Expand Up @@ -92,8 +89,7 @@
</Grid>
<u:PaginationButton Name="{x:Static u:Pagination.PART_NextButton}" u:DisabledAdorner.IsEnabled="True">
<PathIcon
Width="12"
Height="12"
Theme="{StaticResource InnerPathIcon}"
Data="{DynamicResource PaginationForwardGlyph}"
Foreground="{DynamicResource PaginationButtonIconForeground}" />
</u:PaginationButton>
Expand Down Expand Up @@ -143,8 +139,7 @@
<Setter Property="Content">
<Template>
<PathIcon
Width="12"
Height="12"
Theme="{StaticResource InnerPathIcon}"
Data="{DynamicResource PaginationMoreGlyph}"
Foreground="{DynamicResource PaginationButtonIconForeground}" />
</Template>
Expand All @@ -153,8 +148,7 @@
<Setter Property="Content">
<Template>
<PathIcon
Width="12"
Height="12"
Theme="{StaticResource InnerPathIcon}"
Data="{DynamicResource PaginationFastBackwardGlyph}"
Foreground="{DynamicResource PaginationButtonIconForeground}" />
</Template>
Expand All @@ -165,8 +159,7 @@
<Setter Property="Content">
<Template>
<PathIcon
Width="12"
Height="12"
Theme="{StaticResource InnerPathIcon}"
Data="{DynamicResource PaginationMoreGlyph}"
Foreground="{DynamicResource PaginationButtonIconForeground}" />
</Template>
Expand All @@ -175,8 +168,7 @@
<Setter Property="Content">
<Template>
<PathIcon
Width="12"
Height="12"
Theme="{StaticResource InnerPathIcon}"
Data="{DynamicResource PaginationFastForwardGlyph}"
Foreground="{DynamicResource PaginationButtonIconForeground}" />
</Template>
Expand Down
8 changes: 3 additions & 5 deletions src/Ursa.Themes.Semi/Controls/ScrollToButton.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
<PathIcon
Name="PART_Icon"
Margin="8"
Width="12"
Height="12"
Theme="{StaticResource InnerPathIcon}"
Data="{DynamicResource ScrollToButtonIconGlyph}"
Foreground="{DynamicResource ButtonDefaultPrimaryForeground}" />
</Border>
Expand Down Expand Up @@ -61,8 +60,7 @@
<PathIcon
Name="PART_Icon"
Margin="8"
Width="12"
Height="12"
Theme="{StaticResource InnerPathIcon}"
Data="{DynamicResource ScrollToButtonIconGlyph}"
Foreground="{DynamicResource ButtonSolidForeground}" />
</Border>
Expand All @@ -89,4 +87,4 @@
<Setter Property="RenderTransform" Value="rotate(270deg)" />
</Style>
</ControlTheme>
</ResourceDictionary>
</ResourceDictionary>
4 changes: 2 additions & 2 deletions src/Ursa.Themes.Semi/Controls/TagInput.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@
<DockPanel LastChildFill="True">
<PathIcon
Name="{x:Static u:ClosableTag.PART_CloseButton}"
Width="8"
Height="8"
Theme="{StaticResource InnerPathIcon}"
Classes="Small"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Accept in this PR but subject to change. TagInput now have a default height 36, I need to update in the future and reduce it to 32.

Margin="4,0"
Background="Transparent"
Data="{DynamicResource ClosableTagCloseIconGlyph}"
Expand Down
9 changes: 5 additions & 4 deletions src/Ursa.Themes.Semi/Controls/ThemeSelector.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:u="https://irihi.tech/ursa">
<ControlTheme TargetType="u:ThemeToggleButton" x:Key="{x:Type u:ThemeToggleButton}">
<Setter Property="Padding" Value="8" />
<Setter Property="Width" Value="32" />
<Setter Property="Height" Value="32" />
<Setter Property="Template">
<ControlTemplate TargetType="u:ThemeToggleButton">
<Button
Padding="8"
FontWeight="Regular"
Name="{x:Static u:ThemeToggleButton.PART_ThemeButton}"
HorizontalAlignment="Center"
Theme="{DynamicResource BorderlessButton}">
Theme="{DynamicResource BorderlessButton}"
Padding="{TemplateBinding Padding}">
<PathIcon
Name="PART_Icon"
Theme="{StaticResource InnerPathIcon}"
Expand Down
30 changes: 14 additions & 16 deletions src/Ursa.Themes.Semi/Themes/Shared/NavigationMenu.axaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
<ResourceDictionary
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=netstandard">
<Geometry x:Key="NavigationMenuExpandIconGlyph">M5 2H19C20.6569 2 22 3.34315 22 5V19C22 20.6569 20.6569 22 19 22H5C3.34315 22 2 20.6569 2 19V5C2 3.34315 3.34315 2 5 2ZM6 4C5.44772 4 5 4.44772 5 5V19C5 19.5523 5.44772 20 6 20H9C9.55229 20 10 19.5523 10 19V5C10 4.44772 9.55229 4 9 4H6Z</Geometry>
<Geometry x:Key="NavigationMenuItemExpandIconGlyph">M4.08045 7.59809C4.66624 7.01231 5.61599 7.01231 6.20177 7.59809L11.8586 13.2549L17.5155 7.59809C18.1013 7.01231 19.051 7.01231 19.6368 7.59809C20.2226 8.18388 20.2226 9.13363 19.6368 9.71941L12.9193 16.4369C12.3335 17.0227 11.3838 17.0227 10.798 16.4369L4.08045 9.71941C3.49467 9.13363 3.49467 8.18388 4.08045 7.59809Z</Geometry>
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<StaticResource x:Key="NavigationMenuItemExpandIconGlyph" ResourceKey="SemiIconChevronDown" />

<sys:Double x:Key="NavigationMenuExpandWidth">260</sys:Double>
<sys:Double x:Key="NavigationMenuClosedWidth">80</sys:Double>
<sys:Double x:Key="NavigationMenuExpandIconWidth">16</sys:Double>
<sys:Double x:Key="NavigationMenuExpandIconHeight">16</sys:Double>
<x:Double x:Key="NavigationMenuExpandWidth">260</x:Double>
<x:Double x:Key="NavigationMenuClosedWidth">80</x:Double>
<x:Double x:Key="NavigationMenuExpandIconWidth">16</x:Double>
<x:Double x:Key="NavigationMenuExpandIconHeight">16</x:Double>

<sys:Double x:Key="NavigationMenuItemIconMinWidth">24</sys:Double>
<sys:Double x:Key="NavigationMenuItemExpandIconWidth">8</sys:Double>
<sys:Double x:Key="NavigationMenuItemExpandIconHeight">8</sys:Double>
<x:Double x:Key="NavigationMenuItemIconMinWidth">24</x:Double>
<x:Double x:Key="NavigationMenuItemExpandIconWidth">8</x:Double>
<x:Double x:Key="NavigationMenuItemExpandIconHeight">8</x:Double>
<Thickness x:Key="NavigationMenuItemIconMargin">0</Thickness>
<sys:Double x:Key="NavigationMenuItemCollapsedHeight">0</sys:Double>
<sys:Double x:Key="NavigationMenuItemCollapsedOpacity">0</sys:Double>
<x:Double x:Key="NavigationMenuItemCollapsedHeight">0</x:Double>
<x:Double x:Key="NavigationMenuItemCollapsedOpacity">0</x:Double>

<sys:Double x:Key="NavigationMenuSeparatorHeaderFontSize">12</sys:Double>
<sys:Double x:Key="NavigationMenuSeparatorBorderHeight">1</sys:Double>
<sys:Double x:Key="NavigationMenuSeparatorClosedWidth">32</sys:Double>
<x:Double x:Key="NavigationMenuSeparatorHeaderFontSize">12</x:Double>
<x:Double x:Key="NavigationMenuSeparatorBorderHeight">1</x:Double>
<x:Double x:Key="NavigationMenuSeparatorClosedWidth">32</x:Double>


<Thickness x:Key="NavigationMenuHeaderMargin">12</Thickness>
Expand Down
Loading