|
11 | 11 | x:DataType="vm:Repository"> |
12 | 12 | <Grid> |
13 | 13 | <Grid.ColumnDefinitions> |
14 | | - <ColumnDefinition Width="{Binding Source={x:Static vm:Preferences.Instance}, Path=Layout.RepositorySidebarWidth, Mode=TwoWay}" MinWidth="200"/> |
| 14 | + <ColumnDefinition Width="{Binding Source={x:Static vm:Preferences.Instance}, Path=Layout.RepositorySidebarDisplayWidth, Mode=TwoWay}" |
| 15 | + MinWidth="{Binding Source={x:Static vm:Preferences.Instance}, Path=Layout.RepositorySidebarMinWidth, Mode=OneWay}"/> |
15 | 16 | <ColumnDefinition Width="3"/> |
16 | 17 | <ColumnDefinition Width="*" MinWidth="200"/> |
17 | 18 | </Grid.ColumnDefinitions> |
18 | 19 |
|
19 | 20 | <!-- Left Panel --> |
20 | | - <Grid Grid.Column="0" RowDefinitions="Auto,*"> |
| 21 | + <Grid Grid.Column="0" |
| 22 | + RowDefinitions="Auto,*" |
| 23 | + IsVisible="{Binding Source={x:Static vm:Preferences.Instance}, Path=Layout.RepositorySidebarCollapsed, Mode=OneWay, Converter={x:Static BoolConverters.Not}}"> |
21 | 24 | <!-- Page Switcher for Left Contents (Dashboard or CommitSearch) --> |
22 | 25 | <StackPanel Grid.Row="0" Margin="0,6" Height="24" HorizontalAlignment="Center" Orientation="Horizontal"> |
23 | 26 | <RadioButton Classes="switch_button" |
|
706 | 709 | </Grid> |
707 | 710 | </Grid> |
708 | 711 |
|
| 712 | + <!-- Left Collapsed Sidebar --> |
| 713 | + <Grid Grid.Column="0" |
| 714 | + IsVisible="{Binding Source={x:Static vm:Preferences.Instance}, Path=Layout.RepositorySidebarCollapsed, Mode=OneWay}"> |
| 715 | + <ListBox Background="Transparent" SelectedIndex="{Binding SelectedViewIndex, Mode=TwoWay}" SelectionMode="AlwaysSelected"> |
| 716 | + <ListBox.Styles> |
| 717 | + <Style Selector="Path.icon"> |
| 718 | + <Setter Property="Width" Value="16"/> |
| 719 | + <Setter Property="Height" Value="16"/> |
| 720 | + <Setter Property="Fill" Value="{DynamicResource Brush.FG1}"/> |
| 721 | + <Setter Property="HorizontalAlignment" Value="Center"/> |
| 722 | + <Setter Property="VerticalAlignment" Value="Center"/> |
| 723 | + </Style> |
| 724 | + <Style Selector="ListBoxItem"> |
| 725 | + <Setter Property="Height" Value="42"/> |
| 726 | + <Setter Property="Margin" Value="0"/> |
| 727 | + <Setter Property="Padding" Value="0"/> |
| 728 | + <Setter Property="BorderThickness" Value="0"/> |
| 729 | + <Setter Property="CornerRadius" Value="0"/> |
| 730 | + </Style> |
| 731 | + <Style Selector="ListBoxItem:pointerover /template/ ContentPresenter#PART_ContentPresenter, ListBoxItem:selected /template/ ContentPresenter#PART_ContentPresenter"> |
| 732 | + <Setter Property="Background" Value="Transparent"/> |
| 733 | + </Style> |
| 734 | + <Style Selector="ListBoxItem:selected"> |
| 735 | + <Setter Property="BorderBrush" Value="{DynamicResource Brush.FG1}"/> |
| 736 | + </Style> |
| 737 | + <Style Selector="ListBoxItem:selected Path.icon"> |
| 738 | + <Setter Property="Fill" Value="{DynamicResource Brush.Accent}"/> |
| 739 | + </Style> |
| 740 | + </ListBox.Styles> |
| 741 | + |
| 742 | + <ListBox.ItemsPanel> |
| 743 | + <ItemsPanelTemplate> |
| 744 | + <StackPanel Orientation="Vertical"/> |
| 745 | + </ItemsPanelTemplate> |
| 746 | + </ListBox.ItemsPanel> |
| 747 | + |
| 748 | + <ListBoxItem> |
| 749 | + <Path Classes="icon" Data="{StaticResource Icons.Histories}"/> |
| 750 | + </ListBoxItem> |
| 751 | + |
| 752 | + <ListBoxItem IsVisible="{Binding !IsBare}"> |
| 753 | + <Path Classes="icon" Margin="2,0,0,0" Data="{StaticResource Icons.Changes}"/> |
| 754 | + </ListBoxItem> |
| 755 | + |
| 756 | + <ListBoxItem IsVisible="{Binding !IsBare}"> |
| 757 | + <Path Classes="icon" Data="{StaticResource Icons.Stashes}"/> |
| 758 | + </ListBoxItem> |
| 759 | + </ListBox> |
| 760 | + </Grid> |
| 761 | + |
709 | 762 | <!-- Splitter --> |
710 | 763 | <GridSplitter Grid.Column="1" |
711 | 764 | MinWidth="1" |
712 | 765 | HorizontalAlignment="Stretch" VerticalAlignment="Stretch" |
713 | 766 | Background="Transparent" |
714 | 767 | BorderThickness="0,0,1,0" |
715 | 768 | BorderBrush="{DynamicResource Brush.Border0}" |
716 | | - Focusable="False"/> |
| 769 | + Focusable="False" |
| 770 | + IsEnabled="{Binding Source={x:Static vm:Preferences.Instance}, Path=Layout.RepositorySidebarCollapsed, Mode=OneWay, Converter={x:Static BoolConverters.Not}}"/> |
717 | 771 |
|
718 | 772 | <!-- Right --> |
719 | 773 | <Grid Grid.Column="2" RowDefinitions="Auto,Auto,Auto,*"> |
|
0 commit comments