Skip to content

Commit cb9110b

Browse files
committed
ux: new style for repository sub-view switcher
1 parent 4fc32b2 commit cb9110b

File tree

2 files changed

+28
-12
lines changed

2 files changed

+28
-12
lines changed

src/Resources/Locales/en_US.axaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@
341341
<x:String x:Key="Text.GitLFS.Remote" xml:space="preserve">Remote:</x:String>
342342
<x:String x:Key="Text.GitLFS.Track" xml:space="preserve">Track files named '{0}'</x:String>
343343
<x:String x:Key="Text.GitLFS.TrackByExtension" xml:space="preserve">Track all *{0} files</x:String>
344-
<x:String x:Key="Text.Histories" xml:space="preserve">Histories</x:String>
344+
<x:String x:Key="Text.Histories" xml:space="preserve">HISTORY</x:String>
345345
<x:String x:Key="Text.Histories.DisplayMode" xml:space="preserve">Switch Horizontal/Vertical Layout</x:String>
346346
<x:String x:Key="Text.Histories.Header.Author" xml:space="preserve">AUTHOR</x:String>
347347
<x:String x:Key="Text.Histories.Header.AuthorTime" xml:space="preserve">AUTHOR TIME</x:String>
@@ -621,7 +621,7 @@
621621
<x:String x:Key="Text.StashCM.Pop" xml:space="preserve">Pop</x:String>
622622
<x:String x:Key="Text.StashDropConfirm" xml:space="preserve">Drop Stash</x:String>
623623
<x:String x:Key="Text.StashDropConfirm.Label" xml:space="preserve">Drop:</x:String>
624-
<x:String x:Key="Text.Stashes" xml:space="preserve">Stashes</x:String>
624+
<x:String x:Key="Text.Stashes" xml:space="preserve">STASHES</x:String>
625625
<x:String x:Key="Text.Stashes.Changes" xml:space="preserve">CHANGES</x:String>
626626
<x:String x:Key="Text.Stashes.Stashes" xml:space="preserve">STASHES</x:String>
627627
<x:String x:Key="Text.Statistics" xml:space="preserve">Statistics</x:String>
@@ -668,7 +668,7 @@
668668
<x:String x:Key="Text.Welcome.ScanDefaultCloneDir" xml:space="preserve">Rescan Repositories in Default Clone Dir</x:String>
669669
<x:String x:Key="Text.Welcome.Search" xml:space="preserve">Search Repositories...</x:String>
670670
<x:String x:Key="Text.Welcome.Sort" xml:space="preserve">Sort</x:String>
671-
<x:String x:Key="Text.WorkingCopy" xml:space="preserve">Changes</x:String>
671+
<x:String x:Key="Text.WorkingCopy" xml:space="preserve">LOCAL CHANGES</x:String>
672672
<x:String x:Key="Text.WorkingCopy.AddToGitIgnore" xml:space="preserve">Git Ignore</x:String>
673673
<x:String x:Key="Text.WorkingCopy.AddToGitIgnore.Extension" xml:space="preserve">Ignore all *{0} files</x:String>
674674
<x:String x:Key="Text.WorkingCopy.AddToGitIgnore.ExtensionInSameFolder" xml:space="preserve">Ignore *{0} files in the same folder</x:String>

src/Views/Repository.axaml

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,16 @@
4242
<Border CornerRadius="6" ClipToBounds="True">
4343
<ListBox Background="Transparent" SelectedIndex="{Binding SelectedViewIndex, Mode=TwoWay}">
4444
<ListBox.Styles>
45+
<Style Selector="Path.icon">
46+
<Setter Property="Width" Value="12"/>
47+
<Setter Property="Height" Value="12"/>
48+
<Setter Property="Margin" Value="8,0,6,0"/>
49+
<Setter Property="Fill" Value="{DynamicResource Brush.FG2}"/>
50+
</Style>
51+
<Style Selector="TextBlock.header">
52+
<Setter Property="Foreground" Value="{DynamicResource Brush.FG2}"/>
53+
<Setter Property="FontWeight" Value="Bold"/>
54+
</Style>
4555
<Style Selector="ListBoxItem">
4656
<Setter Property="Height" Value="28"/>
4757
<Setter Property="Margin" Value="0"/>
@@ -58,6 +68,12 @@
5868
<Style Selector="ListBoxItem:selected Grid.view_mode">
5969
<Setter Property="Background" Value="{DynamicResource Brush.AccentHovered}"/>
6070
</Style>
71+
<Style Selector="ListBoxItem:selected TextBlock.header">
72+
<Setter Property="Foreground" Value="{DynamicResource Brush.FG1}"/>
73+
</Style>
74+
<Style Selector="ListBoxItem:selected Path.icon">
75+
<Setter Property="Fill" Value="{DynamicResource Brush.FG1}"/>
76+
</Style>
6177
</ListBox.Styles>
6278

6379
<ListBox.ItemsPanel>
@@ -67,9 +83,9 @@
6783
</ListBox.ItemsPanel>
6884

6985
<ListBoxItem>
70-
<Grid Classes="view_mode" ColumnDefinitions="32,*,Auto,Auto,Auto,Auto">
71-
<Path Grid.Column="0" Width="12" Height="12" Data="{StaticResource Icons.Histories}"/>
72-
<TextBlock Grid.Column="1" Classes="primary" Text="{DynamicResource Text.Histories}"/>
86+
<Grid Classes="view_mode" ColumnDefinitions="Auto,*,Auto,Auto,Auto,Auto">
87+
<Path Grid.Column="0" Classes="icon" Data="{StaticResource Icons.Histories}"/>
88+
<TextBlock Grid.Column="1" Classes="header" Text="{DynamicResource Text.Histories}"/>
7389
<ToggleButton Grid.Column="2"
7490
Classes="layout_direction"
7591
Width="28" Height="26"
@@ -102,9 +118,9 @@
102118
</ListBoxItem>
103119

104120
<ListBoxItem>
105-
<Grid Classes="view_mode" ColumnDefinitions="32,*,Auto">
106-
<Path Grid.Column="0" Width="12" Height="12" Data="{StaticResource Icons.Changes}"/>
107-
<TextBlock Grid.Column="1" Classes="primary" Text="{DynamicResource Text.WorkingCopy}"/>
121+
<Grid Classes="view_mode" ColumnDefinitions="Auto,*,Auto">
122+
<Path Grid.Column="0" Classes="icon" Data="{StaticResource Icons.Changes}"/>
123+
<TextBlock Grid.Column="1" Classes="header" Text="{DynamicResource Text.WorkingCopy}"/>
108124
<v:CounterPresenter Grid.Column="2"
109125
Margin="6,0"
110126
VerticalAlignment="Center"
@@ -117,9 +133,9 @@
117133
</ListBoxItem>
118134

119135
<ListBoxItem>
120-
<Grid Classes="view_mode" ColumnDefinitions="32,*,Auto">
121-
<Path Grid.Column="0" Width="12" Height="12" Data="{StaticResource Icons.Stashes}"/>
122-
<TextBlock Grid.Column="1" Classes="primary" Text="{DynamicResource Text.Stashes}"/>
136+
<Grid Classes="view_mode" ColumnDefinitions="Auto,*,Auto">
137+
<Path Grid.Column="0" Classes="icon" Data="{StaticResource Icons.Stashes}"/>
138+
<TextBlock Grid.Column="1" Classes="header" Text="{DynamicResource Text.Stashes}"/>
123139
<v:CounterPresenter Grid.Column="2"
124140
Margin="6,0"
125141
VerticalAlignment="Center"

0 commit comments

Comments
 (0)