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

Simon Schampijer simon at schampijer.de
Thu Apr 18 05:23:45 EDT 2013


Hi Manuel,

your patch does fix the Write-Color-Palette.

Which is the Abacus-Palette, the custom one? Is Walter aware of this fix 
and would remove his workaround (at least in master)?

Code looks good, please push, as well to 0.98.

Cheers,
    Simon

On 04/17/2013 10:12 PM, Manuel Quiñones wrote:O
> 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()
>
>



More information about the Sugar-devel mailing list