Skip to content

Commit 9eb3b68

Browse files
committed
ux: tooltips and ToggleButton style (#1658)
Signed-off-by: leo <[email protected]>
1 parent a35e252 commit 9eb3b68

File tree

5 files changed

+22
-1
lines changed

5 files changed

+22
-1
lines changed

src/Resources/Locales/en_US.axaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,7 @@
638638
<x:String x:Key="Text.Repository.Continue" xml:space="preserve">CONTINUE</x:String>
639639
<x:String x:Key="Text.Repository.CustomActions" xml:space="preserve">Custom Actions</x:String>
640640
<x:String x:Key="Text.Repository.CustomActions.Empty" xml:space="preserve">No Custom Actions</x:String>
641+
<x:String x:Key="Text.Repository.Dashboard" xml:space="preserve">Dashboard</x:String>
641642
<x:String x:Key="Text.Repository.DiscardAll" xml:space="preserve">Discard all changes</x:String>
642643
<x:String x:Key="Text.Repository.Explore" xml:space="preserve">Open in File Browser</x:String>
643644
<x:String x:Key="Text.Repository.Filter" xml:space="preserve">Search Branches/Tags/Submodules</x:String>

src/Resources/Locales/zh_CN.axaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -642,6 +642,7 @@
642642
<x:String x:Key="Text.Repository.Continue" xml:space="preserve">下一步</x:String>
643643
<x:String x:Key="Text.Repository.CustomActions" xml:space="preserve">自定义操作</x:String>
644644
<x:String x:Key="Text.Repository.CustomActions.Empty" xml:space="preserve">自定义操作未设置</x:String>
645+
<x:String x:Key="Text.Repository.Dashboard" xml:space="preserve">主页</x:String>
645646
<x:String x:Key="Text.Repository.DiscardAll" xml:space="preserve">放弃所有更改</x:String>
646647
<x:String x:Key="Text.Repository.Explore" xml:space="preserve">在文件浏览器中打开</x:String>
647648
<x:String x:Key="Text.Repository.Filter" xml:space="preserve">快速查找分支/标签/子模块</x:String>

src/Resources/Locales/zh_TW.axaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -642,6 +642,7 @@
642642
<x:String x:Key="Text.Repository.Continue" xml:space="preserve">下一步</x:String>
643643
<x:String x:Key="Text.Repository.CustomActions" xml:space="preserve">自訂動作</x:String>
644644
<x:String x:Key="Text.Repository.CustomActions.Empty" xml:space="preserve">沒有自訂的動作</x:String>
645+
<x:String x:Key="Text.Repository.Dashboard" xml:space="preserve">主頁</x:String>
645646
<x:String x:Key="Text.Repository.DiscardAll" xml:space="preserve">捨棄所有變更</x:String>
646647
<x:String x:Key="Text.Repository.Explore" xml:space="preserve">在檔案瀏覽器中開啟</x:String>
647648
<x:String x:Key="Text.Repository.Filter" xml:space="preserve">快速搜尋分支/標籤/子模組</x:String>

src/Resources/Styles.axaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1217,6 +1217,9 @@
12171217
<Style Selector="ToggleButton.line_path:checked /template/ ContentPresenter#PART_ContentPresenter">
12181218
<Setter Property="Background" Value="Transparent"/>
12191219
</Style>
1220+
<Style Selector="ToggleButton.line_path:pointerover Path">
1221+
<Setter Property="Fill" Value="{DynamicResource Brush.Accent}"/>
1222+
</Style>
12201223
<Style Selector="ToggleButton.line_path:checked Path">
12211224
<Setter Property="Fill" Value="{DynamicResource Brush.Accent}"/>
12221225
</Style>
@@ -1268,13 +1271,14 @@
12681271
Fill="{DynamicResource Brush.FG1}"
12691272
HorizontalAlignment="Center"
12701273
VerticalAlignment="Center"
1271-
Opacity="0.65"/>
1274+
Opacity="0.8"/>
12721275
</Border>
12731276
</ControlTemplate>
12741277
</Setter>
12751278

12761279
<Style Selector="^:checked /template/ Path#ChevronPath">
12771280
<Setter Property="Fill" Value="{DynamicResource Brush.Accent}" />
1281+
<Setter Property="Opacity" Value="1"/>
12781282
</Style>
12791283

12801284
<Style Selector="^:pointerover /template/ Path#ChevronPath">

src/Views/Repository.axaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,27 @@
2424
Width="48"
2525
GroupName="SearchGroup"
2626
IsChecked="{Binding !IsSearching, Mode=OneWay}">
27+
<ToolTip.Tip>
28+
<TextBlock>
29+
<Run Text="{DynamicResource Text.Repository.Dashboard}" Foreground="{DynamicResource Brush.FG1}"/>
30+
<Run Text=" "/>
31+
<Run Text="{OnPlatform Ctrl+Shift+H, macOS=⌘+⇧+H}" FontSize="11" Foreground="{DynamicResource MenuFlyoutItemKeyboardAcceleratorTextForeground}"/>
32+
</TextBlock>
33+
</ToolTip.Tip>
2734
<Path Width="12" Height="12" Stretch="Fill" HorizontalAlignment="Center" Data="{StaticResource Icons.Home}"/>
2835
</RadioButton>
2936

3037
<RadioButton Classes="switch_button"
3138
Width="48"
3239
GroupName="SearchGroup"
3340
IsChecked="{Binding IsSearching, Mode=TwoWay}">
41+
<ToolTip.Tip>
42+
<TextBlock>
43+
<Run Text="{DynamicResource Text.Repository.Search}" Foreground="{DynamicResource Brush.FG1}"/>
44+
<Run Text=" "/>
45+
<Run Text="{OnPlatform Ctrl+F, macOS=⌘+F}" FontSize="11" Foreground="{DynamicResource MenuFlyoutItemKeyboardAcceleratorTextForeground}"/>
46+
</TextBlock>
47+
</ToolTip.Tip>
3448
<Path Width="12" Height="12" Stretch="Fill" HorizontalAlignment="Center" Data="{StaticResource Icons.Search}"/>
3549
</RadioButton>
3650
</StackPanel>

0 commit comments

Comments
 (0)