ux: tooltips and ToggleButton style (#1658)

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo
2025-08-04 17:28:04 +08:00
parent a35e25217b
commit 9eb3b68450
5 changed files with 22 additions and 1 deletions

View File

@@ -638,6 +638,7 @@
<x:String x:Key="Text.Repository.Continue" xml:space="preserve">CONTINUE</x:String>
<x:String x:Key="Text.Repository.CustomActions" xml:space="preserve">Custom Actions</x:String>
<x:String x:Key="Text.Repository.CustomActions.Empty" xml:space="preserve">No Custom Actions</x:String>
<x:String x:Key="Text.Repository.Dashboard" xml:space="preserve">Dashboard</x:String>
<x:String x:Key="Text.Repository.DiscardAll" xml:space="preserve">Discard all changes</x:String>
<x:String x:Key="Text.Repository.Explore" xml:space="preserve">Open in File Browser</x:String>
<x:String x:Key="Text.Repository.Filter" xml:space="preserve">Search Branches/Tags/Submodules</x:String>

View File

@@ -642,6 +642,7 @@
<x:String x:Key="Text.Repository.Continue" xml:space="preserve">下一步</x:String>
<x:String x:Key="Text.Repository.CustomActions" xml:space="preserve">自定义操作</x:String>
<x:String x:Key="Text.Repository.CustomActions.Empty" xml:space="preserve">自定义操作未设置</x:String>
<x:String x:Key="Text.Repository.Dashboard" xml:space="preserve">主页</x:String>
<x:String x:Key="Text.Repository.DiscardAll" xml:space="preserve">放弃所有更改</x:String>
<x:String x:Key="Text.Repository.Explore" xml:space="preserve">在文件浏览器中打开</x:String>
<x:String x:Key="Text.Repository.Filter" xml:space="preserve">快速查找分支/标签/子模块</x:String>

View File

@@ -642,6 +642,7 @@
<x:String x:Key="Text.Repository.Continue" xml:space="preserve">下一步</x:String>
<x:String x:Key="Text.Repository.CustomActions" xml:space="preserve">自訂動作</x:String>
<x:String x:Key="Text.Repository.CustomActions.Empty" xml:space="preserve">沒有自訂的動作</x:String>
<x:String x:Key="Text.Repository.Dashboard" xml:space="preserve">主頁</x:String>
<x:String x:Key="Text.Repository.DiscardAll" xml:space="preserve">捨棄所有變更</x:String>
<x:String x:Key="Text.Repository.Explore" xml:space="preserve">在檔案瀏覽器中開啟</x:String>
<x:String x:Key="Text.Repository.Filter" xml:space="preserve">快速搜尋分支/標籤/子模組</x:String>

View File

@@ -1217,6 +1217,9 @@
<Style Selector="ToggleButton.line_path:checked /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Background" Value="Transparent"/>
</Style>
<Style Selector="ToggleButton.line_path:pointerover Path">
<Setter Property="Fill" Value="{DynamicResource Brush.Accent}"/>
</Style>
<Style Selector="ToggleButton.line_path:checked Path">
<Setter Property="Fill" Value="{DynamicResource Brush.Accent}"/>
</Style>
@@ -1268,13 +1271,14 @@
Fill="{DynamicResource Brush.FG1}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Opacity="0.65"/>
Opacity="0.8"/>
</Border>
</ControlTemplate>
</Setter>
<Style Selector="^:checked /template/ Path#ChevronPath">
<Setter Property="Fill" Value="{DynamicResource Brush.Accent}" />
<Setter Property="Opacity" Value="1"/>
</Style>
<Style Selector="^:pointerover /template/ Path#ChevronPath">

View File

@@ -24,6 +24,13 @@
Width="48"
GroupName="SearchGroup"
IsChecked="{Binding !IsSearching, Mode=OneWay}">
<ToolTip.Tip>
<TextBlock>
<Run Text="{DynamicResource Text.Repository.Dashboard}" Foreground="{DynamicResource Brush.FG1}"/>
<Run Text=" "/>
<Run Text="{OnPlatform Ctrl+Shift+H, macOS=⌘+⇧+H}" FontSize="11" Foreground="{DynamicResource MenuFlyoutItemKeyboardAcceleratorTextForeground}"/>
</TextBlock>
</ToolTip.Tip>
<Path Width="12" Height="12" Stretch="Fill" HorizontalAlignment="Center" Data="{StaticResource Icons.Home}"/>
</RadioButton>
@@ -31,6 +38,13 @@
Width="48"
GroupName="SearchGroup"
IsChecked="{Binding IsSearching, Mode=TwoWay}">
<ToolTip.Tip>
<TextBlock>
<Run Text="{DynamicResource Text.Repository.Search}" Foreground="{DynamicResource Brush.FG1}"/>
<Run Text=" "/>
<Run Text="{OnPlatform Ctrl+F, macOS=⌘+F}" FontSize="11" Foreground="{DynamicResource MenuFlyoutItemKeyboardAcceleratorTextForeground}"/>
</TextBlock>
</ToolTip.Tip>
<Path Width="12" Height="12" Stretch="Fill" HorizontalAlignment="Center" Data="{StaticResource Icons.Search}"/>
</RadioButton>
</StackPanel>