Merge lp:~elementary-apps/switchboard/category-label-css into lp:~elementary-pantheon/switchboard/switchboard

Proposed by Danielle Foré
Status: Merged
Approved by: Cody Garver
Approved revision: 462
Merged at revision: 463
Proposed branch: lp:~elementary-apps/switchboard/category-label-css
Merge into: lp:~elementary-pantheon/switchboard/switchboard
Diff against target: 24 lines (+1/-13)
1 file modified
src/CategoryView.vala (+1/-13)
To merge this branch: bzr merge lp:~elementary-apps/switchboard/category-label-css
Reviewer Review Type Date Requested Status
elementary Pantheon team Pending
Review via email: mp+227656@code.launchpad.net

Commit message

replace hardcoded CSS with .category-label class and do the styling in the theme

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/CategoryView.vala'
2--- src/CategoryView.vala 2014-05-26 08:51:58 +0000
3+++ src/CategoryView.vala 2014-07-22 00:19:06 +0000
4@@ -56,19 +56,7 @@
5
6 private void setup_category (Switchboard.Plug.Category category, int i) {
7 var category_label = new Gtk.Label (get_category_name (category));
8- var fg_css = new Gtk.CssProvider ();
9-
10- try {
11- fg_css.load_from_data ("*{
12- color: shade (@bg_color, 0.4);
13- font: open sans 11;
14- font-weight: 600;
15- text-shadow: 0 1px alpha (#fff, 0.6);
16- }", -1);
17- category_label.get_style_context ().add_provider (fg_css, 20000);
18- } catch (Error e) {
19- critical (e.message);
20- }
21+ category_label.get_style_context ().add_class ("category-label");
22
23 category_label.margin_left = 12;
24 category_label.margin_right = 8;

Subscribers

People subscribed via source and target branches