mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-24 20:57:19 -08:00
style<Repository>: arrange buttons in Repository's tool bar
This commit is contained in:
parent
57c4a8394c
commit
dbd91c9b58
2 changed files with 57 additions and 69 deletions
|
@ -294,10 +294,6 @@ namespace SourceGit.ViewModels {
|
||||||
SearchedCommits = visible;
|
SearchedCommits = visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ExitSearchMode() {
|
|
||||||
IsSearching = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetWatcherEnabled(bool enabled) {
|
public void SetWatcherEnabled(bool enabled) {
|
||||||
if (_watcher != null) _watcher.SetEnabled(enabled);
|
if (_watcher != null) _watcher.SetEnabled(enabled);
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,6 +25,13 @@
|
||||||
<Button Classes="icon_button" Width="32" Command="{Binding OpenInTerminal}" ToolTip.Tip="{DynamicResource Text.Repository.Terminal}">
|
<Button Classes="icon_button" Width="32" Command="{Binding OpenInTerminal}" ToolTip.Tip="{DynamicResource Text.Repository.Terminal}">
|
||||||
<Path Width="13" Height="13" Data="{StaticResource Icons.Terminal}"/>
|
<Path Width="13" Height="13" Data="{StaticResource Icons.Terminal}"/>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
|
<ToggleButton Width="32"
|
||||||
|
Background="Transparent"
|
||||||
|
IsChecked="{Binding IsSearching, Mode=TwoWay}"
|
||||||
|
ToolTip.Tip="{DynamicResource Text.Repository.Search}">
|
||||||
|
<Path Width="14" Height="14" Data="{StaticResource Icons.Search}"/>
|
||||||
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<StackPanel Grid.Column="1" Orientation="Horizontal">
|
<StackPanel Grid.Column="1" Orientation="Horizontal">
|
||||||
|
@ -53,13 +60,9 @@
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Fill="{DynamicResource Brush.Border2}"/>
|
Fill="{DynamicResource Brush.Border2}"/>
|
||||||
|
|
||||||
<ToggleButton Width="32"
|
<Button Classes="icon_button" Width="32" Margin="16,0,0,0" Click="OpenGitFlowMenu" ToolTip.Tip="{DynamicResource Text.GitFlow}">
|
||||||
Margin="16,0,0,0"
|
<Path Width="12" Height="12" Data="{StaticResource Icons.Flow}"/>
|
||||||
Background="Transparent"
|
</Button>
|
||||||
IsChecked="{Binding IsSearching, Mode=TwoWay}"
|
|
||||||
ToolTip.Tip="{DynamicResource Text.Repository.Search}">
|
|
||||||
<Path Width="14" Height="14" Data="{StaticResource Icons.Search}"/>
|
|
||||||
</ToggleButton>
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<StackPanel Grid.Column="2" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0,10,0">
|
<StackPanel Grid.Column="2" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0,10,0">
|
||||||
|
@ -70,10 +73,6 @@
|
||||||
IsVisible="{Binding SelectedViewIndex, Converter={x:Static c:IntConverters.IsZero}}"
|
IsVisible="{Binding SelectedViewIndex, Converter={x:Static c:IntConverters.IsZero}}"
|
||||||
ToolTip.Tip="{DynamicResource Text.Histories.DisplayMode}"/>
|
ToolTip.Tip="{DynamicResource Text.Histories.DisplayMode}"/>
|
||||||
|
|
||||||
<Button Classes="icon_button" Width="32" Command="{Binding Cleanup}" ToolTip.Tip="{DynamicResource Text.Repository.Clean}">
|
|
||||||
<Path Width="14" Height="14" Data="{StaticResource Icons.Clean}"/>
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
<Button Classes="icon_button" Width="32" Command="{Binding OpenConfigure}" ToolTip.Tip="{DynamicResource Text.Repository.Configure}">
|
<Button Classes="icon_button" Width="32" Command="{Binding OpenConfigure}" ToolTip.Tip="{DynamicResource Text.Repository.Configure}">
|
||||||
<Path Width="15" Height="15" Data="{StaticResource Icons.Settings1}"/>
|
<Path Width="15" Height="15" Data="{StaticResource Icons.Settings1}"/>
|
||||||
</Button>
|
</Button>
|
||||||
|
@ -92,7 +91,12 @@
|
||||||
<!-- Left Normal Mode -->
|
<!-- Left Normal Mode -->
|
||||||
<Grid Grid.Column="0" RowDefinitions="28,Auto,28,Auto,28,*,28,Auto,28,Auto" Margin="0,0,0,4" IsVisible="{Binding !IsSearching}">
|
<Grid Grid.Column="0" RowDefinitions="28,Auto,28,Auto,28,*,28,Auto,28,Auto" Margin="0,0,0,4" IsVisible="{Binding !IsSearching}">
|
||||||
<!-- WorkingCopy -->
|
<!-- WorkingCopy -->
|
||||||
<TextBlock Grid.Row="0" Classes="group_header_label" Text="{DynamicResource Text.Repository.Workspace}"/>
|
<Grid Grid.Row="0" ColumnDefinitions="*,Auto">
|
||||||
|
<TextBlock Grid.Column="0" Classes="group_header_label" Text="{DynamicResource Text.Repository.Workspace}"/>
|
||||||
|
<Button Grid.Column="1" Classes="icon_button" Width="14" Margin="8,0" Command="{Binding Cleanup}" ToolTip.Tip="{DynamicResource Text.Repository.Clean}">
|
||||||
|
<Path Width="12" Height="12" Data="{StaticResource Icons.Clean}"/>
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
<ListBox Grid.Row="1" Classes="page_switcher" Background="Transparent" SelectedIndex="{Binding SelectedViewIndex, Mode=TwoWay}">
|
<ListBox Grid.Row="1" Classes="page_switcher" Background="Transparent" SelectedIndex="{Binding SelectedViewIndex, Mode=TwoWay}">
|
||||||
<ListBox.ItemsPanel>
|
<ListBox.ItemsPanel>
|
||||||
<ItemsPanelTemplate>
|
<ItemsPanelTemplate>
|
||||||
|
@ -141,12 +145,9 @@
|
||||||
</ListBox>
|
</ListBox>
|
||||||
|
|
||||||
<!-- Local Branches -->
|
<!-- Local Branches -->
|
||||||
<Grid Grid.Row="2" ColumnDefinitions="*,Auto,Auto">
|
<Grid Grid.Row="2" ColumnDefinitions="*,Auto">
|
||||||
<TextBlock Grid.Column="0" Classes="group_header_label" Text="{DynamicResource Text.Repository.LocalBranches}"/>
|
<TextBlock Grid.Column="0" Classes="group_header_label" Text="{DynamicResource Text.Repository.LocalBranches}"/>
|
||||||
<Button Grid.Column="1" Classes="icon_button" Width="14" Margin="8,0" Click="OpenGitFlowMenu" ToolTip.Tip="{DynamicResource Text.GitFlow}">
|
<Button Grid.Column="1" Classes="icon_button" Width="14" Margin="0,0,6,0" Command="{Binding CreateNewBranch}" ToolTip.Tip="{DynamicResource Text.Repository.NewBranch}">
|
||||||
<Path Width="12" Height="12" Data="{StaticResource Icons.Flow}"/>
|
|
||||||
</Button>
|
|
||||||
<Button Grid.Column="2" Classes="icon_button" Width="14" Margin="0,0,6,0" Command="{Binding CreateNewBranch}" ToolTip.Tip="{DynamicResource Text.Repository.NewBranch}">
|
|
||||||
<Path Width="12" Height="12" Data="{StaticResource Icons.Branch.Add}"/>
|
<Path Width="12" Height="12" Data="{StaticResource Icons.Branch.Add}"/>
|
||||||
</Button>
|
</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
@ -345,15 +346,7 @@
|
||||||
<!-- Left Search Mode -->
|
<!-- Left Search Mode -->
|
||||||
<Grid Grid.Column="0" RowDefinitions="32,*" IsVisible="{Binding IsSearching}">
|
<Grid Grid.Column="0" RowDefinitions="32,*" IsVisible="{Binding IsSearching}">
|
||||||
<!-- Search -->
|
<!-- Search -->
|
||||||
<Grid Grid.Row="0" ColumnDefinitions="Auto,*" Margin="4,2">
|
<Grid Grid.Row="0" Margin="4,2">
|
||||||
<Button Grid.Column="0"
|
|
||||||
Classes="icon_button"
|
|
||||||
Width="32"
|
|
||||||
Command="{Binding ExitSearchMode}">
|
|
||||||
<Path Width="16" Height="16" Data="{StaticResource Icons.Goback}"/>
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
<Grid Grid.Column="1">
|
|
||||||
<TextBox Grid.Column="1"
|
<TextBox Grid.Column="1"
|
||||||
Padding="22,0"
|
Padding="22,0"
|
||||||
FontSize="12"
|
FontSize="12"
|
||||||
|
@ -382,7 +375,6 @@
|
||||||
Data="{StaticResource Icons.Clear}"/>
|
Data="{StaticResource Icons.Clear}"/>
|
||||||
</Button>
|
</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
|
||||||
|
|
||||||
<DataGrid Grid.Row="1"
|
<DataGrid Grid.Row="1"
|
||||||
ItemsSource="{Binding SearchedCommits}"
|
ItemsSource="{Binding SearchedCommits}"
|
||||||
|
@ -397,7 +389,7 @@
|
||||||
BorderThickness="1"
|
BorderThickness="1"
|
||||||
BorderBrush="{DynamicResource Brush.Border2}"
|
BorderBrush="{DynamicResource Brush.Border2}"
|
||||||
Background="{DynamicResource Brush.Contents}"
|
Background="{DynamicResource Brush.Contents}"
|
||||||
Margin="4"
|
Margin="4,0,4,4"
|
||||||
HorizontalScrollBarVisibility="Disabled"
|
HorizontalScrollBarVisibility="Disabled"
|
||||||
VerticalScrollBarVisibility="Auto"
|
VerticalScrollBarVisibility="Auto"
|
||||||
SelectionChanged="OnSearchResultDataGridSelectionChanged">
|
SelectionChanged="OnSearchResultDataGridSelectionChanged">
|
||||||
|
|
Loading…
Reference in a new issue