mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-24 20:57:19 -08: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>
|
||||
<DataTemplate DataType="vm:RepositoryNode">
|
||||
<Grid Background="Transparent"
|
||||
VerticalAlignment="Center"
|
||||
ColumnDefinitions="16,18,Auto,*"
|
||||
Margin="{Binding Depth, Converter={x:Static c:IntConverters.ToTreeMargin}}"
|
||||
Loaded="SetupTreeNodeDragAndDrop"
|
||||
|
|
|
@ -95,9 +95,9 @@ namespace SourceGit.Views
|
|||
|
||||
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);
|
||||
e.Handled = true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue