mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-24 20:57:19 -08:00
style<Bookmark>: unify icons for repository
This commit is contained in:
parent
bc9f9dc2c6
commit
fec14eb04a
6 changed files with 697 additions and 700 deletions
|
@ -5,7 +5,6 @@
|
||||||
<Geometry x:Key="Icon.SubTree">M491 256h469c13 0 21-9 21-21v-171c0-13-9-21-21-21h-469c-13 0-21 9-21 21V128H256V64c0-13-9-21-21-21h-171c-13 0-21 9-21 21v171c0 13 9 21 21 21H128v597h341v64c0 13 9 21 21 21h469c13 0 21-9 21-21v-171c0-13-9-21-21-21h-469c-13 0-21 9-21 21V811H171v-299h299v64c0 13 9 21 21 21h469c13 0 21-9 21-21v-171c0-13-9-21-21-21h-469c-13 0-21 9-21 21V469H171V256h64c13 0 21-9 21-21V171h213v64c0 13 9 21 21 21z</Geometry>
|
<Geometry x:Key="Icon.SubTree">M491 256h469c13 0 21-9 21-21v-171c0-13-9-21-21-21h-469c-13 0-21 9-21 21V128H256V64c0-13-9-21-21-21h-171c-13 0-21 9-21 21v171c0 13 9 21 21 21H128v597h341v64c0 13 9 21 21 21h469c13 0 21-9 21-21v-171c0-13-9-21-21-21h-469c-13 0-21 9-21 21V811H171v-299h299v64c0 13 9 21 21 21h469c13 0 21-9 21-21v-171c0-13-9-21-21-21h-469c-13 0-21 9-21 21V469H171V256h64c13 0 21-9 21-21V171h213v64c0 13 9 21 21 21z</Geometry>
|
||||||
<Geometry x:Key="Icon.LFS">M170 470l0 84 86 0 0-84-86 0zM86 598l0-172 852 0 0 172-852 0zM256 298l0-84-86 0 0 84 86 0zM86 170l852 0 0 172-852 0 0-172zM170 726l0 84 86 0 0-84-86 0zM86 854l0-172 852 0 0 172-852 0z</Geometry>
|
<Geometry x:Key="Icon.LFS">M170 470l0 84 86 0 0-84-86 0zM86 598l0-172 852 0 0 172-852 0zM256 298l0-84-86 0 0 84 86 0zM86 170l852 0 0 172-852 0 0-172zM170 726l0 84 86 0 0-84-86 0zM86 854l0-172 852 0 0 172-852 0z</Geometry>
|
||||||
<Geometry x:Key="Icon.WelcomePage">M853.3 960H170.7V64h469.3l213.3 213.3zM821.3 298.7H618.7V96z</Geometry>
|
<Geometry x:Key="Icon.WelcomePage">M853.3 960H170.7V64h469.3l213.3 213.3zM821.3 298.7H618.7V96z</Geometry>
|
||||||
<Geometry x:Key="Icon.Bookmark">M192 0l0 1024 320-320 320 320 0-1024z</Geometry>
|
|
||||||
<Geometry x:Key="Icon.Detail">M888.8 0H135.2c-32.3 0-58.9 26.1-58.9 58.9v906.2c0 32.3 26.1 58.9 58.9 58.9h753.2c32.3 0 58.9-26.1 58.9-58.9v-906.2c.5-32.8-26.1-58.9-58.4-58.9zm-164.9 176.6c30.7 0 55.8 25.1 55.8 55.8s-25.1 55.8-55.8 55.8s-55.8-25.1-55.8-55.8s24.6-55.8 55.8-55.8zm-212 0c30.7 0 55.8 25.1 55.8 55.8S542.7 288.3 512 288.3s-55.8-25.1-55.8-55.8S481.3 176.6 512 176.6zm-212 0c30.7 0 55.8 25.1 55.8 55.8s-25.1 55.8-55.8 55.8s-55.8-25.1-55.8-55.8s25.1-55.8 55.8-55.8zm208.9 606.2H285.2c-24.6 0-44-20-44-44c0-24.6 20-44 44-44h223.7c24.6 0 44 20 44 44c0 24.1-19.5 44-44 44zm229.9-212H285.2c-24.6 0-44-20-44-44c0-24.6 20-44 44-44h453.1c24.6 0 44 20 44 44c.5 24.1-19.5 44-43.5 44z</Geometry>
|
<Geometry x:Key="Icon.Detail">M888.8 0H135.2c-32.3 0-58.9 26.1-58.9 58.9v906.2c0 32.3 26.1 58.9 58.9 58.9h753.2c32.3 0 58.9-26.1 58.9-58.9v-906.2c.5-32.8-26.1-58.9-58.4-58.9zm-164.9 176.6c30.7 0 55.8 25.1 55.8 55.8s-25.1 55.8-55.8 55.8s-55.8-25.1-55.8-55.8s24.6-55.8 55.8-55.8zm-212 0c30.7 0 55.8 25.1 55.8 55.8S542.7 288.3 512 288.3s-55.8-25.1-55.8-55.8S481.3 176.6 512 176.6zm-212 0c30.7 0 55.8 25.1 55.8 55.8s-25.1 55.8-55.8 55.8s-55.8-25.1-55.8-55.8s25.1-55.8 55.8-55.8zm208.9 606.2H285.2c-24.6 0-44-20-44-44c0-24.6 20-44 44-44h223.7c24.6 0 44 20 44 44c0 24.1-19.5 44-44 44zm229.9-212H285.2c-24.6 0-44-20-44-44c0-24.6 20-44 44-44h453.1c24.6 0 44 20 44 44c.5 24.1-19.5 44-43.5 44z</Geometry>
|
||||||
<Geometry x:Key="Icon.NewTab">M1024 427H597V0h-171v427H0v171h427V1024h171V597H1024z</Geometry>
|
<Geometry x:Key="Icon.NewTab">M1024 427H597V0h-171v427H0v171h427V1024h171V597H1024z</Geometry>
|
||||||
<Geometry x:Key="Icon.Copy">M682.7 42.7H85.3v682.7h85.3V128h512V42.7zM256 213.3l4.5 768H896V213.3H256zm554.7 682.7H341.3V298.7h469.3v597.3z</Geometry>
|
<Geometry x:Key="Icon.Copy">M682.7 42.7H85.3v682.7h85.3V128h512V42.7zM256 213.3l4.5 768H896V213.3H256zm554.7 682.7H341.3V298.7h469.3v597.3z</Geometry>
|
||||||
|
|
|
@ -299,9 +299,9 @@
|
||||||
<sys:String x:Key="Text.Merge.Mode">Merge Option :</sys:String>
|
<sys:String x:Key="Text.Merge.Mode">Merge Option :</sys:String>
|
||||||
|
|
||||||
<sys:String x:Key="Text.Welcome.Title">Free & open source GUI for git users</sys:String>
|
<sys:String x:Key="Text.Welcome.Title">Free & open source GUI for git users</sys:String>
|
||||||
<sys:String x:Key="Text.Welcome.OpenOrInit">Open local repository</sys:String>
|
<sys:String x:Key="Text.Welcome.OpenOrInit">Open Repository</sys:String>
|
||||||
<sys:String x:Key="Text.Welcome.OpenTerminal">Open terminal</sys:String>
|
<sys:String x:Key="Text.Welcome.OpenTerminal">Open Terminal</sys:String>
|
||||||
<sys:String x:Key="Text.Welcome.Clone">Clone remote repository</sys:String>
|
<sys:String x:Key="Text.Welcome.Clone">Clone Repository</sys:String>
|
||||||
<sys:String x:Key="Text.Welcome.DragDrop">DROP FOLDER HERE</sys:String>
|
<sys:String x:Key="Text.Welcome.DragDrop">DROP FOLDER HERE</sys:String>
|
||||||
<sys:String x:Key="Text.Welcome.Start">START</sys:String>
|
<sys:String x:Key="Text.Welcome.Start">START</sys:String>
|
||||||
<sys:String x:Key="Text.Welcome.Recent">RECENT OPENED</sys:String>
|
<sys:String x:Key="Text.Welcome.Recent">RECENT OPENED</sys:String>
|
||||||
|
|
|
@ -13,7 +13,6 @@ namespace SourceGit.Views.Controls {
|
||||||
|
|
||||||
public static readonly Brush[] COLORS = new Brush[] {
|
public static readonly Brush[] COLORS = new Brush[] {
|
||||||
Brushes.Transparent,
|
Brushes.Transparent,
|
||||||
Brushes.White,
|
|
||||||
Brushes.Red,
|
Brushes.Red,
|
||||||
Brushes.Orange,
|
Brushes.Orange,
|
||||||
Brushes.Yellow,
|
Brushes.Yellow,
|
||||||
|
@ -50,12 +49,11 @@ namespace SourceGit.Views.Controls {
|
||||||
if (mark == null) return;
|
if (mark == null) return;
|
||||||
|
|
||||||
if (!mark.IsNewPage) {
|
if (!mark.IsNewPage) {
|
||||||
|
mark.icon.Data = mark.FindResource("Icon.Git") as Geometry;
|
||||||
if (mark.Color == 0) {
|
if (mark.Color == 0) {
|
||||||
mark.icon.SetResourceReference(Path.FillProperty, "Brush.FG1");
|
mark.icon.SetResourceReference(Path.FillProperty, "Brush.FG1");
|
||||||
mark.icon.Data = mark.FindResource("Icon.Git") as Geometry;
|
|
||||||
} else {
|
} else {
|
||||||
mark.icon.Fill = COLORS[mark.Color % COLORS.Length];
|
mark.icon.Fill = COLORS[mark.Color % COLORS.Length];
|
||||||
mark.icon.Data = mark.FindResource("Icon.Bookmark") as Geometry;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
mark.icon.SetResourceReference(Path.FillProperty, "Brush.FG1");
|
mark.icon.SetResourceReference(Path.FillProperty, "Brush.FG1");
|
||||||
|
|
|
@ -309,14 +309,14 @@ namespace SourceGit.Views.Widgets {
|
||||||
menu.Items.Add(closeRight);
|
menu.Items.Add(closeRight);
|
||||||
|
|
||||||
if (!tab.IsWelcomePage) {
|
if (!tab.IsWelcomePage) {
|
||||||
var iconBookmark = FindResource("Icon.Bookmark") as Geometry;
|
var iconBookmark = FindResource("Icon.Git") as Geometry;
|
||||||
var bookmark = new MenuItem();
|
var bookmark = new MenuItem();
|
||||||
bookmark.Header = App.Text("PageTabBar.Tab.Bookmark");
|
bookmark.Header = App.Text("PageTabBar.Tab.Bookmark");
|
||||||
for (int i = 0; i < Controls.Bookmark.COLORS.Length; i++) {
|
for (int i = 0; i < Controls.Bookmark.COLORS.Length; i++) {
|
||||||
var icon = new System.Windows.Shapes.Path();
|
var icon = new System.Windows.Shapes.Path();
|
||||||
icon.Data = iconBookmark;
|
icon.Data = iconBookmark;
|
||||||
icon.Fill = Controls.Bookmark.COLORS[i];
|
icon.Fill = i == 0 ? (FindResource("Brush.FG1") as Brush) : Controls.Bookmark.COLORS[i];
|
||||||
icon.Width = 8;
|
icon.Width = 12;
|
||||||
|
|
||||||
var mark = new MenuItem();
|
var mark = new MenuItem();
|
||||||
mark.Icon = icon;
|
mark.Icon = icon;
|
||||||
|
|
|
@ -188,14 +188,14 @@ namespace SourceGit.Views.Widgets {
|
||||||
ev.Handled = true;
|
ev.Handled = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
var iconBookmark = FindResource("Icon.Bookmark") as Geometry;
|
var iconBookmark = FindResource("Icon.Git") as Geometry;
|
||||||
var bookmark = new MenuItem();
|
var bookmark = new MenuItem();
|
||||||
bookmark.Header = App.Text("RepoCM.Bookmark");
|
bookmark.Header = App.Text("RepoCM.Bookmark");
|
||||||
for (int i = 0; i < Controls.Bookmark.COLORS.Length; i++) {
|
for (int i = 0; i < Controls.Bookmark.COLORS.Length; i++) {
|
||||||
var icon = new System.Windows.Shapes.Path();
|
var icon = new System.Windows.Shapes.Path();
|
||||||
icon.Data = iconBookmark;
|
icon.Data = iconBookmark;
|
||||||
icon.Fill = Controls.Bookmark.COLORS[i];
|
icon.Fill = i == 0 ? (FindResource("Brush.FG1") as Brush) : Controls.Bookmark.COLORS[i];
|
||||||
icon.Width = 8;
|
icon.Width = 12;
|
||||||
|
|
||||||
var mark = new MenuItem();
|
var mark = new MenuItem();
|
||||||
mark.Icon = icon;
|
mark.Icon = icon;
|
||||||
|
|
Loading…
Reference in a new issue