Merge lp:~elementary-pantheon/switchboard/update-alert-style into lp:~elementary-pantheon/switchboard/switchboard

Proposed by Danielle Foré
Status: Merged
Approved by: Cody Garver
Approved revision: 546
Merged at revision: 546
Proposed branch: lp:~elementary-pantheon/switchboard/update-alert-style
Merge into: lp:~elementary-pantheon/switchboard/switchboard
Diff against target: 51 lines (+4/-6)
1 file modified
src/EmbeddedAlert.vala (+4/-6)
To merge this branch: bzr merge lp:~elementary-pantheon/switchboard/update-alert-style
Reviewer Review Type Date Requested Status
elementary Pantheon team Pending
Review via email: mp+252390@code.launchpad.net

Commit message

updates embedded alert to:
* remove deprecated content-view class
* use h2 instead of pango for text style
* use 48px icon instead of 64px

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/EmbeddedAlert.vala'
2--- src/EmbeddedAlert.vala 2014-11-04 23:12:02 +0000
3+++ src/EmbeddedAlert.vala 2015-03-10 01:34:52 +0000
4@@ -31,8 +31,6 @@
5 const string QUESTION_ICON = "dialog-question";
6 const string INFO_ICON = "dialog-information";
7
8- const string PRIMARY_TEXT_MARKUP = "<span weight=\"bold\" size=\"larger\">%s</span>";
9-
10 private Gtk.Box content_hbox;
11
12 protected Gtk.Label primary_text_label;
13@@ -45,12 +43,12 @@
14
15 public EmbeddedAlert () {
16 get_style_context ().add_class (Gtk.STYLE_CLASS_VIEW);
17- get_style_context ().add_class (Granite.StyleClass.CONTENT_VIEW);
18
19 action_button_box = new Gtk.ButtonBox (Gtk.Orientation.HORIZONTAL);
20 action_button_box.valign = Gtk.Align.START;
21
22 primary_text_label = new Gtk.Label (null);
23+ primary_text_label.get_style_context ().add_class ("h2");
24 primary_text_label.margin_bottom = 12;
25
26 secondary_text_label = new Gtk.Label (null);
27@@ -111,7 +109,7 @@
28 primary_text_label.halign = secondary_text_label.halign = Gtk.Align.START;
29 primary_text_label.justify = Gtk.Justification.LEFT;
30 secondary_text_label.justify = Gtk.Justification.FILL;
31- image.set_pixel_size(64);
32+ image.set_pixel_size(48);
33
34 // TODO: More intelligent icon support, I guess. Or support all the
35 // MessageType flags.
36@@ -179,7 +177,7 @@
37 set_buttons_visible (false);
38 }
39
40- primary_text_label.set_markup (PRIMARY_TEXT_MARKUP.printf (Markup.escape_text (primary_text, -1)));
41+ primary_text_label.set_markup (primary_text);
42 secondary_text_label.set_markup (secondary_text);
43 }
44
45@@ -249,4 +247,4 @@
46
47 return action_button;
48 }
49-}
50\ No newline at end of file
51+}

Subscribers

People subscribed via source and target branches