Merge lp:~tintou/granite/welcome-simplify into lp:~elementary-pantheon/granite/granite

Proposed by Corentin Noël
Status: Merged
Approved by: Danielle Foré
Approved revision: 919
Merged at revision: 919
Proposed branch: lp:~tintou/granite/welcome-simplify
Merge into: lp:~elementary-pantheon/granite/granite
Diff against target: 64 lines (+18/-29)
1 file modified
lib/Widgets/Welcome.vala (+18/-29)
To merge this branch: bzr merge lp:~tintou/granite/welcome-simplify
Reviewer Review Type Date Requested Status
elementary Pantheon team Pending
Review via email: mp+281437@code.launchpad.net

Commit message

Simplify the Welcome layout

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 2015-04-22 20:58:15 +0000
3+++ lib/Widgets/Welcome.vala 2015-12-31 03:02:40 +0000
4@@ -79,42 +79,31 @@
5 }
6
7 construct {
8- Gtk.Box content = new Gtk.Box (Gtk.Orientation.VERTICAL, 0);
9-
10- // Box properties
11- content.homogeneous = false;
12-
13- // Top spacer
14- content.pack_start (new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0), true, true, 0);
15-
16- // Labels
17 title_label = new Gtk.Label (null);
18+ title_label.justify = Gtk.Justification.CENTER;
19+ title_label.hexpand = true;
20 title_label.get_style_context ().add_class ("h1");
21
22- title_label.set_justify (Gtk.Justification.CENTER);
23- content.pack_start (title_label, false, true, 0);
24-
25 subtitle_label = new Gtk.Label (null);
26+ subtitle_label.justify = Gtk.Justification.CENTER;
27+ subtitle_label.hexpand = true;
28+ subtitle_label.wrap = true;
29+ subtitle_label.wrap_mode = Pango.WrapMode.WORD;
30 subtitle_label.get_style_context ().add_class ("h2");
31
32- subtitle_label.set_line_wrap (true);
33- subtitle_label.set_line_wrap_mode (Pango.WrapMode.WORD);
34- subtitle_label.set_justify (Gtk.Justification.CENTER);
35-
36- content.pack_start (subtitle_label, false, true, 2);
37-
38 // Options wrapper
39- this.options = new Gtk.Box (Gtk.Orientation.VERTICAL, 8);
40- var options_wrapper = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0);
41-
42- options_wrapper.pack_start (new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0), true, true, 0); // left padding
43- options_wrapper.pack_start (this.options, false, false, 0); // actual options
44- options_wrapper.pack_end (new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0), true, true, 0); // right padding
45-
46- content.pack_start (options_wrapper, false, false, 20);
47-
48- // Bottom spacer
49- content.pack_end (new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0), true, true, 0);
50+ this.options = new Gtk.Box (Gtk.Orientation.VERTICAL, 9);
51+ options.halign = Gtk.Align.CENTER;
52+ options.margin = 12;
53+
54+ var content = new Gtk.Grid ();
55+ content.expand = true;
56+ content.margin_top = 12;
57+ content.valign = Gtk.Align.CENTER;
58+ content.orientation = Gtk.Orientation.VERTICAL;
59+ content.add (title_label);
60+ content.add (subtitle_label);
61+ content.add (options);
62
63 add (content);
64 }

Subscribers

People subscribed via source and target branches