[gnome-tweak-tool] Fix vexpand/valign in shell_extensions page



commit 4f195c74b31c1bcff01efeb0068f345aae6633d7
Author: John Stowers <john stowers gmail com>
Date:   Mon Aug 19 09:23:02 2013 +0200

    Fix vexpand/valign in shell_extensions page

 gtweak/tweaks/tweak_group_shell_extensions.py |   30 +++++++++++++++----------
 1 files changed, 18 insertions(+), 12 deletions(-)
---
diff --git a/gtweak/tweaks/tweak_group_shell_extensions.py b/gtweak/tweaks/tweak_group_shell_extensions.py
index 0b1bcc4..27f3cb3 100644
--- a/gtweak/tweaks/tweak_group_shell_extensions.py
+++ b/gtweak/tweaks/tweak_group_shell_extensions.py
@@ -33,6 +33,8 @@ class _ShellExtensionTweak(Gtk.ListBoxRow, Tweak):
         uuid = ext["uuid"]
 
         sw = Gtk.Switch()
+        sw.props.vexpand = False
+        sw.props.valign = Gtk.Align.CENTER
         sw.set_active(self._shell.extension_is_active(state, uuid))
         sw.connect('notify::active', self._on_extension_toggled, uuid)
         self.hbox.pack_start(sw, False, False, 0)
@@ -82,19 +84,23 @@ class _ShellExtensionTweak(Gtk.ListBoxRow, Tweak):
             if os.path.exists(prefs):
                 icon = Gtk.Image()  
                 icon.set_from_icon_name("emblem-system-symbolic", Gtk.IconSize.BUTTON)
-                cfg = Gtk.Button()
-                cfg.add(icon)
-                cfg.connect("clicked", self._on_configure_clicked, uuid)
-                self.hbox.pack_start(cfg, False, False, 0)
-
-        self.deleteButton = Gtk.Button("Remove")   
-        self.deleteButton.set_sensitive(False)
-        self.hbox.pack_start(self.deleteButton, False, False, 0)
-
+                btn = Gtk.Button()
+                btn.props.vexpand = False
+                btn.props.valign = Gtk.Align.CENTER
+                btn.add(icon)
+                btn.connect("clicked", self._on_configure_clicked, uuid)
+                self.hbox.pack_start(btn, False, False, 0)
+
+        btn = Gtk.Button("Remove")
+        btn.props.vexpand = False
+        btn.props.valign = Gtk.Align.CENTER
+        btn.set_sensitive(False)
+        self.hbox.pack_start(btn, False, False, 0)
         if ext.get("type") == GnomeShell.EXTENSION_TYPE["PER_USER"]:
-            self.deleteButton.get_style_context().add_class("suggested-action")
-            self.deleteButton.set_sensitive(True)
-            self.deleteButton.connect("clicked", self._on_extension_delete, uuid, ext["name"])
+            btn.get_style_context().add_class("suggested-action")
+            btn.set_sensitive(True)
+            btn.connect("clicked", self._on_extension_delete, uuid, ext["name"])
+        self.deleteButton = btn
 
         de = DisableExtension()
         de.connect('disable-extension', self._on_disable_extension, sw)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]