mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-23 10:22:13 +08:00
ux: vertical align center
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user