Skip to content

Commit be3046d

Browse files
committed
gtksourceview: Provide a better default style
Tango has two issues when the GTK theme is dark: - Starting with Mint 22, its line numbers column is hardcoded to grey and looks way too bright. - Comments are unreadable on a dark bg. Fixes linuxmint/mint22-beta#60 Helps with linuxmint/mint22-beta#5
1 parent 9bd60fb commit be3046d

File tree

4 files changed

+130
-1
lines changed

4 files changed

+130
-1
lines changed

data/meson.build

+5
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,8 @@ install_data(
4040
'xed.1',
4141
install_dir : join_paths(get_option('prefix'), get_option('mandir'), 'man1')
4242
)
43+
44+
install_data(
45+
'xed.xml',
46+
install_dir: join_paths(datadir, 'gtksourceview-4', 'styles')
47+
)

data/org.x.editor.gschema.xml.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
</key>
4949

5050
<key name="scheme" type="s">
51-
<default>'tango'</default>
51+
<default>'xed'</default>
5252
<summary>Style Scheme</summary>
5353
<description>The ID of a GtkSourceView Style Scheme used to color the text.</description>
5454
</key>

data/xed.xml

+123
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<style-scheme id="xed" _name="Xed" version="1.0">
3+
<author>Xed Team</author>
4+
<_description>The default color scheme.</_description>
5+
6+
<!-- Tango Palette -->
7+
<color name="butter1" value="#fce94f"/>
8+
<color name="butter2" value="#edd400"/>
9+
<color name="butter3" value="#c4a000"/>
10+
<color name="chameleon1" value="#8ae234"/>
11+
<color name="chameleon2" value="#73d216"/>
12+
<color name="chameleon3" value="#4e9a06"/>
13+
<color name="orange1" value="#fcaf3e"/>
14+
<color name="orange2" value="#f57900"/>
15+
<color name="orange3" value="#ce5c00"/>
16+
<color name="skyblue1" value="#729fcf"/>
17+
<color name="skyblue2" value="#3465a4"/>
18+
<color name="skyblue3" value="#204a87"/>
19+
<color name="plum1" value="#ad7fa8"/>
20+
<color name="plum2" value="#75507b"/>
21+
<color name="plum3" value="#5c3566"/>
22+
<color name="chocolate1" value="#e9b96e"/>
23+
<color name="chocolate2" value="#c17d11"/>
24+
<color name="chocolate3" value="#8f5902"/>
25+
<color name="scarletred1" value="#ef2929"/>
26+
<color name="scarletred2" value="#cc0000"/>
27+
<color name="scarletred3" value="#a40000"/>
28+
<color name="aluminium1" value="#eeeeec"/>
29+
<color name="aluminium2" value="#d3d7cf"/>
30+
<color name="aluminium3" value="#babdb6"/>
31+
<color name="aluminium4" value="#888a85"/>
32+
<color name="aluminium5" value="#555753"/>
33+
<color name="aluminium6" value="#2e3436"/>
34+
35+
<!-- Global Settings -->
36+
<style name="line-numbers" background="#rgba(18,20,21,0.005)"/>
37+
<style name="current-line" background="aluminium1"/>
38+
<style name="current-line-number" background="aluminium1"/>
39+
<style name="draw-spaces" foreground="aluminium3"/>
40+
<style name="background-pattern" background="#f3f3f3"/>
41+
42+
<!-- Bracket Matching -->
43+
<style name="bracket-match" foreground="aluminium1" background="aluminium3"/>
44+
<style name="bracket-mismatch" foreground="aluminium1" background="scarletred3"/>
45+
46+
<!-- Right Margin -->
47+
<style name="right-margin" foreground="aluminium6" background="aluminium6"/>
48+
49+
<!-- Search Matching -->
50+
<style name="search-match" background="butter1"/>
51+
52+
<!-- Comments -->
53+
<style name="def:comment" foreground="aluminium4"/>
54+
<style name="def:shebang" foreground="skyblue3" bold="true"/>
55+
<style name="def:doc-comment-element" italic="true"/>
56+
57+
<!-- Constants -->
58+
<style name="def:constant" foreground="plum1"/>
59+
<style name="def:special-char" foreground="plum3"/>
60+
61+
<!-- Identifiers -->
62+
<style name="def:identifier" foreground="skyblue2"/>
63+
64+
<!-- Statements -->
65+
<style name="def:statement" foreground="scarletred3" bold="true"/>
66+
67+
<!-- Types -->
68+
<style name="def:type" foreground="chameleon3" bold="true"/>
69+
70+
<!-- Markup -->
71+
<style name="def:emphasis" italic="true"/>
72+
<style name="def:strong-emphasis" foreground="scarletred3" bold="true"/>
73+
<style name="def:inline-code" foreground="skyblue2"/>
74+
<style name="def:insertion" underline="single"/>
75+
<style name="def:deletion" strikethrough="true"/>
76+
<style name="def:link-text" foreground="skyblue3"/>
77+
<style name="def:link-symbol" foreground="skyblue3" bold="true"/>
78+
<style name="def:link-destination" italic="true" underline="single"/>
79+
<style name="def:heading" foreground="chameleon3" bold="true"/>
80+
<style name="def:thematic-break" foreground="chameleon3" bold="true"/>
81+
<style name="def:preformatted-section" foreground="skyblue2"/>
82+
<style name="def:list-marker" foreground="scarletred3" bold="true"/>
83+
84+
<!-- Others -->
85+
<style name="def:preprocessor" foreground="chocolate3"/>
86+
<style name="def:error" background="scarletred2" bold="true"/>
87+
<style name="def:warning" background="plum1"/>
88+
<style name="def:note" background="orange1" bold="true"/>
89+
<style name="def:net-address" italic="true" underline="single"/>
90+
91+
<!-- Heading styles, uncomment to enable -->
92+
<!--
93+
<style name="def:heading0" scale="5.0"/>
94+
<style name="def:heading1" scale="2.5"/>
95+
<style name="def:heading2" scale="2.0"/>
96+
<style name="def:heading3" scale="1.7"/>
97+
<style name="def:heading4" scale="1.5"/>
98+
<style name="def:heading5" scale="1.3"/>
99+
<style name="def:heading6" scale="1.2"/>
100+
-->
101+
102+
<!-- Language specific -->
103+
<style name="diff:added-line" foreground="chameleon3"/>
104+
<style name="diff:removed-line" foreground="plum3"/>
105+
<style name="diff:changed-line" use-style="def:preprocessor"/>
106+
<style name="diff:diff-file" use-style="def:type"/>
107+
<style name="diff:location" use-style="def:statement"/>
108+
<style name="diff:special-case" use-style="def:constant"/>
109+
110+
<style name="xml:tags" foreground="chameleon3"/>
111+
<style name="xml:namespace" bold="true"/>
112+
113+
<style name="js:built-in-constructor" foreground="chameleon3"/>
114+
115+
<style name="latex:display-math" foreground="plum3"/>
116+
<style name="latex:command" foreground="chameleon3" bold="true"/>
117+
<style name="latex:include" use-style="def:preprocessor"/>
118+
<style name="latex:special-char" use-style="def:constant"/>
119+
120+
<style name="sh:variable" foreground="plum3"/>
121+
<style name="sh:variable-definition" foreground="chameleon3"/>
122+
123+
</style-scheme>

debian/xed-common.install

+1
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ usr/share/glib-2.0
44
usr/share/help
55
usr/share/locale
66
usr/share/xed/icons
7+
usr/share/gtksourceview*

0 commit comments

Comments
 (0)