mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-23 05:05:00 +00:00
feature<Manager>: add context menu to change bookmark of selected repository
This commit is contained in:
parent
38aef83304
commit
f592aeb3db
5 changed files with 135 additions and 13 deletions
|
@ -188,18 +188,19 @@ namespace SourceGit.UI {
|
|||
e.Handled = true;
|
||||
};
|
||||
|
||||
var iconBookmark = FindResource("Icon.Bookmark") as Geometry;
|
||||
var bookmark = new MenuItem();
|
||||
bookmark.Header = "Bookmark";
|
||||
for (int i = 0; i < Converters.IntToRepoColor.Colors.Length; i++) {
|
||||
var icon = new System.Windows.Shapes.Path();
|
||||
icon.Style = FindResource("Style.Icon") as Style;
|
||||
icon.Data = Geometry.Parse("M 0,0 A 180,180 180 1 1 1,1 Z");
|
||||
icon.Data = iconBookmark;
|
||||
icon.Fill = Converters.IntToRepoColor.Colors[i];
|
||||
icon.Width = 12;
|
||||
icon.Width = 8;
|
||||
|
||||
var mark = new MenuItem();
|
||||
mark.Icon = icon;
|
||||
mark.Header = $"{i + 1}";
|
||||
mark.Header = $"{i}";
|
||||
|
||||
var refIdx = i;
|
||||
mark.Click += (o, e) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue