[Sugar-devel] [PATCH] Color Palette: get back horizontal padding - SL #4325

Manuel Quiñones manuq at laptop.org
Wed Apr 17 16:12:11 EDT 2013


The PaletteWindow lost the horizontal padding when it started to be
used as replacement of palette menus.  So now each implementation has
to add the padding.

Signed-off-by: Manuel Quiñones <manuq at laptop.org>
---
 src/sugar3/graphics/colorbutton.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/sugar3/graphics/colorbutton.py b/src/sugar3/graphics/colorbutton.py
index 3f205ff..1d2faf8 100644
--- a/src/sugar3/graphics/colorbutton.py
+++ b/src/sugar3/graphics/colorbutton.py
@@ -255,7 +255,12 @@ class _ColorPalette(Palette):
         self.connect('popdown', self.__popdown_cb)
 
         self._picker_hbox = Gtk.HBox()
-        self.set_content(self._picker_hbox)
+        alignment = Gtk.Alignment()
+        alignment.set_padding(0, 0, style.DEFAULT_SPACING,
+                              style.DEFAULT_SPACING)
+        alignment.add(self._picker_hbox)
+        self.set_content(alignment)
+        alignment.show()
 
         self._swatch_tray = Gtk.Table()
 
-- 
1.8.1.4



More information about the Sugar-devel mailing list