style<CommitViewer>: add icon for copy action in file preview context menu

This commit is contained in:
leo 2021-01-27 11:38:42 +08:00
parent 11d567604a
commit efa42af08d

View file

@ -485,8 +485,15 @@ namespace SourceGit.UI {
if (grid == null) return;
var menu = new ContextMenu();
var copyIcon = new System.Windows.Shapes.Path();
copyIcon.Style = FindResource("Style.Icon") as Style;
copyIcon.Data = FindResource("Icon.Copy") as Geometry;
copyIcon.Width = 10;
var copy = new MenuItem();
copy.Header = "Copy";
copy.Icon = copyIcon;
copy.Click += (o, ev) => {
var items = grid.SelectedItems;
if (items.Count == 0) return;