Merge lp:~3v1n0/ubuntu-themes/gtk-theme-colors-define into lp:ubuntu-themes

Proposed by Marco Trevisan (Treviño)
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: 546
Merged at revision: 544
Proposed branch: lp:~3v1n0/ubuntu-themes/gtk-theme-colors-define
Merge into: lp:ubuntu-themes
Diff against target: 190 lines (+121/-13)
2 files modified
Ambiance/gtk-3.20/gtk-main.css (+61/-6)
Radiance/gtk-3.20/gtk-main.css (+60/-7)
To merge this branch: bzr merge lp:~3v1n0/ubuntu-themes/gtk-theme-colors-define
Reviewer Review Type Date Requested Status
Iain Lane Needs Information
Review via email: mp+324091@code.launchpad.net

Commit message

Ambiance, Radiance: define theme_* colors based on ours

Some apps customizing their CSS might use them to override
the default values, so we need to provide a definition.

Description of the change

Example of affeted app is gitg (without defining @theme_fg/text_color's the commit message in log view would be white).

To post a comment you must log in.
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Does this cover bug 1690966?

Revision history for this message
Iain Lane (laney) wrote :

couple of comments, feel free to land after resolving them

review: Needs Information
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Daniel, no... I guess we want a proper solution for that.

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Ok, updating as Laney requested

546. By Marco Trevisan (Treviño)

Ambiance, Radiance: improve wording and fix Radiance copy-paste typo

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Ambiance/gtk-3.20/gtk-main.css'
2--- Ambiance/gtk-3.20/gtk-main.css 2017-05-05 19:17:11 +0000
3+++ Ambiance/gtk-3.20/gtk-main.css 2017-05-16 10:30:37 +0000
4@@ -8,13 +8,71 @@
5 @define-color tooltip_bg_color #000000;
6 @define-color tooltip_fg_color #ffffff;
7
8+@define-color active_shadow_color black;
9+@define-color inactive_shadow_color alpha(black, 0.3);
10+
11+/** GTK NAMED COLORS: these might be reused by apps, keep in sync with Adwaita **/
12+/*
13+widget text/foreground color */
14+@define-color theme_fg_color @fg_color;
15+/*
16+text color for entries, views and content in general */
17+@define-color theme_text_color @fg_color;
18+/*
19+widget base background color */
20+@define-color theme_bg_color @bg_color;
21+/*
22+text widgets and the like base background color */
23+@define-color theme_base_color @base_color;
24+/*
25+base background color of selections */
26+@define-color theme_selected_bg_color @selected_bg_color;
27+/*
28+text/foreground color of selections */
29+@define-color theme_selected_fg_color @selected_fg_color;
30+/*
31+base background color of insensitive widgets */
32 @define-color insensitive_bg_color shade(@bg_color, 0.95);
33+/*
34+text foreground color of insensitive widgets */
35 @define-color insensitive_fg_color shade(@bg_color, 0.6);
36-
37+/*
38+insensitive text widgets and the like base background color */
39+@define-color insensitive_base_color @theme_base_color;
40+/*
41+widget text/foreground color on backdrop windows */
42+@define-color theme_unfocused_fg_color @backdrop_fg_color;
43+/*
44+text color for entries, views and content in general on backdrop windows */
45+@define-color theme_unfocused_text_color @backdrop_text_color;
46+/*
47+widget base background color on backdrop windows */
48+@define-color theme_unfocused_bg_color @theme_bg_color;
49+/*
50+text widgets and the like base background color on backdrop windows */
51+@define-color theme_unfocused_base_color @theme_base_color;
52+/*
53+base background color of selections on backdrop windows */
54+@define-color theme_unfocused_selected_bg_color @backdrop_selected_bg_color;
55+/*
56+text/foreground color of selections on backdrop windows */
57+@define-color theme_unfocused_selected_fg_color @backdrop_selected_fg_color;
58+/*
59+insensitive color on backdrop windows*/
60+@define-color unfocused_insensitive_color @insensitive_fg_color;
61+/*
62+widgets main borders color */
63 @define-color borders shade(@bg_color, 0.82);
64+/*
65+widgets main borders color on backdrop windows */
66+@define-color unfocused_borders @borders;
67+/*
68+these are pretty self explanatory */
69+@define-color warning_color #f57900;
70+@define-color error_color #df382c;
71+@define-color success_color #4e9a06;
72
73-@define-color active_shadow_color black;
74-@define-color inactive_shadow_color alpha(black, 0.3);
75+/** Default theme colors definition end **/
76
77 /* misc colors used by gtk+
78 *
79@@ -32,8 +90,6 @@
80 @define-color error_fg_color rgb (235, 235, 235);
81 @define-color error_bg_color rgb (223, 56, 44);
82 @define-color link_color @selected_bg_color;
83-@define-color success_color #4e9a06;
84-@define-color error_color #df382c;
85
86 /* theme common colors */
87 @define-color button_text_shadow alpha(white, 0.4);
88@@ -45,7 +101,6 @@
89
90 @define-color backdrop_fg_color mix (@bg_color, @fg_color, 0.8);
91 @define-color backdrop_text_color mix (@base_color, @text_color, 0.8);
92-@define-color theme_unfocused_text_color @backdrop_text_color;
93 @define-color backdrop_dark_fg_color mix (@dark_bg_color, @dark_fg_color, 0.75);
94 /*@define-color backdrop_dark_bg_color mix (@dark_bg_color, @dark_fg_color, 0.75);*/
95 @define-color backdrop_selected_bg_color shade (@bg_color, 0.92);
96
97=== modified file 'Radiance/gtk-3.20/gtk-main.css'
98--- Radiance/gtk-3.20/gtk-main.css 2017-05-05 19:17:11 +0000
99+++ Radiance/gtk-3.20/gtk-main.css 2017-05-16 10:30:37 +0000
100@@ -8,13 +8,69 @@
101 @define-color tooltip_bg_color #000000;
102 @define-color tooltip_fg_color #ffffff;
103
104+@define-color active_shadow_color black;
105+@define-color inactive_shadow_color alpha(black, 0.3);
106+
107+/** GTK NAMED COLORS: these might be reused by apps, keep in sync with Adwaita **/
108+/*
109+widget text/foreground color */
110+@define-color theme_fg_color @fg_color;
111+/*
112+text color for entries, views and content in general */
113+@define-color theme_text_color @fg_color;
114+/*
115+widget base background color */
116+@define-color theme_bg_color @bg_color;
117+/*
118+text widgets and the like base background color */
119+@define-color theme_base_color @base_color;
120+/*
121+base background color of selections */
122+@define-color theme_selected_bg_color @selected_bg_color;
123+/*
124+text/foreground color of selections */
125+@define-color theme_selected_fg_color @selected_fg_color;
126+/*
127+base background color of insensitive widgets */
128 @define-color insensitive_bg_color shade(@bg_color, 0.95);
129+/*
130+text foreground color of insensitive widgets */
131 @define-color insensitive_fg_color shade(@fg_color, 0.6);
132-
133+/*
134+insensitive text widgets and the like base background color */
135+@define-color insensitive_base_color @theme_base_color;
136+/*
137+widget text/foreground color on backdrop windows */
138+@define-color theme_unfocused_fg_color @backdrop_fg_color;
139+/*
140+text color for entries, views and content in general on backdrop windows */
141+@define-color theme_unfocused_text_color @backdrop_text_color;
142+/*
143+widget base background color on backdrop windows */
144+@define-color theme_unfocused_bg_color @theme_bg_color;
145+/*
146+text widgets and the like base background color on backdrop windows */
147+@define-color theme_unfocused_base_color @theme_base_color;
148+/*
149+base background color of selections on backdrop windows */
150+@define-color theme_unfocused_selected_bg_color @backdrop_selected_bg_color;
151+/*
152+text/foreground color of selections on backdrop windows */
153+@define-color theme_unfocused_selected_fg_color @backdrop_selected_fg_color;
154+/*
155+insensitive color on backdrop windows*/
156+@define-color unfocused_insensitive_color @insensitive_fg_color;
157+/*
158+widgets main borders color */
159 @define-color borders shade(@bg_color, 0.82);
160-
161-@define-color active_shadow_color black;
162-@define-color inactive_shadow_color alpha(black, 0.3);
163+/*
164+widgets main borders color on backdrop windows */
165+@define-color unfocused_borders @borders;
166+/*
167+these are pretty self explanatory */
168+@define-color warning_color #f57900;
169+@define-color error_color #df382c;
170+@define-color success_color #4e9a06;
171
172 /* misc colors used by gtk+
173 *
174@@ -33,8 +89,6 @@
175 @define-color error_fg_color rgb (235, 235, 235);
176 @define-color error_bg_color rgb (223, 56, 44);
177 @define-color link_color @selected_bg_color;
178-@define-color success_color #4e9a06;
179-@define-color error_color #df382c;
180
181 /* theme common colors */
182 @define-color button_bg_color shade (@bg_color, 1.02); /*shade (#cdcdcd, 1.08);*/
183@@ -45,7 +99,6 @@
184
185 @define-color backdrop_fg_color mix (@bg_color, @fg_color, 0.8);
186 @define-color backdrop_text_color mix (@base_color, @text_color, 0.8);
187-@define-color theme_unfocused_text_color @backdrop_text_color;
188 @define-color backdrop_dark_fg_color mix (@dark_bg_color, @dark_fg_color, 0.75);
189 @define-color backdrop_selected_bg_color shade (@bg_color, 0.92);
190 @define-color backdrop_selected_fg_color @fg_color;

Subscribers

People subscribed via source and target branches