mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-11-01 13:13:21 -07:00
ux: vertical align center
This commit is contained in:
parent
38e2e0f3f4
commit
38770af13d
2 changed files with 3 additions and 2 deletions
|
@ -89,6 +89,7 @@
|
||||||
<ListBox.ItemTemplate>
|
<ListBox.ItemTemplate>
|
||||||
<DataTemplate DataType="vm:RepositoryNode">
|
<DataTemplate DataType="vm:RepositoryNode">
|
||||||
<Grid Background="Transparent"
|
<Grid Background="Transparent"
|
||||||
|
VerticalAlignment="Center"
|
||||||
ColumnDefinitions="16,18,Auto,*"
|
ColumnDefinitions="16,18,Auto,*"
|
||||||
Margin="{Binding Depth, Converter={x:Static c:IntConverters.ToTreeMargin}}"
|
Margin="{Binding Depth, Converter={x:Static c:IntConverters.ToTreeMargin}}"
|
||||||
Loaded="SetupTreeNodeDragAndDrop"
|
Loaded="SetupTreeNodeDragAndDrop"
|
||||||
|
|
|
@ -95,9 +95,9 @@ namespace SourceGit.Views
|
||||||
|
|
||||||
private void OnTreeNodeContextRequested(object sender, ContextRequestedEventArgs e)
|
private void OnTreeNodeContextRequested(object sender, ContextRequestedEventArgs e)
|
||||||
{
|
{
|
||||||
if (sender is Grid grid)
|
if (sender is Grid { DataContext: ViewModels.RepositoryNode node } grid)
|
||||||
{
|
{
|
||||||
var menu = ViewModels.Welcome.Instance.CreateContextMenu(grid.DataContext as ViewModels.RepositoryNode);
|
var menu = ViewModels.Welcome.Instance.CreateContextMenu(node);
|
||||||
grid.OpenContextMenu(menu);
|
grid.OpenContextMenu(menu);
|
||||||
e.Handled = true;
|
e.Handled = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue