|
109 | 109 | </Grid.ColumnDefinitions> |
110 | 110 |
|
111 | 111 | <!-- Left Normal Mode --> |
112 | | - <Grid Grid.Column="0" RowDefinitions="28,Auto,28,Auto,28,*,28,Auto,28,Auto" Margin="0,0,0,4" IsVisible="{Binding !IsSearching}"> |
| 112 | + <Grid Grid.Column="0" RowDefinitions="28,Auto,5,28,28,Auto,28,*,28,Auto,28,Auto" Margin="0,0,0,4" IsVisible="{Binding !IsSearching}"> |
113 | 113 | <!-- WorkingCopy --> |
114 | 114 | <TextBlock Grid.Row="0" Classes="group_header_label" Text="{DynamicResource Text.Repository.Workspace}"/> |
115 | 115 | <ListBox Grid.Row="1" Classes="page_switcher" Background="Transparent" SelectedIndex="{Binding SelectedViewIndex, Mode=TwoWay}"> |
|
159 | 159 | </ListBoxItem> |
160 | 160 | </ListBox> |
161 | 161 |
|
| 162 | + <!-- Filter Branches --> |
| 163 | + <Rectangle Grid.Row="2" Height=".65" HorizontalAlignment="Stretch" VerticalAlignment="Center" Fill="{DynamicResource Brush.Border2}"/> |
| 164 | + <TextBox Grid.Row="3" |
| 165 | + Margin="4,2,4,0" |
| 166 | + Height="24" |
| 167 | + BorderThickness="1" |
| 168 | + BorderBrush="{DynamicResource Brush.Border2}" |
| 169 | + Background="{DynamicResource Brush.Contents}" |
| 170 | + Watermark="{DynamicResource Text.Repository.FilterBranchTip}" |
| 171 | + Text="{Binding SearchBranchFilter, Mode=TwoWay}" |
| 172 | + VerticalContentAlignment="Center"> |
| 173 | + <TextBox.InnerLeftContent> |
| 174 | + <Path Width="14" Height="14" |
| 175 | + Margin="6,0,0,0" |
| 176 | + Fill="{DynamicResource Brush.FG2}" |
| 177 | + Data="{StaticResource Icons.Search}"/> |
| 178 | + </TextBox.InnerLeftContent> |
| 179 | + |
| 180 | + <TextBox.InnerRightContent> |
| 181 | + <Button Classes="icon_button" |
| 182 | + Width="16" |
| 183 | + Margin="0,0,6,0" |
| 184 | + Command="{Binding ClearSearchBranchFilter}" |
| 185 | + IsVisible="{Binding SearchBranchFilter, Converter={x:Static StringConverters.IsNotNullOrEmpty}}" |
| 186 | + HorizontalAlignment="Right"> |
| 187 | + <Path Width="14" Height="14" |
| 188 | + Margin="0,1,0,0" |
| 189 | + Fill="{DynamicResource Brush.FG1}" |
| 190 | + Data="{StaticResource Icons.Clear}"/> |
| 191 | + </Button> |
| 192 | + </TextBox.InnerRightContent> |
| 193 | + </TextBox> |
| 194 | + |
162 | 195 | <!-- Local Branches --> |
163 | | - <TextBlock Grid.Row="2" Classes="group_header_label" Text="{DynamicResource Text.Repository.LocalBranches}"/> |
164 | | - <TreeView Grid.Row="3" |
| 196 | + <TextBlock Grid.Row="4" Classes="group_header_label" Text="{DynamicResource Text.Repository.LocalBranches}"/> |
| 197 | + <TreeView Grid.Row="5" |
165 | 198 | x:Name="localBranchTree" |
166 | 199 | MaxHeight="400" |
167 | 200 | ItemsSource="{Binding LocalBranchTrees}" |
|
170 | 203 | LostFocus="OnLocalBranchTreeLostFocus" |
171 | 204 | SelectionChanged="OnLocalBranchTreeSelectionChanged"> |
172 | 205 | <TreeView.Styles> |
173 | | - <Style Selector="TreeViewItem" x:DataType="m:BranchTreeNode"> |
| 206 | + <Style Selector="TreeViewItem" x:DataType="vm:BranchTreeNode"> |
174 | 207 | <Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}"/> |
175 | 208 | </Style> |
176 | 209 | </TreeView.Styles> |
177 | 210 | <TreeView.ItemTemplate> |
178 | | - <TreeDataTemplate ItemsSource="{Binding Children}" x:DataType="{x:Type m:BranchTreeNode}"> |
| 211 | + <TreeDataTemplate ItemsSource="{Binding Children}" x:DataType="{x:Type vm:BranchTreeNode}"> |
179 | 212 | <Grid Height="24" ColumnDefinitions="20,*,Auto,Auto" Background="Transparent" ContextRequested="OnLocalBranchContextMenuRequested" DoubleTapped="OnDoubleTappedLocalBranchNode"> |
180 | 213 | <Path Grid.Column="0" Classes="folder_icon" Width="12" Height="12" HorizontalAlignment="Left" Margin="0,1,0,0" IsVisible="{Binding IsFolder}"/> |
181 | 214 | <Path Grid.Column="0" Width="12" Height="12" HorizontalAlignment="Left" Margin="0,2,0,0" Data="{StaticResource Icons.Check}" IsVisible="{Binding IsCurrent}" VerticalAlignment="Center"/> |
|
208 | 241 | </TreeView> |
209 | 242 |
|
210 | 243 | <!-- Remotes --> |
211 | | - <Grid Grid.Row="4" ColumnDefinitions="*,Auto"> |
| 244 | + <Grid Grid.Row="6" ColumnDefinitions="*,Auto"> |
212 | 245 | <TextBlock Grid.Column="0" Classes="group_header_label" Text="{DynamicResource Text.Repository.Remotes}"/> |
213 | 246 | <Button Grid.Column="1" Classes="icon_button" Width="14" Margin="8,0" Command="{Binding AddRemote}" ToolTip.Tip="{DynamicResource Text.Repository.Remotes.Add}"> |
214 | 247 | <Path Width="12" Height="12" Data="{StaticResource Icons.Remote.Add}"/> |
215 | 248 | </Button> |
216 | 249 | </Grid> |
217 | | - <TreeView Grid.Row="5" |
| 250 | + <TreeView Grid.Row="7" |
218 | 251 | x:Name="remoteBranchTree" |
219 | 252 | ItemsSource="{Binding RemoteBranchTrees}" |
220 | 253 | ScrollViewer.HorizontalScrollBarVisibility="Disabled" |
221 | 254 | ScrollViewer.VerticalScrollBarVisibility="Auto" |
222 | 255 | LostFocus="OnRemoteBranchTreeLostFocus" |
223 | 256 | SelectionChanged="OnRemoteBranchTreeSelectionChanged"> |
224 | 257 | <TreeView.Styles> |
225 | | - <Style Selector="TreeViewItem" x:DataType="m:BranchTreeNode"> |
| 258 | + <Style Selector="TreeViewItem" x:DataType="vm:BranchTreeNode"> |
226 | 259 | <Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}"/> |
227 | 260 | </Style> |
228 | 261 | </TreeView.Styles> |
229 | 262 |
|
230 | 263 | <TreeView.ItemTemplate> |
231 | | - <TreeDataTemplate ItemsSource="{Binding Children}" x:DataType="{x:Type m:BranchTreeNode}"> |
| 264 | + <TreeDataTemplate ItemsSource="{Binding Children}" x:DataType="{x:Type vm:BranchTreeNode}"> |
232 | 265 | <Grid Height="24" ColumnDefinitions="20,*,Auto" Background="Transparent" ContextRequested="OnRemoteBranchContextMenuRequested"> |
233 | 266 | <Path Grid.Column="0" Classes="folder_icon" Width="10" Height="10" HorizontalAlignment="Left" Margin="0,2,0,0" IsVisible="{Binding IsFolder}" VerticalAlignment="Center"/> |
234 | 267 | <Path Grid.Column="0" Width="12" Height="12" HorizontalAlignment="Left" Margin="0,2,0,0" Data="{StaticResource Icons.Remote}" IsVisible="{Binding IsRemote}" VerticalAlignment="Center"/> |
|
250 | 283 | </TreeView> |
251 | 284 |
|
252 | 285 | <!-- Tags --> |
253 | | - <ToggleButton Grid.Row="6" Classes="group_expander" IsChecked="{Binding IsTagGroupExpanded, Mode=TwoWay}"> |
| 286 | + <ToggleButton Grid.Row="8" Classes="group_expander" IsChecked="{Binding IsTagGroupExpanded, Mode=TwoWay}"> |
254 | 287 | <Grid ColumnDefinitions="Auto,*,Auto"> |
255 | 288 | <TextBlock Grid.Column="0" Classes="group_header_label" Margin="4,0,0,0" Text="{DynamicResource Text.Repository.Tags}"/> |
256 | 289 | <TextBlock Grid.Column="1" Text="{Binding Tags, Converter={x:Static c:ListConverters.ToCount}}" Foreground="{DynamicResource Brush.FG2}" FontWeight="Bold"/> |
|
259 | 292 | </Button> |
260 | 293 | </Grid> |
261 | 294 | </ToggleButton> |
262 | | - <DataGrid Grid.Row="7" |
| 295 | + <DataGrid Grid.Row="9" |
263 | 296 | MaxHeight="200" |
264 | 297 | Background="Transparent" |
265 | 298 | ItemsSource="{Binding Tags}" |
|
310 | 343 | </DataGrid> |
311 | 344 |
|
312 | 345 | <!-- Submodules --> |
313 | | - <ToggleButton Grid.Row="8" Classes="group_expander" IsChecked="{Binding IsSubmoduleGroupExpanded, Mode=TwoWay}"> |
| 346 | + <ToggleButton Grid.Row="10" Classes="group_expander" IsChecked="{Binding IsSubmoduleGroupExpanded, Mode=TwoWay}"> |
314 | 347 | <Grid ColumnDefinitions="Auto,*,Auto,Auto"> |
315 | 348 | <TextBlock Grid.Column="0" Classes="group_header_label" Margin="4,0,0,0" Text="{DynamicResource Text.Repository.Submodules}"/> |
316 | 349 | <TextBlock Grid.Column="1" Text="{Binding Submodules, Converter={x:Static c:ListConverters.ToCount}}" Foreground="{DynamicResource Brush.FG2}" FontWeight="Bold"/> |
|
328 | 361 | </Button> |
329 | 362 | </Grid> |
330 | 363 | </ToggleButton> |
331 | | - <DataGrid Grid.Row="9" |
| 364 | + <DataGrid Grid.Row="11" |
332 | 365 | MaxHeight="200" |
333 | 366 | Background="Transparent" |
334 | 367 | ItemsSource="{Binding Submodules}" |
|
0 commit comments