Skip to content

Commit 5e4d748

Browse files
committed
use stackpanel instead of grid for those icons
1 parent cc1cb06 commit 5e4d748

File tree

1 file changed

+48
-52
lines changed

1 file changed

+48
-52
lines changed

src/Views/Repository.axaml

Lines changed: 48 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -83,59 +83,14 @@
8383
</ListBox.ItemsPanel>
8484

8585
<ListBoxItem>
86-
<Grid Classes="view_mode" ColumnDefinitions="Auto,*,Auto,Auto,Auto,Auto,Auto,Auto">
86+
<Grid Classes="view_mode" ColumnDefinitions="Auto,*,Auto,Auto">
8787
<Path Grid.Column="0" Classes="icon" Data="{StaticResource Icons.Histories}"/>
8888
<TextBlock Grid.Column="1" Classes="header" Text="{DynamicResource Text.Histories}"/>
89-
90-
<ToggleButton Grid.Column="2"
91-
Classes="line_path"
92-
Width="26" Height="26"
93-
Background="Transparent"
94-
IsChecked="{Binding EnableReflog, Mode=TwoWay}">
95-
<ToolTip.Tip>
96-
<TextBlock>
97-
<Run Text="{DynamicResource Text.Repository.ShowLostCommits}"/>
98-
<Run Text=" "/>
99-
<Run Text="--reflog" FontSize="11" Foreground="{DynamicResource MenuFlyoutItemKeyboardAcceleratorTextForeground}"/>
100-
</TextBlock>
101-
</ToolTip.Tip>
102-
<Path Width="12" Height="12" Data="{StaticResource Icons.Reference}"/>
103-
</ToggleButton>
104-
<ToggleButton Grid.Column="3"
105-
Classes="line_path"
106-
Width="26" Height="26"
107-
Background="Transparent"
108-
IsChecked="{Binding EnableFirstParentInHistories, Mode=TwoWay}">
109-
<ToolTip.Tip>
110-
<TextBlock>
111-
<Run Text="{DynamicResource Text.Repository.ShowFirstParentOnly}"/>
112-
<Run Text=" "/>
113-
<Run Text="--first-parent" FontSize="11" Foreground="{DynamicResource MenuFlyoutItemKeyboardAcceleratorTextForeground}"/>
114-
</TextBlock>
115-
</ToolTip.Tip>
116-
<Path Width="12" Height="12" Data="{StaticResource Icons.FirstParentFilter}"/>
117-
</ToggleButton>
118-
<ToggleButton Grid.Column="4"
119-
Classes="line_path"
120-
Width="26" Height="26"
121-
Background="Transparent"
122-
IsChecked="{Binding OnlyHighlightCurrentBranchInHistories, Mode=TwoWay}"
123-
ToolTip.Tip="{DynamicResource Text.Repository.OnlyHighlightCurrentBranchInGraph}">
124-
<Path Width="12" Height="12" Data="{StaticResource Icons.LightOn}"/>
125-
</ToggleButton>
126-
<ToggleButton Grid.Column="5"
127-
Classes="line_path"
128-
Width="26" Height="26"
129-
Background="Transparent"
130-
IsChecked="{Binding Source={x:Static vm:Preferences.Instance}, Path=DisplayTimeAsPeriodInHistories, Mode=TwoWay}"
131-
ToolTip.Tip="{DynamicResource Text.Repository.UseRelativeTimeInGraph}">
132-
<Path Width="12" Height="12" Data="{StaticResource Icons.Stopwatch}"/>
133-
</ToggleButton>
134-
<ToggleButton Grid.Column="6"
135-
Classes="line_path"
136-
Width="26" Height="26"
137-
Background="Transparent"
138-
IsChecked="{Binding SimplifyByDecoration, Mode=TwoWay}">
89+
<StackPanel Grid.Column="2" Orientation="Horizontal">
90+
<ToggleButton Classes="line_path"
91+
Width="26" Height="26"
92+
Background="Transparent"
93+
IsChecked="{Binding SimplifyByDecoration, Mode=TwoWay}">
13994
<ToolTip.Tip>
14095
<TextBlock>
14196
<Run Text="{DynamicResource Text.Repository.SimplifyByDecoration}"/>
@@ -145,7 +100,48 @@
145100
</ToolTip.Tip>
146101
<Path Width="12" Height="12" Data="{StaticResource Icons.Tree}"/>
147102
</ToggleButton>
148-
<Button Grid.Column="7"
103+
<ToggleButton Classes="line_path"
104+
Width="26" Height="26"
105+
Background="Transparent"
106+
IsChecked="{Binding EnableReflog, Mode=TwoWay}">
107+
<ToolTip.Tip>
108+
<TextBlock>
109+
<Run Text="{DynamicResource Text.Repository.ShowLostCommits}"/>
110+
<Run Text=" "/>
111+
<Run Text="--reflog" FontSize="11" Foreground="{DynamicResource MenuFlyoutItemKeyboardAcceleratorTextForeground}"/>
112+
</TextBlock>
113+
</ToolTip.Tip>
114+
<Path Width="12" Height="12" Data="{StaticResource Icons.Reference}"/>
115+
</ToggleButton>
116+
<ToggleButton Classes="line_path"
117+
Width="26" Height="26"
118+
Background="Transparent"
119+
IsChecked="{Binding EnableFirstParentInHistories, Mode=TwoWay}">
120+
<ToolTip.Tip>
121+
<TextBlock>
122+
<Run Text="{DynamicResource Text.Repository.ShowFirstParentOnly}"/>
123+
<Run Text=" "/>
124+
<Run Text="--first-parent" FontSize="11" Foreground="{DynamicResource MenuFlyoutItemKeyboardAcceleratorTextForeground}"/>
125+
</TextBlock>
126+
</ToolTip.Tip>
127+
<Path Width="12" Height="12" Data="{StaticResource Icons.FirstParentFilter}"/>
128+
</ToggleButton>
129+
<ToggleButton Classes="line_path"
130+
Width="26" Height="26"
131+
Background="Transparent"
132+
IsChecked="{Binding OnlyHighlightCurrentBranchInHistories, Mode=TwoWay}"
133+
ToolTip.Tip="{DynamicResource Text.Repository.OnlyHighlightCurrentBranchInGraph}">
134+
<Path Width="12" Height="12" Data="{StaticResource Icons.LightOn}"/>
135+
</ToggleButton>
136+
<ToggleButton Classes="line_path"
137+
Width="26" Height="26"
138+
Background="Transparent"
139+
IsChecked="{Binding Source={x:Static vm:Preferences.Instance}, Path=DisplayTimeAsPeriodInHistories, Mode=TwoWay}"
140+
ToolTip.Tip="{DynamicResource Text.Repository.UseRelativeTimeInGraph}">
141+
<Path Width="12" Height="12" Data="{StaticResource Icons.Stopwatch}"/>
142+
</ToggleButton>
143+
</StackPanel>
144+
<Button Grid.Column="3"
149145
Classes="icon_button"
150146
Width="26" Height="26"
151147
Click="OnOpenAdvancedHistoriesOption">

0 commit comments

Comments
 (0)