Merge lp:~octoquad/software-center/899878-hardcoded-colors-dark-theme into lp:software-center

Proposed by Bruce Pieterse on 2015-08-23
Status: Merged
Merged at revision: 3338
Proposed branch: lp:~octoquad/software-center/899878-hardcoded-colors-dark-theme
Merge into: lp:software-center
Prerequisite: lp:~octoquad/software-center/1448355-docs-fix-aptdaemon-test
Diff against target: 179 lines (+130/-5)
4 files modified
data/ui/gtk3/css/softwarecenter.adwaita-dark.css (+120/-0)
data/ui/gtk3/css/softwarecenter.css (+2/-2)
softwarecenter/ui/gtk3/utils.py (+7/-2)
softwarecenter/ui/gtk3/views/catview.py (+1/-1)
To merge this branch: bzr merge lp:~octoquad/software-center/899878-hardcoded-colors-dark-theme
Reviewer Review Type Date Requested Status
dobey 2015-08-23 Approve on 2016-01-06
Didier Roche 2015-09-02 Approve on 2015-09-03
Review via email: mp+268849@code.launchpad.net

Description of the change

Added support for Adwaita Dark Theme Variant

- Added new softwarecenter.adwaita-dark.css file
- Added detection for adwaita and dark theme setting
- Adjusted transparency drawing of stipple by 20%

To post a comment you must log in.
Didier Roche (didrocks) wrote :

Looking good to me, I tried with adwaita and ambiance/radiance.

The stipple changes don't seem to have a huge impact UI change on white themes, so all is good :)
Thanks again! Merging and patching our wily packages with it.

review: Approve
dobey (dobey) wrote :

Please sign the contributor agreement at http://www.ubuntu.com/legal/contributors as it is required for Software Center. Thanks

review: Needs Fixing
Bruce Pieterse (octoquad) wrote :

Signed.

dobey (dobey) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'data/ui/gtk3/css/softwarecenter.adwaita-dark.css'
2--- data/ui/gtk3/css/softwarecenter.adwaita-dark.css 1970-01-01 00:00:00 +0000
3+++ data/ui/gtk3/css/softwarecenter.adwaita-dark.css 2015-08-23 11:56:20 +0000
4@@ -0,0 +1,120 @@
5+/* UI Colors
6+
7+ Palette: https://developer.gnome.org/hig-book/unstable/design-color.html.en
8+*/
9+
10+@define-color accent-red-dark #990000;
11+@define-color basic-threed-hilight #EAE8E3;
12+@define-color basic-threed-medium #BAB5AB;
13+@define-color blue-hilight #4B6983;
14+@define-color blue-medium #7590AE;
15+@define-color blue-shadow #314E6C;
16+@define-color threed-shadow #565248;
17+@define-color basic-threed-dark #807D74;
18+
19+/* - Custom */
20+@define-color custom-nls-pane #292929;
21+@define-color custom-nls-focus-blue #154D90;
22+@define-color custom-light-blue #8DB3DF;
23+@define-color custom-light-gray #C4C4C4;
24+
25+/* - Debugging Color */
26+@define-color debug #990000;
27+
28+/*
29+ do not use text-shadow until bugzilla.gnome.org bug #686209 is
30+ fixed - its leaking memory. Has Status: RESOLVED FIXED as of 2015-05-27. Safe to use?
31+*/
32+
33+/* GTK */
34+GtkViewport {
35+ background-color: @custom-nls-pane;
36+ border-width: 0;
37+ padding: 0;
38+}
39+
40+/* - More, Category Listing */
41+GtkTreeView {
42+ background-color: @custom-nls-pane;
43+}
44+GtkTreeView:selected {
45+ background-color: @custom-nls-focus-blue;
46+}
47+
48+/* All Software, Installed Drop-Downs */
49+#toolbar-popup {
50+ padding: 0;
51+}
52+
53+
54+/* Landing */
55+
56+/* - What's New, Top Rated Table Header
57+ - - More Button
58+*/
59+.more-link {
60+ -GtkButton-inner-border: 0;
61+ -GtkButton-default-border: 0;
62+ -GtkButton-default-outside-border: 0;
63+ color: @custom-light-gray;
64+ background-color: shade (@custom-nls-pane, 0.925);
65+ border-color: shade (@custom-nls-pane, 0.875);
66+ padding: 10px;
67+}
68+
69+.more-link:hover {
70+ color: @blue-hilight;
71+}
72+
73+/* - - Table Header*/
74+.frame-header-title {
75+ color: @basic-threed-hilight;
76+ padding: 10px;
77+}
78+
79+/* - - Table Cells */
80+.grid-lines {
81+ border-color: @threed-shadow;
82+}
83+
84+/* - Price, Hints
85+ - - App Info: Version, Total Size, License, Updates
86+*/
87+.subtle,
88+#subtle-label {
89+ -GtkWidget-link-color: shade (@basic-threed-hilight 1);
90+ -GtkWidget-visited-link-color: shade (@basic-threed-hilight, 1);
91+ color: shade (@basic-threed-hilight, 1); /* non-link text color */
92+}
93+
94+/* - Package Information */
95+#screenshot-preview {
96+ border-color: @blue-shadow;
97+ color: @blue-hilight;
98+ border-width: 2px;
99+ border-radius: 3px;
100+}
101+
102+/* - - Horizontal Rule */
103+.item-view-separator {
104+ border-color: shade (@threed-shadow, 0.9);
105+ border-width: 1px;
106+}
107+
108+/* Category Listing */
109+/* - Row Information: Review Counter: Package Name ***** (12) */
110+.cellrenderer-avgrating-label {
111+ color: @threed-shadow;
112+ background-color: @custom-light-gray;
113+}
114+.cellrenderer-avgrating-label:selected {
115+ color: @basic-threed-hilight;
116+ background-color: @custom-light-blue;
117+}
118+
119+/* Global */
120+/* - Ratings Star */
121+#featured-star {
122+ border-color: @basic-threed-medium;
123+ color: @basic-threed-hilight;
124+}
125
126=== modified file 'data/ui/gtk3/css/softwarecenter.css'
127--- data/ui/gtk3/css/softwarecenter.css 2012-10-16 09:21:14 +0000
128+++ data/ui/gtk3/css/softwarecenter.css 2015-08-23 11:56:20 +0000
129@@ -1,8 +1,8 @@
130 @define-color light-aubergine #DED7DB;
131 @define-color super-light-aubergine #F4F1F3;
132
133-/*
134- do not use text-shadow until bugzilla.gnome.org bug #686209 is
135+/*
136+ do not use text-shadow until bugzilla.gnome.org bug #686209 is
137 fixed - its leaking memory
138 */
139
140
141=== modified file 'softwarecenter/ui/gtk3/utils.py'
142--- softwarecenter/ui/gtk3/utils.py 2012-11-23 22:57:21 +0000
143+++ softwarecenter/ui/gtk3/utils.py 2015-08-23 11:56:20 +0000
144@@ -52,6 +52,7 @@
145 datadir = softwarecenter.paths.datadir
146 context = toplevel.get_style_context()
147 theme_name = settings.get_property("gtk-theme-name").lower()
148+ adwaita_dark_theme = settings.get_property("gtk-application-prefer-dark-theme")
149
150 if hasattr(toplevel, '_css_provider'):
151 # check old provider, see if we can skip setting or remove old
152@@ -62,8 +63,12 @@
153 context.remove_provider_for_screen(screen, toplevel._css_provider)
154
155 # munge css path for theme-name
156- css_path = os.path.join(
157- datadir, "ui/gtk3/css/softwarecenter.%s.css" % theme_name)
158+ if theme_name == 'adwaita' and adwaita_dark_theme:
159+ css_path = os.path.join(
160+ datadir, "ui/gtk3/css/softwarecenter.%s-dark.css" % theme_name)
161+ else:
162+ css_path = os.path.join(
163+ datadir, "ui/gtk3/css/softwarecenter.%s.css" % theme_name)
164
165 # if no css for theme-name try fallback css
166 if not os.path.exists(css_path):
167
168=== modified file 'softwarecenter/ui/gtk3/views/catview.py'
169--- softwarecenter/ui/gtk3/views/catview.py 2012-12-14 16:44:25 +0000
170+++ softwarecenter/ui/gtk3/views/catview.py 2015-08-23 11:56:20 +0000
171@@ -175,7 +175,7 @@
172 def do_draw(self, cr):
173 cr.save()
174 cr.set_source(_asset_cache["stipple"])
175- cr.paint_with_alpha(0.5)
176+ cr.paint_with_alpha(0.3)
177 cr.restore()
178 for child in self:
179 self.propagate_draw(child, cr)