|
22 | 22 | <RowDefinition Height="*" MinHeight="100"/> |
23 | 23 | <RowDefinition Height="1"/> |
24 | 24 | <RowDefinition Height="*" MinHeight="100"/> |
25 | | - <RowDefinition Height="40" MinHeight="40" MaxHeight="40"/> |
26 | 25 | </Grid.RowDefinitions> |
27 | 26 |
|
28 | 27 | <!-- Search Filter --> |
29 | 28 | <Border Grid.Row="0" BorderThickness="0,0,0,1" BorderBrush="{DynamicResource Brush.Border0}"> |
30 | | - <TextBox x:Name="LocalChangesSearchBox" |
31 | | - Height="24" |
32 | | - Margin="4,0" |
33 | | - BorderThickness="1" |
34 | | - CornerRadius="12" |
35 | | - Text="{Binding Filter, Mode=TwoWay}" |
36 | | - BorderBrush="{DynamicResource Brush.Border2}" |
37 | | - Watermark="{DynamicResource Text.WorkingCopy.FilterChanges}" |
38 | | - VerticalContentAlignment="Center"> |
39 | | - <TextBox.InnerLeftContent> |
40 | | - <Path Width="14" Height="14" |
41 | | - Margin="6,0,0,0" |
42 | | - Fill="{DynamicResource Brush.FG2}" |
43 | | - Data="{StaticResource Icons.Search}"/> |
44 | | - </TextBox.InnerLeftContent> |
45 | | - |
46 | | - <TextBox.InnerRightContent> |
47 | | - <Button Classes="icon_button" |
48 | | - Width="16" |
49 | | - Margin="0,0,6,0" |
50 | | - Command="{Binding ClearFilter}" |
51 | | - IsVisible="{Binding Filter, Converter={x:Static StringConverters.IsNotNullOrEmpty}}" |
52 | | - HorizontalAlignment="Right"> |
| 29 | + <Grid ColumnDefinitions="Auto,*,Auto,Auto"> |
| 30 | + <ToggleButton Grid.Column="0" |
| 31 | + Classes="sidebar_expander" |
| 32 | + Width="32" |
| 33 | + VerticalAlignment="Center" |
| 34 | + IsChecked="{Binding Source={x:Static vm:Preferences.Instance}, Path=Layout.IsSidebarCollapsedInLocalChanges, Mode=TwoWay}" |
| 35 | + ToolTip.Placement="RightEdgeAlignedBottom"/> |
| 36 | + |
| 37 | + <TextBox Grid.Column="1" |
| 38 | + x:Name="LocalChangesSearchBox" |
| 39 | + Height="24" |
| 40 | + Margin="4,0" |
| 41 | + BorderThickness="1" |
| 42 | + CornerRadius="12" |
| 43 | + Text="{Binding Filter, Mode=TwoWay}" |
| 44 | + BorderBrush="{DynamicResource Brush.Border2}" |
| 45 | + Watermark="{DynamicResource Text.WorkingCopy.FilterChanges}" |
| 46 | + VerticalContentAlignment="Center"> |
| 47 | + <TextBox.InnerLeftContent> |
53 | 48 | <Path Width="14" Height="14" |
54 | | - Margin="0,1,0,0" |
55 | | - Fill="{DynamicResource Brush.FG1}" |
56 | | - Data="{StaticResource Icons.Clear}"/> |
57 | | - </Button> |
58 | | - </TextBox.InnerRightContent> |
59 | | - </TextBox> |
| 49 | + Margin="6,0,0,0" |
| 50 | + Fill="{DynamicResource Brush.FG2}" |
| 51 | + Data="{StaticResource Icons.Search}"/> |
| 52 | + </TextBox.InnerLeftContent> |
| 53 | + |
| 54 | + <TextBox.InnerRightContent> |
| 55 | + <Button Classes="icon_button" |
| 56 | + Width="16" |
| 57 | + Margin="0,0,6,0" |
| 58 | + Command="{Binding ClearFilter}" |
| 59 | + IsVisible="{Binding Filter, Converter={x:Static StringConverters.IsNotNullOrEmpty}}" |
| 60 | + HorizontalAlignment="Right"> |
| 61 | + <Path Width="14" Height="14" |
| 62 | + Margin="0,1,0,0" |
| 63 | + Fill="{DynamicResource Brush.FG1}" |
| 64 | + Data="{StaticResource Icons.Clear}"/> |
| 65 | + </Button> |
| 66 | + </TextBox.InnerRightContent> |
| 67 | + </TextBox> |
| 68 | + |
| 69 | + <Button Grid.Column="2" |
| 70 | + Classes="icon_button" |
| 71 | + VerticalAlignment="Center" |
| 72 | + Command="{Binding DiscardAllChanges}" |
| 73 | + ToolTip.Tip="{DynamicResource Text.WorkingCopy.DiscardAll}"> |
| 74 | + <Path Width="14" Height="14" Data="{StaticResource Icons.Undo}"/> |
| 75 | + </Button> |
| 76 | + |
| 77 | + <v:ChangeViewModeSwitcher Grid.Column="3" |
| 78 | + Width="26" |
| 79 | + VerticalAlignment="Center" |
| 80 | + ViewMode="{Binding Source={x:Static vm:Preferences.Instance}, Path=ChangeViewMode, Mode=TwoWay}"/> |
| 81 | + </Grid> |
60 | 82 | </Border> |
61 | 83 |
|
62 | 84 | <!-- Unstaged --> |
63 | 85 | <Grid Grid.Row="1" RowDefinitions="28,*"> |
64 | 86 | <!-- Unstaged Toolbar --> |
65 | 87 | <Border Grid.Row="0" BorderThickness="0,0,0,1" BorderBrush="{DynamicResource Brush.Border0}"> |
66 | | - <Grid ColumnDefinitions="Auto,Auto,Auto,*,Auto,Auto,Auto,Auto,Auto,Auto"> |
| 88 | + <Grid ColumnDefinitions="Auto,Auto,Auto,*,Auto,Auto,Auto,Auto,Auto"> |
67 | 89 | <Path Grid.Column="0" Margin="8,0,0,0" Width="14" Height="14" Fill="{DynamicResource Brush.FG2}" Data="{StaticResource Icons.Changes}"/> |
68 | 90 | <TextBlock Grid.Column="1" Foreground="{DynamicResource Brush.FG2}" FontWeight="Bold" Margin="4,0,0,0"> |
69 | 91 | <Run Text="{DynamicResource Text.WorkingCopy.Unstaged}"/> |
|
118 | 140 | Click="OnStageAllButtonClicked"> |
119 | 141 | <Path Width="14" Height="14" Data="{StaticResource Icons.DoubleDown}"/> |
120 | 142 | </Button> |
121 | | - <v:ChangeViewModeSwitcher Grid.Column="9" |
122 | | - Width="26" Height="14" |
123 | | - Margin="0,1,0,0" |
124 | | - ViewMode="{Binding Source={x:Static vm:Preferences.Instance}, Path=UnstagedChangeViewMode, Mode=TwoWay}"/> |
125 | 143 | </Grid> |
126 | 144 | </Border> |
127 | 145 |
|
|
130 | 148 | x:Name="UnstagedChangesView" |
131 | 149 | IsUnstagedChange="True" |
132 | 150 | Background="{DynamicResource Brush.Contents}" |
133 | | - ViewMode="{Binding Source={x:Static vm:Preferences.Instance}, Path=UnstagedChangeViewMode}" |
| 151 | + ViewMode="{Binding Source={x:Static vm:Preferences.Instance}, Path=ChangeViewMode}" |
134 | 152 | EnableCompactFolders="{Binding Source={x:Static vm:Preferences.Instance}, Path=EnableCompactFoldersInChangesTree}" |
135 | 153 | Changes="{Binding VisibleUnstaged}" |
136 | 154 | Selection="{Binding SelectedUnstaged, Mode=TwoWay}" |
|
150 | 168 | <Grid Grid.Row="3" RowDefinitions="27,*"> |
151 | 169 | <!-- Staged Toolbar --> |
152 | 170 | <Border Grid.Row="0" BorderThickness="0,0,0,1" BorderBrush="{DynamicResource Brush.Border0}"> |
153 | | - <Grid ColumnDefinitions="Auto,Auto,Auto,*,Auto,Auto,Auto"> |
| 171 | + <Grid ColumnDefinitions="Auto,Auto,Auto,*,Auto,Auto"> |
154 | 172 | <Path Grid.Column="0" Margin="8,0,0,0" Width="14" Height="14" Fill="{DynamicResource Brush.FG2}" Data="{StaticResource Icons.Changes}"/> |
155 | 173 | <TextBlock Grid.Column="1" Foreground="{DynamicResource Brush.FG2}" FontWeight="Bold" Margin="4,0,0,0"> |
156 | 174 | <Run Text="{DynamicResource Text.WorkingCopy.Staged}"/> |
|
173 | 191 | <Button Grid.Column="5" Classes="icon_button" Width="26" Height="14" Padding="0" ToolTip.Tip="{DynamicResource Text.WorkingCopy.Staged.UnstageAll}" Click="OnUnstageAllButtonClicked"> |
174 | 192 | <Path Width="14" Height="14" Data="{StaticResource Icons.DoubleUp}"/> |
175 | 193 | </Button> |
176 | | - <v:ChangeViewModeSwitcher Grid.Column="6" |
177 | | - Width="26" Height="14" |
178 | | - Margin="0,1,0,0" |
179 | | - ViewMode="{Binding Source={x:Static vm:Preferences.Instance}, Path=StagedChangeViewMode, Mode=TwoWay}"/> |
180 | 194 | </Grid> |
181 | 195 | </Border> |
182 | 196 |
|
|
185 | 199 | x:Name="StagedChangesView" |
186 | 200 | IsUnstagedChange="False" |
187 | 201 | Background="{DynamicResource Brush.Contents}" |
188 | | - ViewMode="{Binding Source={x:Static vm:Preferences.Instance}, Path=StagedChangeViewMode}" |
| 202 | + ViewMode="{Binding Source={x:Static vm:Preferences.Instance}, Path=ChangeViewMode}" |
189 | 203 | EnableCompactFolders="{Binding Source={x:Static vm:Preferences.Instance}, Path=EnableCompactFoldersInChangesTree}" |
190 | 204 | Changes="{Binding VisibleStaged}" |
191 | 205 | Selection="{Binding SelectedStaged, Mode=TwoWay}" |
192 | 206 | ContextRequested="OnStagedContextRequested" |
193 | 207 | ChangeDoubleTapped="OnStagedChangeDoubleTapped" |
194 | 208 | KeyDown="OnStagedKeyDown"/> |
195 | 209 | </Grid> |
196 | | - |
197 | | - <!-- Bottom --> |
198 | | - <Border Grid.Row="4" BorderThickness="0,1,0,0" BorderBrush="{DynamicResource Brush.Border0}"> |
199 | | - <Grid ColumnDefinitions="Auto,*,Auto"> |
200 | | - <ToggleButton Grid.Column="0" |
201 | | - Classes="sidebar_expander" |
202 | | - Width="32" Height="32" |
203 | | - IsChecked="{Binding Source={x:Static vm:Preferences.Instance}, Path=Layout.IsSidebarCollapsedInLocalChanges, Mode=TwoWay}" |
204 | | - ToolTip.Placement="RightEdgeAlignedBottom"/> |
205 | | - |
206 | | - <Button Grid.Column="2" |
207 | | - Classes="flat" |
208 | | - Margin="0,0,8,0" |
209 | | - HorizontalAlignment="Center" VerticalAlignment="Center" |
210 | | - Content="{DynamicResource Text.WorkingCopy.DiscardAll}" |
211 | | - Command="{Binding DiscardAllChanges}"/> |
212 | | - </Grid> |
213 | | - </Border> |
214 | 210 | </Grid> |
215 | 211 |
|
216 | 212 | <GridSplitter Grid.Column="1" |
|
0 commit comments