Merge lp:~3v1n0/ubuntu-themes/suggested-action-states-fix into lp:ubuntu-themes

Proposed by Marco Trevisan (Treviño)
Status: Merged
Approved by: Didier Roche-Tolomelli
Approved revision: 586
Merged at revision: 582
Proposed branch: lp:~3v1n0/ubuntu-themes/suggested-action-states-fix
Merge into: lp:ubuntu-themes
Prerequisite: lp:~3v1n0/ubuntu-themes/active-tab-gradient-backdrop-mode
Diff against target: 297 lines (+116/-92)
4 files modified
Ambiance/gtk-3.20/gtk-main.css (+4/-2)
Ambiance/gtk-3.20/gtk-widgets.css (+54/-44)
Radiance/gtk-3.20/gtk-main.css (+4/-2)
Radiance/gtk-3.20/gtk-widgets.css (+54/-44)
To merge this branch: bzr merge lp:~3v1n0/ubuntu-themes/suggested-action-states-fix
Reviewer Review Type Date Requested Status
Didier Roche-Tolomelli Approve
Daniel van Vugt Disapprove
Review via email: mp+331842@code.launchpad.net

Commit message

Ambiance, Radiance: fix gradients for suggested-action hover, active and backdrop states

As bonus, update the colors used using definitions that match the ubuntu palette

Description of the change

Colors based on https://design.ubuntu.com/web/colour

Using darker gradients for hover, active and backdrop statesF

To post a comment you must log in.
584. By Marco Trevisan (Treviño)

Radiance: use fg_color text shadow for suggested-action

585. By Marco Trevisan (Treviño)

Radiance: use better gradients and for suggested-action

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

I don't think that active and backdrop should be change. It makes it appears as green, as so, as if it was enabled for the user (with a weird and unmatched grey label).

The current state which was designed is way clearer for the user: the button isn't really visible (but still different from other disabled buttons), and become green + white label once it's activated. See the 2 screenshots on https://imgur.com/a/6f3U9

review: Disapprove
586. By Marco Trevisan (Treviño)

Ambiance,Radiance: don't apply changes to disabled .suggested-action buttons

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

Oh, I didn't want to change the disabled mode. I've pushed a new revision fixing that, and thanks for spotting (I was sure I checked that case too!).

Anyway, backdrop *has* to be different, it's just consistency.

Compare here (first is current state, then new state): https://usercontent.irccloud-cdn.com/file/x1G0M70m/suggested-action-differences.mp4

The current button uses gradients and states which are not consistent with what other buttons do.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I think dark is a bad choice. Dark looks either disabled or depressed, when neither of those are true.

Hover highlighting I think should be light, at least for dark backgrounds like the Ambiance headerbar. Hovering over something should always increase its contrast with the background. So in that case it's the grey buttons I would like to see lighter when hovered. :)

I'm fairly confident most designers would agree with what I just said.

P.S. I don't understand what Didier is saying but don't need to if we both agree on Disapprove.

review: Disapprove
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

As we discussed on IRC, let's merge that one with a slight color change I'll do after this.
I agree with Daniel about the hovering being darker is a little bit weird, but that's already the global design for buttons in the headerbar.

review: Approve

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-07-06 20:38:41 +0000
3+++ Ambiance/gtk-3.20/gtk-main.css 2017-10-12 05:10:35 +0000
4@@ -68,9 +68,9 @@
5 @define-color unfocused_borders @borders;
6 /*
7 these are pretty self explanatory */
8-@define-color warning_color #f57900;
9+@define-color warning_color #eca918;
10 @define-color error_color #df382c;
11-@define-color success_color #4e9a06;
12+@define-color success_color #38b44a;
13
14 /** Default theme colors definition end **/
15
16@@ -125,6 +125,8 @@
17 @define-color progressbar_backdrop_fill_b shade(mix(@backdrop_selected_bg_color, grey, 0.10), 0.91);
18 @define-color button_border_backdrop_active shade(@backdrop_selected_bg_color, 0.95);
19
20+@define-color suggested_action_bg #38b44a;
21+
22 @import url("gtk-widgets-borders.css");
23 @import url("gtk-widgets-assets.css");
24 @import url("gtk-widgets.css");
25
26=== modified file 'Ambiance/gtk-3.20/gtk-widgets.css'
27--- Ambiance/gtk-3.20/gtk-widgets.css 2017-10-12 05:10:35 +0000
28+++ Ambiance/gtk-3.20/gtk-widgets.css 2017-10-12 05:10:35 +0000
29@@ -430,46 +430,6 @@
30 border-color: shade(@borders, 0.8);
31 }
32
33-/* Suggested action */
34-headerbar button.suggested-action {
35- background-image: -gtk-gradient (linear, left top, left bottom,
36- from (shade (#3eb34f, 1.08)),
37- color-stop (0.5, #3eb34f),
38- to (shade (#3eb34f, 0.94)));
39- border-radius: 12px;
40-}
41-
42-headerbar button.suggested-action label {
43- color: white;
44- text-shadow: 0 1px alpha (shade (black, 1.25), 0.4);
45-}
46-
47-headerbar button.suggested-action:hover {
48- background-image: -gtk-gradient (linear, left top, left bottom,
49- from (shade (#3eb34f, 1.20)),
50- color-stop (0.5, #3eb34f),
51- to (shade (#3eb34f, 0.85)));
52-}
53-
54-headerbar button.suggested-action:backdrop:hover {
55- background-image: -gtk-gradient (linear, left top, left bottom,
56- from (shade (#3eb34f, 1.20)),
57- color-stop (0.5, #3eb34f),
58- to (shade (#3eb34f, 0.85)));
59-}
60-
61-headerbar button.suggested-action:active {
62- background-image: -gtk-gradient (linear, left top, left bottom,
63- from (shade (#3eb34f, 1.01)),
64- color-stop (0.5, #3eb34f),
65- to (shade (#3eb34f, 0.98)));
66-}
67-
68-headerbar button.suggested-action:disabled label {
69- color: @fg_color;
70- text-shadow: none;
71-}
72-
73 /**************
74 * ComboBoxes *
75 **************/
76@@ -1506,11 +1466,11 @@
77 }
78
79 levelbar block.filled.high {
80- border-color: shade(@success_color, 0.85);
81+ border-color: shade(@suggested_action_bg, 0.85);
82 background-image: linear-gradient(to bottom,
83- shade(@success_color, 1.2),
84- @success_color 75%,
85- shade(@success_color, 0.95)
86+ shade(@suggested_action_bg, 1.2),
87+ @suggested_action_bg 75%,
88+ shade(@suggested_action_bg, 0.95)
89 );
90 }
91
92@@ -2585,6 +2545,56 @@
93 url("assets/button-toolbar@2.png"));
94 }
95
96+/* Suggested action */
97+headerbar button.suggested-action:not(:disabled) * {
98+ color: white;
99+ text-shadow: 0 -1px shade (@dark_bg_color, 1.2);
100+}
101+
102+headerbar button.suggested-action:not(:disabled) {
103+ background-image: -gtk-gradient (linear, left top, left bottom,
104+ from (shade (@suggested_action_bg, 1.10)),
105+ to (shade (@suggested_action_bg, 0.90)));
106+ border-radius: 12px;
107+}
108+
109+headerbar button.suggested-action:hover {
110+ background-image: -gtk-gradient (linear, left top, left bottom,
111+ from (shade (@suggested_action_bg, 0.93)),
112+ to (shade (@suggested_action_bg, 0.75)));
113+}
114+
115+headerbar button.suggested-action:backdrop:not(:disabled) * {
116+ color: shade (white, 0.65);
117+}
118+
119+headerbar button.suggested-action:backdrop:not(:disabled) {
120+ background-image: -gtk-gradient (linear, left top, left bottom,
121+ from (shade (@suggested_action_bg, 0.65)),
122+ to (shade (@suggested_action_bg, 0.65)));
123+}
124+
125+headerbar button.suggested-action:hover:backdrop {
126+ background-image: -gtk-gradient (linear, left top, left bottom,
127+ from (shade (@suggested_action_bg, 0.77)),
128+ to (shade (@suggested_action_bg, 0.75)));
129+}
130+
131+headerbar button.suggested-action:hover:backdrop * {
132+ color: shade (white, 0.67);
133+}
134+
135+headerbar button.suggested-action:active {
136+ background-image: -gtk-gradient (linear, left top, left bottom,
137+ from (shade (@suggested_action_bg, 0.80)),
138+ to (shade (@suggested_action_bg, 0.65)));
139+}
140+
141+headerbar button.suggested-action:disabled * {
142+ color: @fg_color;
143+ text-shadow: none;
144+}
145+
146 .primary-toolbar separator,
147 .primary-toolbar separator,
148 .primary-toolbar separator:disabled,
149
150=== modified file 'Radiance/gtk-3.20/gtk-main.css'
151--- Radiance/gtk-3.20/gtk-main.css 2017-08-28 15:33:12 +0000
152+++ Radiance/gtk-3.20/gtk-main.css 2017-10-12 05:10:35 +0000
153@@ -68,9 +68,9 @@
154 @define-color unfocused_borders @borders;
155 /*
156 these are pretty self explanatory */
157-@define-color warning_color #f57900;
158+@define-color warning_color #eca918;
159 @define-color error_color #df382c;
160-@define-color success_color #4e9a06;
161+@define-color success_color #38b44a;
162
163 /* misc colors used by gtk+
164 *
165@@ -124,6 +124,8 @@
166 @define-color progressbar_backdrop_fill_b shade(mix(@backdrop_selected_bg_color, grey, 0.10), 0.91);
167 @define-color button_border_backdrop_active shade(@backdrop_selected_bg_color, 0.95);
168
169+@define-color suggested_action_bg #38b44a;
170+
171 @import url("gtk-widgets-borders.css");
172 @import url("gtk-widgets-borders-radiance.css");
173 @import url("gtk-widgets-assets.css");
174
175=== modified file 'Radiance/gtk-3.20/gtk-widgets.css'
176--- Radiance/gtk-3.20/gtk-widgets.css 2017-10-12 05:10:35 +0000
177+++ Radiance/gtk-3.20/gtk-widgets.css 2017-10-12 05:10:35 +0000
178@@ -1465,11 +1465,11 @@
179 }
180
181 levelbar block.filled.high {
182- border-color: shade(@success_color, 0.85);
183+ border-color: shade(@suggested_action_bg, 0.85);
184 background-image: linear-gradient(to bottom,
185- shade(@success_color, 1.2),
186- @success_color 75%,
187- shade(@success_color, 0.95)
188+ shade(@suggested_action_bg, 1.2),
189+ @suggested_action_bg 75%,
190+ shade(@suggested_action_bg, 0.95)
191 );
192 }
193
194@@ -2552,6 +2552,56 @@
195 url("assets/radiance-button-toolbar@2.png"));
196 }
197
198+/* Suggested action */
199+headerbar button.suggested-action:not(:disabled) * {
200+ color: white;
201+ text-shadow: 0 -1px shade (@fg_color, 1.2);
202+}
203+
204+headerbar button.suggested-action:not(:disabled) {
205+ background-image: -gtk-gradient (linear, left top, left bottom,
206+ from (shade (@suggested_action_bg, 1.10)),
207+ to (shade (@suggested_action_bg, 0.90)));
208+ border-radius: 12px;
209+}
210+
211+headerbar button.suggested-action:hover {
212+ background-image: -gtk-gradient (linear, left top, left bottom,
213+ from (shade (@suggested_action_bg, 0.98)),
214+ to (shade (@suggested_action_bg, 0.79)));
215+}
216+
217+headerbar button.suggested-action:backdrop:not(:disabled) * {
218+ color: alpha (white, 0.65);
219+}
220+
221+headerbar button.suggested-action:backdrop:not(:disabled) {
222+ background-image: -gtk-gradient (linear, left top, left bottom,
223+ from (alpha (@suggested_action_bg, 0.80)),
224+ to (alpha (@suggested_action_bg, 0.80)));
225+}
226+
227+headerbar button.suggested-action:hover:backdrop {
228+ background-image: -gtk-gradient (linear, left top, left bottom,
229+ from (alpha (@suggested_action_bg, 0.70)),
230+ to (alpha (@suggested_action_bg, 0.69)));
231+}
232+
233+headerbar button.suggested-action:hover:backdrop * {
234+ color: alpha (white, 0.67);
235+}
236+
237+headerbar button.suggested-action:active {
238+ background-image: -gtk-gradient (linear, left top, left bottom,
239+ from (shade (@suggested_action_bg, 0.85)),
240+ to (shade (@suggested_action_bg, 0.70)));
241+}
242+
243+headerbar button.suggested-action:disabled * {
244+ color: @fg_color;
245+ text-shadow: none;
246+}
247+
248 .primary-toolbar separator,
249 .primary-toolbar separator,
250 .primary-toolbar separator:disabled,
251@@ -2678,46 +2728,6 @@
252 border-radius: 8px;
253 }
254
255-headerbar button.suggested-action {
256- background-image: -gtk-gradient (linear, left top, left bottom,
257- from (shade (#3eb34f, 1.08)),
258- color-stop (0.5, #3eb34f),
259- to (shade (#3eb34f, 0.94)));
260- border-radius: 12px;
261-}
262-
263-headerbar button.suggested-action label {
264- color: white;
265- text-shadow: 0 1px alpha (shade (black, 1.25), 0.4);
266-}
267-
268-headerbar button.suggested-action:hover {
269- background-image: -gtk-gradient (linear, left top, left bottom,
270- from (shade (#3eb34f, 1.20)),
271- color-stop (0.5, #3eb34f),
272- to (shade (#3eb34f, 0.85)));
273-}
274-
275-headerbar button.suggested-action:backdrop:hover {
276- background-image: -gtk-gradient (linear, left top, left bottom,
277- from (shade (#3eb34f, 1.20)),
278- color-stop (0.5, #3eb34f),
279- to (shade (#3eb34f, 0.85)));
280-}
281-
282-headerbar button.suggested-action:active {
283- background-image: -gtk-gradient (linear, left top, left bottom,
284- from (shade (#3eb34f, 1.01)),
285- color-stop (0.5, #3eb34f),
286- to (shade (#3eb34f, 0.98)));
287-}
288-
289-headerbar button.suggested-action:disabled label {
290- color: @fg_color;
291- text-shadow: none;
292-}
293-
294-
295 /***********
296 * tooltip *
297 ***********/

Subscribers

People subscribed via source and target branches