mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-27 05:15:05 +00:00
fix: move AddRootFolder menu to toolbar
This commit is contained in:
parent
d5885da683
commit
1482c47c9d
2 changed files with 5 additions and 13 deletions
|
@ -151,19 +151,7 @@ namespace SourceGit.ViewModels
|
||||||
menu.Items.Add(terminal);
|
menu.Items.Add(terminal);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (folderNode == null)
|
if (folderNode != null)
|
||||||
{
|
|
||||||
var addFolder = new MenuItem();
|
|
||||||
addFolder.Header = App.Text("Welcome.AddRootFolder");
|
|
||||||
addFolder.Icon = App.CreateMenuIcon("Icons.Folder.Add");
|
|
||||||
addFolder.Click += (_, e) =>
|
|
||||||
{
|
|
||||||
AddRootNode();
|
|
||||||
e.Handled = true;
|
|
||||||
};
|
|
||||||
menu.Items.Add(addFolder);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
var addSubFolder = new MenuItem();
|
var addSubFolder = new MenuItem();
|
||||||
addSubFolder.Header = App.Text("Welcome.AddSubFolder");
|
addSubFolder.Header = App.Text("Welcome.AddSubFolder");
|
||||||
|
|
|
@ -22,6 +22,10 @@
|
||||||
<Button Classes="icon_button" Width="32" Command="{Binding OpenTerminal}" ToolTip.Tip="{DynamicResource Text.Welcome.OpenTerminal}">
|
<Button Classes="icon_button" Width="32" Command="{Binding OpenTerminal}" ToolTip.Tip="{DynamicResource Text.Welcome.OpenTerminal}">
|
||||||
<Path Width="13" Height="13" Data="{StaticResource Icons.Terminal}"/>
|
<Path Width="13" Height="13" Data="{StaticResource Icons.Terminal}"/>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
|
<Button Classes="icon_button" Width="32" Command="{Binding AddRootNode}" ToolTip.Tip="{DynamicResource Text.Welcome.AddRootFolder}">
|
||||||
|
<Path Width="16" Height="16" Data="{StaticResource Icons.Folder.Add}" Margin="0,4,0,0"/>
|
||||||
|
</Button>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue