Skip to content

Commit 2796f38

Browse files
committed
New theme scheme
1 parent 8bf46a0 commit 2796f38

File tree

5 files changed

+158
-62
lines changed

5 files changed

+158
-62
lines changed

.vscode/settings.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"json.schemas": [
3+
{
4+
"url": "./schema.json",
5+
"fileMatch": [
6+
"themes/*.json"
7+
]
8+
}
9+
],
10+
}

README.md

+2-59
Original file line numberDiff line numberDiff line change
@@ -2,66 +2,9 @@
22

33
Custom Themes for SourceGit
44

5-
## How to make & use your theme
5+
## How to use custom theme overrides.
66

7-
1. Create a new json file, and provide your favorite colors with follow keys:
8-
9-
* Basic Colors
10-
11-
| Key | Description |
12-
| --- | --- |
13-
| Window | Window background color |
14-
| WindowBorder | Window border color. Only used on Linux. |
15-
| TitleBar | Title bar background color |
16-
| ToolBar | Tool bar background color |
17-
| Popup | Popup panel background color |
18-
| Contents | Background color used in inputs, data grids, file content viewer, change lists, text diff viewer, etc. |
19-
| Badge | Badge background color |
20-
| BadgeFG | Badge foreground color |
21-
| Conflict | Conflict panel background color |
22-
| ConflictForeground | Conflict panel foreground color |
23-
| DecoratorIconBG | Background color for commit ref icon |
24-
| DecoratorIcon | Foreground color for commit ref icon |
25-
| DecoratorBranch | Background color for commit branch ref name |
26-
| DecoratorTag | Background color for commit tag ref name |
27-
| DecoratorFG | Foreground color for commit ref name |
28-
| Border0 | Border color used in some controls, like Window, Tab, Toolbar, etc. |
29-
| Border1 | Border color used in inputs, like TextBox, ComboBox, etc. |
30-
| Border2 | Border color used in visual lines, like seperators, Rectange, etc. |
31-
| FlatButton.Background | Flat button background color, like `Cancel`, `Commit & Push` button |
32-
| FlatButton.BackgroundHovered | Flat button background color when hovered, like `Cancel` button |
33-
| FG1 | Primary foreground color for all text elements |
34-
| FG2 | Secondary foreground color for all text elements |
35-
| Diff.EmptyBG | Background color used in empty lines in diff viewer |
36-
| Diff.AddedBG | Background color used in added lines in diff viewer |
37-
| Diff.DeletedBG | Background color used in deleted lines in diff viewer |
38-
| Diff.AddedHighlight | Background color used for changed words in added lines in diff viewer |
39-
| Diff.DeletedHighlight | Background color used for changed words in deleted lines in diff viewer |
40-
| SystemAccentColor | Accent color for selected items |
41-
42-
* Colors used in commit graph.
43-
44-
Array of colors used to draw commit graph. Optional. At least one color is needed.
45-
46-
For example:
47-
48-
```json
49-
{
50-
"Basic": {
51-
"Window": "#FFFF6059"
52-
},
53-
"Graph": [
54-
"Red",
55-
"Yellow",
56-
"Green",
57-
"#FF00FF",
58-
]
59-
}
60-
```
61-
62-
2. Open `Preference` -> `Appearance`, choose the json file you just created in `Custom Color Schema`.
63-
64-
> **NOTE**: The `Custom Color Schema` will override the colors with same keys in current active theme.
7+
Open `Preference` -> `Appearance`, choose the json file you just created in `Theme Overrides`.
658

669
## Screenshots
6710

schema.json

+142
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
{
2+
"additionalProperties": false,
3+
"definitions": {
4+
"color": {
5+
"type": "string",
6+
"pattern": "^#[0-9a-fA-F]{6,8}$"
7+
}
8+
},
9+
"properties": {
10+
"BasicColors": {
11+
"type": "object",
12+
"properties": {
13+
"Window": {
14+
"$ref": "#/definitions/color",
15+
"description": "Window background color"
16+
},
17+
"WindowBorder": {
18+
"$ref": "#/definitions/color",
19+
"description": "Window border color. Only used on Linux."
20+
},
21+
"TitleBar": {
22+
"$ref": "#/definitions/color",
23+
"description": "Title bar background color"
24+
},
25+
"ToolBar": {
26+
"$ref": "#/definitions/color",
27+
"description": "Tool bar background color"
28+
},
29+
"Popup": {
30+
"$ref": "#/definitions/color",
31+
"description": "Popup panel background color"
32+
},
33+
"Contents": {
34+
"$ref": "#/definitions/color",
35+
"description": "Background color used in inputs, data grids, file content viewer, change lists, text diff viewer, etc."
36+
},
37+
"Badge": {
38+
"$ref": "#/definitions/color",
39+
"description": "Badge background color"
40+
},
41+
"BadgeFG": {
42+
"$ref": "#/definitions/color",
43+
"description": "Badge foreground color"
44+
},
45+
"Conflict": {
46+
"$ref": "#/definitions/color",
47+
"description": "Conflict panel background color"
48+
},
49+
"ConflictForeground": {
50+
"$ref": "#/definitions/color",
51+
"description": "Conflict panel foreground color"
52+
},
53+
"DecoratorIconBG": {
54+
"$ref": "#/definitions/color",
55+
"description": "Background color for commit ref icon"
56+
},
57+
"DecoratorIcon": {
58+
"$ref": "#/definitions/color",
59+
"description": "Foreground color for commit ref icon"
60+
},
61+
"DecoratorBranch": {
62+
"$ref": "#/definitions/color",
63+
"description": "Background color for commit branch ref name"
64+
},
65+
"DecoratorTag": {
66+
"$ref": "#/definitions/color",
67+
"description": "Background color for commit tag ref name"
68+
},
69+
"DecoratorFG": {
70+
"$ref": "#/definitions/color",
71+
"description": "Foreground color for commit ref name"
72+
},
73+
"Border0": {
74+
"$ref": "#/definitions/color",
75+
"description": "Border color used in some controls, like Window, Tab, Toolbar, etc."
76+
},
77+
"Border1": {
78+
"$ref": "#/definitions/color",
79+
"description": "Border color used in inputs, like TextBox, ComboBox, etc."
80+
},
81+
"Border2": {
82+
"$ref": "#/definitions/color",
83+
"description": "Border color used in visual lines, like seperators, Rectange, etc."
84+
},
85+
"FlatButton.Background": {
86+
"$ref": "#/definitions/color",
87+
"description": "Flat button background color, like `Cancel`, `Commit & Push` button"
88+
},
89+
"FlatButton.BackgroundHovered": {
90+
"$ref": "#/definitions/color",
91+
"description": "Flat button background color when hovered, like `Cancel` button"
92+
},
93+
"FG1": {
94+
"$ref": "#/definitions/color",
95+
"description": "Primary foreground color for all text elements"
96+
},
97+
"FG2": {
98+
"$ref": "#/definitions/color",
99+
"description": "Secondary foreground color for all text elements"
100+
},
101+
"Diff.EmptyBG": {
102+
"$ref": "#/definitions/color",
103+
"description": "Background color used in empty lines in diff viewer"
104+
},
105+
"Diff.AddedBG": {
106+
"$ref": "#/definitions/color",
107+
"description": "Background color used in added lines in diff viewer"
108+
},
109+
"Diff.DeletedBG": {
110+
"$ref": "#/definitions/color",
111+
"description": "Background color used in deleted lines in diff viewer"
112+
},
113+
"Diff.AddedHighlight": {
114+
"$ref": "#/definitions/color",
115+
"description": "Background color used for changed words in added lines in diff viewer"
116+
},
117+
"Diff.DeletedHighlight": {
118+
"$ref": "#/definitions/color",
119+
"description": "Background color used for changed words in deleted lines in diff viewer"
120+
},
121+
"SystemAccentColor": {
122+
"$ref": "#/definitions/color",
123+
"description": "Accent color for selected items"
124+
}
125+
}
126+
},
127+
"GraphPenThickness": {
128+
"type": "number",
129+
"minimum": 1,
130+
"maximum": 4,
131+
"description": "Thickness of pens to draw commit graph"
132+
},
133+
"GraphColors": {
134+
"type": "array",
135+
"minItems": 1,
136+
"items": {
137+
"$ref": "#/definitions/color"
138+
},
139+
"description": "Array of colors used to draw the commit graph"
140+
}
141+
}
142+
}

themes/JetBrainsDark.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"Basic": {
2+
"BasicColors": {
33
"Window": "#2b2d30",
44
"WindowBorder": "#2b2d30",
55
"TitleBar": "#2b2d30",

themes/JetBrainsDark_DiffHighContrast.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"Basic": {
2+
"BasicColors": {
33
"Window": "#2b2d30",
44
"WindowBorder": "#2b2d30",
55
"TitleBar": "#222426",
@@ -28,7 +28,8 @@
2828
"DecoratorTag": "#57935d",
2929
"DecoratorFG": "#ffffff"
3030
},
31-
"Graph": [
31+
"GraphPenThickness": 3,
32+
"GraphColors": [
3233
"#FF15A0BF",
3334
"#FF0669F7",
3435
"#FF8E00C2",

0 commit comments

Comments
 (0)