Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 5b02693

Browse files
ux: add menu icons
Signed-off-by: leo <longshuang@msn.cn>
1 parent 1515d4f commit 5b02693

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

‎src/Resources/Icons.axaml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
<StreamGeometry x:Key="Icons.File.Ignore">M416 832H128V128h384v192C512 355 541 384 576 384L768 384v32c0 19 13 32 32 32S832 435 832 416v-64c0-6 0-19-6-25l-256-256c-6-6-19-6-25-6H128A64 64 0 0064 128v704C64 867 93 896 129 896h288c19 0 32-13 32-32S435 832 416 832zM576 172 722 320H576V172zM736 512C614 512 512 614 512 736S614 960 736 960s224-102 224-224S858 512 736 512zM576 736C576 646 646 576 736 576c32 0 58 6 83 26l-218 218c-19-26-26-51-26-83zm160 160c-32 0-64-13-96-32l224-224c19 26 32 58 32 96 0 90-70 160-160 160z</StreamGeometry>
4949
<StreamGeometry x:Key="Icons.File.Remove">M896 320c0-19-6-32-19-45l-192-192c-13-13-26-19-45-19H192c-38 0-64 26-64 64v768c0 38 26 64 64 64h640c38 0 64-26 64-64V320zm-256 384H384c-19 0-32-13-32-32s13-32 32-32h256c19 0 32 13 32 32s-13 32-32 32zm166-384H640V128l192 192h-26z</StreamGeometry>
5050
<StreamGeometry x:Key="Icons.Filter">M599 425 599 657 425 832 425 425 192 192 832 192Z</StreamGeometry>
51+
<StreamGeometry x:Key="Icons.Fix">M320 239 213 299l60-107L213 85l107 60L427 85 367 192 427 299 320 239m512 418L939 597l-60 107L939 811l-107-60L725 811l60-107L725 597l107 60M939 85l-60 107L939 299l-107-60L725 299l60-107L725 85l107 60L939 85m-369 460 104-104-90-90-104 104 90 90m44-234 100 100c17 16 17 44 0 60L215 969c-17 17-44 17-60 0l-100-100c-17-16-17-44 0-60L553 311c17-17 44-17 60 0z</StreamGeometry>
5152
<StreamGeometry x:Key="Icons.Folder">M853 267H514c-4 0-6-2-9-4l-38-66c-13-21-38-36-64-36H171c-41 0-75 34-75 75v555c0 41 34 75 75 75h683c41 0 75-34 75-75V341c0-41-34-75-75-75zm-683-43h233c4 0 6 2 9 4l38 66c13 21 38 36 64 36H853c6 0 11 4 11 11v75h-704V235c0-6 4-11 11-11zm683 576H171c-6 0-11-4-11-11V480h704V789c0 6-4 11-11 11z</StreamGeometry>
5253
<StreamGeometry x:Key="Icons.Folder.Add">M1088 227H609L453 78a11 11 0 00-7-3H107a43 43 0 00-43 43v789a43 43 0 0043 43h981a43 43 0 0043-43V270a43 43 0 00-43-43zM757 599c0 5-5 9-10 9h-113v113c0 5-4 9-9 9h-56c-5 0-9-4-9-9V608h-113c-5 0-10-4-10-9V543c0-5 5-9 10-9h113V420c0-5 4-9 9-9h56c5 0 9 4 9 9V533h113c5 0 10 4 10 9v56z</StreamGeometry>
5354
<StreamGeometry x:Key="Icons.Folder.Open">M922 450c-6-9-15-13-26-13h-11V341c0-41-34-75-75-75H514c-4 0-6-2-9-4l-38-66c-13-21-38-36-64-36H171c-41 0-75 34-75 75v597c0 6 2 13 6 19 6 9 15 13 26 13h640c13 0 26-9 30-21l128-363c4-11 2-21-4-30zM171 224h233c4 0 6 2 9 4l38 66c13 21 38 36 64 36H811c6 0 11 4 11 11v96H256c-13 0-26 9-30 21l-66 186V235c0-6 4-11 11-11zm574 576H173l105-299h572l-105 299z</StreamGeometry>

‎src/Views/Histories.axaml.cs‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -627,12 +627,9 @@ private ContextMenu CreateContextMenuForSingleCommit(ViewModels.Repository repo,
627627

628628
if (commit.IsMerged && commit.Parents.Count > 0)
629629
{
630-
var interactiveRebase = new MenuItem();
631-
interactiveRebase.Header = App.Text("CommitCM.InteractiveRebase");
632-
interactiveRebase.Icon = App.CreateMenuIcon("Icons.InteractiveRebase");
633-
634630
var manually = new MenuItem();
635631
manually.Header = App.Text("CommitCM.InteractiveRebase.Manually", current.Name, target);
632+
manually.Icon = App.CreateMenuIcon("Icons.InteractiveRebase");
636633
manually.Click += async (_, e) =>
637634
{
638635
await App.ShowDialog(new ViewModels.InteractiveRebase(repo, commit));
@@ -641,6 +638,7 @@ private ContextMenu CreateContextMenuForSingleCommit(ViewModels.Repository repo,
641638

642639
var reword = new MenuItem();
643640
reword.Header = App.Text("CommitCM.InteractiveRebase.Reword");
641+
reword.Icon = App.CreateMenuIcon("Icons.Rename");
644642
reword.Click += async (_, e) =>
645643
{
646644
await vm.InteractiveRebaseAsync(commit, Models.InteractiveRebaseAction.Reword);
@@ -649,6 +647,7 @@ private ContextMenu CreateContextMenuForSingleCommit(ViewModels.Repository repo,
649647

650648
var edit = new MenuItem();
651649
edit.Header = App.Text("CommitCM.InteractiveRebase.Edit");
650+
edit.Icon = App.CreateMenuIcon("Icons.Edit");
652651
edit.Click += async (_, e) =>
653652
{
654653
await vm.InteractiveRebaseAsync(commit, Models.InteractiveRebaseAction.Edit);
@@ -657,6 +656,7 @@ private ContextMenu CreateContextMenuForSingleCommit(ViewModels.Repository repo,
657656

658657
var squash = new MenuItem();
659658
squash.Header = App.Text("CommitCM.InteractiveRebase.Squash");
659+
squash.Icon = App.CreateMenuIcon("Icons.SquashIntoParent");
660660
squash.Click += async (_, e) =>
661661
{
662662
await vm.InteractiveRebaseAsync(commit, Models.InteractiveRebaseAction.Squash);
@@ -665,6 +665,7 @@ private ContextMenu CreateContextMenuForSingleCommit(ViewModels.Repository repo,
665665

666666
var fixup = new MenuItem();
667667
fixup.Header = App.Text("CommitCM.InteractiveRebase.Fixup");
668+
fixup.Icon = App.CreateMenuIcon("Icons.Fix");
668669
fixup.Click += async (_, e) =>
669670
{
670671
await vm.InteractiveRebaseAsync(commit, Models.InteractiveRebaseAction.Fixup);
@@ -673,12 +674,16 @@ private ContextMenu CreateContextMenuForSingleCommit(ViewModels.Repository repo,
673674

674675
var drop = new MenuItem();
675676
drop.Header = App.Text("CommitCM.InteractiveRebase.Drop");
677+
drop.Icon = App.CreateMenuIcon("Icons.Clear");
676678
drop.Click += async (_, e) =>
677679
{
678680
await vm.InteractiveRebaseAsync(commit, Models.InteractiveRebaseAction.Drop);
679681
e.Handled = true;
680682
};
681683

684+
var interactiveRebase = new MenuItem();
685+
interactiveRebase.Header = App.Text("CommitCM.InteractiveRebase");
686+
interactiveRebase.Icon = App.CreateMenuIcon("Icons.InteractiveRebase");
682687
interactiveRebase.Items.Add(manually);
683688
interactiveRebase.Items.Add(new MenuItem() { Header = "-" });
684689
interactiveRebase.Items.Add(reword);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /