Merge lp:~tintou/switchboard-plug-security-privacy/center-lock-label into lp:~elementary-apps/switchboard-plug-security-privacy/trunk

Proposed by Corentin Noël
Status: Merged
Approved by: Danielle Foré
Approved revision: 170
Merged at revision: 170
Proposed branch: lp:~tintou/switchboard-plug-security-privacy/center-lock-label
Merge into: lp:~elementary-apps/switchboard-plug-security-privacy/trunk
Diff against target: 70 lines (+15/-22)
1 file modified
src/LockPanel.vala (+15/-22)
To merge this branch: bzr merge lp:~tintou/switchboard-plug-security-privacy/center-lock-label
Reviewer Review Type Date Requested Status
Danielle Foré Approve
Review via email: mp+256050@code.launchpad.net

Commit message

Center lock labels.

To post a comment you must log in.
170. By Corentin Noël

Center lock labels.

Revision history for this message
Danielle Foré (danrabbit) wrote :

Looks good!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/LockPanel.vala'
2--- src/LockPanel.vala 2015-02-28 09:18:27 +0000
3+++ src/LockPanel.vala 2015-04-13 22:32:42 +0000
4@@ -1,6 +1,6 @@
5 // -*- Mode: vala; indent-tabs-mode: nil; tab-width: 4 -*-
6 /*-
7- * Copyright (c) 2014 Security & Privacy Plug (http://launchpad.net/your-project)
8+ * Copyright (c) 2014-2015 Security & Privacy Plug (https://launchpad.net/switchboard-plug-security-privacy)
9 *
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Library General Public
12@@ -17,7 +17,7 @@
13 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
14 * Boston, MA 02111-1307, USA.
15 *
16- * Authored by: Corentin Noël <tintou@mailoo.org>
17+ * Authored by: Corentin Noël <corentin@elementary.io>
18 */
19
20 public class SecurityPrivacy.LockPanel : Gtk.Grid {
21@@ -51,36 +51,29 @@
22 lock_sleep_switch.active = false;
23 });
24
25- lock_sleep_switch.notify["active"].connect (() => {
26+ lock_sleep_switch.notify["active"].connect (() => {
27 if (lock_sleep_switch.active)
28 locker.set_uint ("lock-after-screensaver", 1);
29 else
30 locker.set_uint ("lock-after-screensaver", 0);
31 });
32
33- lock_suspend_label.margin_bottom = 15;
34- lock_sleep_label.margin_bottom = 15;
35- lock_suspend_switch.margin_bottom = 10;
36- lock_sleep_switch.margin_bottom = 10;
37-
38 lock_suspend_label.halign = Gtk.Align.END;
39 lock_sleep_label.halign = Gtk.Align.END;
40+ lock_suspend_label.valign = Gtk.Align.CENTER;
41+ lock_sleep_label.valign = Gtk.Align.CENTER;
42 lock_suspend_switch.halign = Gtk.Align.START;
43 lock_sleep_switch.halign = Gtk.Align.START;
44
45- var grid_left = new Gtk.Grid ();
46- grid_left.expand = true;
47- grid_left.halign = Gtk.Align.END;
48- var grid_right = new Gtk.Grid ();
49- grid_right.expand = true;
50- grid_right.halign = Gtk.Align.START;
51-
52- grid_left.attach (lock_suspend_label, 0, 0, 1, 1);
53- grid_left.attach (lock_sleep_label, 0, 1, 1, 1);
54- grid_right.attach (lock_suspend_switch, 0, 0, 1, 1);
55- grid_right.attach (lock_sleep_switch, 0, 1, 1, 1);
56-
57- attach (grid_left, 0, 0, 1, 1);
58- attach (grid_right, 1, 0, 1, 1);
59+ var expander_grid = new Gtk.Grid ();
60+ expander_grid.hexpand = true;
61+
62+ attach (expander_grid, 0, 0, 4, 1);
63+ attach (lock_suspend_label, 1, 0, 1, 1);
64+ attach (lock_sleep_label, 1, 1, 1, 1);
65+ attach (lock_suspend_switch, 2, 0, 1, 1);
66+ attach (lock_sleep_switch, 2, 1, 1, 1);
67+
68+ hexpand = true;
69 }
70 }

Subscribers

People subscribed via source and target branches

to all changes: