mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-11-01 13:13:21 -07:00
style<CommitViewer>: add icon for copy action in file preview context menu
This commit is contained in:
parent
11d567604a
commit
efa42af08d
1 changed files with 7 additions and 0 deletions
|
@ -485,8 +485,15 @@ namespace SourceGit.UI {
|
||||||
if (grid == null) return;
|
if (grid == null) return;
|
||||||
|
|
||||||
var menu = new ContextMenu();
|
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();
|
var copy = new MenuItem();
|
||||||
copy.Header = "Copy";
|
copy.Header = "Copy";
|
||||||
|
copy.Icon = copyIcon;
|
||||||
copy.Click += (o, ev) => {
|
copy.Click += (o, ev) => {
|
||||||
var items = grid.SelectedItems;
|
var items = grid.SelectedItems;
|
||||||
if (items.Count == 0) return;
|
if (items.Count == 0) return;
|
||||||
|
|
Loading…
Reference in a new issue