mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-24 20:57:19 -08:00
style<DiffViewer>: add icon for copy
This commit is contained in:
parent
5f583e5146
commit
7c6765b532
3 changed files with 9 additions and 1 deletions
|
@ -9,6 +9,7 @@
|
||||||
<Geometry x:Key="Icon.Help">M512 96C282.2 96 96 282.2 96 512s186.2 416 416 416 416-186.2 416-416S741.8 96 512 96z m-8.6 608c-23.6 0-42.8-18-42.8-41.2 0-23 19.2-41.2 42.8-41.2 23.8 0 43 18 43 41.2 0 23.2-19 41.2-43 41.2z m80.4-193.8c-34.8 20.2-46.6 35-46.6 60.6v15.8h-69.4l-0.6-17.2c-3.4-41.2 11-66.8 47.2-88 33.8-20.2 48-33 48-57.8s-24-43-53.8-43c-30.2 0-52 19.6-53.6 49.2H384c1.4-64.4 49-110 129.4-110 75 0 126.6 41.6 126.6 101.4 0 39.8-19.2 67.2-56.2 89z</Geometry>
|
<Geometry x:Key="Icon.Help">M512 96C282.2 96 96 282.2 96 512s186.2 416 416 416 416-186.2 416-416S741.8 96 512 96z m-8.6 608c-23.6 0-42.8-18-42.8-41.2 0-23 19.2-41.2 42.8-41.2 23.8 0 43 18 43 41.2 0 23.2-19 41.2-43 41.2z m80.4-193.8c-34.8 20.2-46.6 35-46.6 60.6v15.8h-69.4l-0.6-17.2c-3.4-41.2 11-66.8 47.2-88 33.8-20.2 48-33 48-57.8s-24-43-53.8-43c-30.2 0-52 19.6-53.6 49.2H384c1.4-64.4 49-110 129.4-110 75 0 126.6 41.6 126.6 101.4 0 39.8-19.2 67.2-56.2 89z</Geometry>
|
||||||
<Geometry x:Key="Icon.Detail">M888.832 0H135.168c-32.256 0-58.88 26.112-58.88 58.88v906.24c0 32.256 26.112 58.88 58.88 58.88h753.152c32.256 0 58.88-26.112 58.88-58.88v-906.24c0.512-32.768-26.112-58.88-58.368-58.88z m-164.864 176.64c30.72 0 55.808 25.088 55.808 55.808s-25.088 55.808-55.808 55.808-55.808-25.088-55.808-55.808 24.576-55.808 55.808-55.808z m-211.968 0c30.72 0 55.808 25.088 55.808 55.808S542.72 288.256 512 288.256s-55.808-25.088-55.808-55.808S481.28 176.64 512 176.64z m-211.968 0c30.72 0 55.808 25.088 55.808 55.808s-25.088 55.808-55.808 55.808-55.808-25.088-55.808-55.808 25.088-55.808 55.808-55.808z m208.896 606.208H285.184c-24.576 0-44.032-19.968-44.032-44.032 0-24.576 19.968-44.032 44.032-44.032h223.744c24.576 0 44.032 19.968 44.032 44.032 0 24.064-19.456 44.032-44.032 44.032z m229.888-211.968H285.184c-24.576 0-44.032-19.968-44.032-44.032 0-24.576 19.968-44.032 44.032-44.032h453.12c24.576 0 44.032 19.968 44.032 44.032 0.512 24.064-19.456 44.032-43.52 44.032z</Geometry>
|
<Geometry x:Key="Icon.Detail">M888.832 0H135.168c-32.256 0-58.88 26.112-58.88 58.88v906.24c0 32.256 26.112 58.88 58.88 58.88h753.152c32.256 0 58.88-26.112 58.88-58.88v-906.24c0.512-32.768-26.112-58.88-58.368-58.88z m-164.864 176.64c30.72 0 55.808 25.088 55.808 55.808s-25.088 55.808-55.808 55.808-55.808-25.088-55.808-55.808 24.576-55.808 55.808-55.808z m-211.968 0c30.72 0 55.808 25.088 55.808 55.808S542.72 288.256 512 288.256s-55.808-25.088-55.808-55.808S481.28 176.64 512 176.64z m-211.968 0c30.72 0 55.808 25.088 55.808 55.808s-25.088 55.808-55.808 55.808-55.808-25.088-55.808-55.808 25.088-55.808 55.808-55.808z m208.896 606.208H285.184c-24.576 0-44.032-19.968-44.032-44.032 0-24.576 19.968-44.032 44.032-44.032h223.744c24.576 0 44.032 19.968 44.032 44.032 0 24.064-19.456 44.032-44.032 44.032z m229.888-211.968H285.184c-24.576 0-44.032-19.968-44.032-44.032 0-24.576 19.968-44.032 44.032-44.032h453.12c24.576 0 44.032 19.968 44.032 44.032 0.512 24.064-19.456 44.032-43.52 44.032z</Geometry>
|
||||||
<Geometry x:Key="Icon.NewTab">M490.667 85.333l42.667 0 0 853.333-42.667 0 0-853.333zM85.333 490.667l853.333 0 0 42.667-853.333 0 0-42.667z</Geometry>
|
<Geometry x:Key="Icon.NewTab">M490.667 85.333l42.667 0 0 853.333-42.667 0 0-853.333zM85.333 490.667l853.333 0 0 42.667-853.333 0 0-42.667z</Geometry>
|
||||||
|
<Geometry x:Key="Icon.Copy">M682.666667 42.666667H85.333333v682.666666h85.333334V128h512V42.666667zM256 213.333333l4.522667 768H896V213.333333H256z m554.666667 682.666667H341.333333V298.666667h469.333334v597.333333z</Geometry>
|
||||||
|
|
||||||
<Geometry x:Key="Icon.ScrollLeft">M753.613 996.727L269.38 511.505 754.602 27.272z</Geometry>
|
<Geometry x:Key="Icon.ScrollLeft">M753.613 996.727L269.38 511.505 754.602 27.272z</Geometry>
|
||||||
<Geometry x:Key="Icon.ScrollRight">M270.387 27.273L754.62 512.495 269.398 996.728z</Geometry>
|
<Geometry x:Key="Icon.ScrollRight">M270.387 27.273L754.62 512.495 269.398 996.728z</Geometry>
|
||||||
|
|
|
@ -224,7 +224,7 @@
|
||||||
<sys:String x:Key="Text.Diff.Binary.Old">OLD :</sys:String>
|
<sys:String x:Key="Text.Diff.Binary.Old">OLD :</sys:String>
|
||||||
<sys:String x:Key="Text.Diff.Binary.New">New :</sys:String>
|
<sys:String x:Key="Text.Diff.Binary.New">New :</sys:String>
|
||||||
<sys:String x:Key="Text.Diff.LFS">LFS OBJECT CHANGE</sys:String>
|
<sys:String x:Key="Text.Diff.LFS">LFS OBJECT CHANGE</sys:String>
|
||||||
<sys:String x:Key="Text.Diff.Copy">Copy Selected Lines</sys:String>
|
<sys:String x:Key="Text.Diff.Copy">Copy</sys:String>
|
||||||
|
|
||||||
<sys:String x:Key="Text.Discard">Confirm To Discard Changes</sys:String>
|
<sys:String x:Key="Text.Discard">Confirm To Discard Changes</sys:String>
|
||||||
<sys:String x:Key="Text.Discard.Changes">Changes :</sys:String>
|
<sys:String x:Key="Text.Discard.Changes">Changes :</sys:String>
|
||||||
|
|
|
@ -753,8 +753,15 @@ namespace SourceGit.UI {
|
||||||
if (grid == null) return;
|
if (grid == null) return;
|
||||||
|
|
||||||
var menu = new ContextMenu();
|
var menu = new ContextMenu();
|
||||||
|
|
||||||
|
var copyIcon = new 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 = App.Text("Diff.Copy");
|
copy.Header = App.Text("Diff.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