Merge lp:~elementary-pantheon/granite/welcome-style-classes into lp:~elementary-pantheon/granite/granite

Proposed by Danielle Foré
Status: Merged
Approved by: Corentin Noël
Approved revision: 989
Merged at revision: 989
Proposed branch: lp:~elementary-pantheon/granite/welcome-style-classes
Merge into: lp:~elementary-pantheon/granite/granite
Diff against target: 32 lines (+5/-0)
2 files modified
lib/Widgets/Welcome.vala (+4/-0)
lib/Widgets/WelcomeButton.vala (+1/-0)
To merge this branch: bzr merge lp:~elementary-pantheon/granite/welcome-style-classes
Reviewer Review Type Date Requested Status
elementary Pantheon team Pending
Review via email: mp+306158@code.launchpad.net

Commit message

Welcome.vala:
* Use Gtk.STYLE_CLASS_VIEW
* Use Gtk.STYLE_CLASS_DIM_LABEL
* Add "welcome" style class

Description of the change

This branch makes use of two Gtk native style class constants:

* View makes the background white

* Dim Label makes certain labels dim/grey

And also adds a style class "welcome" to the widget

This helps the welcome to feel more native when using themes that don't implement all of our style classes and also prepares us for the gtk 3.20 migration by making sure we can still target the welcome widget when GraniteWidgetsWelcome will no longer be a valid selector

You should see no difference between this branch and current trunk

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 'lib/Widgets/Welcome.vala'
2--- lib/Widgets/Welcome.vala 2016-01-01 01:08:54 +0000
3+++ lib/Widgets/Welcome.vala 2016-09-19 22:02:50 +0000
4@@ -79,6 +79,9 @@
5 }
6
7 construct {
8+ get_style_context ().add_class (Gtk.STYLE_CLASS_VIEW);
9+ get_style_context ().add_class ("welcome");
10+
11 title_label = new Gtk.Label (null);
12 title_label.justify = Gtk.Justification.CENTER;
13 title_label.hexpand = true;
14@@ -89,6 +92,7 @@
15 subtitle_label.hexpand = true;
16 subtitle_label.wrap = true;
17 subtitle_label.wrap_mode = Pango.WrapMode.WORD;
18+ subtitle_label.get_style_context ().add_class (Gtk.STYLE_CLASS_DIM_LABEL);
19 subtitle_label.get_style_context ().add_class ("h2");
20
21 // Options wrapper
22
23=== modified file 'lib/Widgets/WelcomeButton.vala'
24--- lib/Widgets/WelcomeButton.vala 2015-04-22 20:58:15 +0000
25+++ lib/Widgets/WelcomeButton.vala 2016-09-19 22:02:50 +0000
26@@ -84,6 +84,7 @@
27 button_description.valign = Gtk.Align.START;
28 button_description.set_line_wrap (true);
29 button_description.set_line_wrap_mode (Pango.WrapMode.WORD);
30+ button_description.get_style_context ().add_class (Gtk.STYLE_CLASS_DIM_LABEL);
31
32 get_style_context ().add_class (Gtk.STYLE_CLASS_FLAT);
33

Subscribers

People subscribed via source and target branches