[Sugar-devel] Layout with gtk3

Manuel Quiñones manuq at laptop.org
Fri Nov 22 06:49:14 EST 2013


Hi,

sorry for not joining the discussion yet.  I'm a bit overloaded with
non-Sugar stuff.

I remember Agustín Zubiaga also mentioned Box(orientation) instead of
HBox, VBox at the time of the GTK3 port, and then I came to read about
Grid. When I checked, the GTK docs were recommending it, but most of
their code was not using it, and the API looked weird to me in Python,
less readable.  That is for a replacement of simple, flat boxes.  But
if Grid allows to remove the boxes nesting in Sugar widgets like
Palette, then we definetely should use it.

For the widget spacings and dimentions, keep in mind that part is done
in the Python code, and part in the artwork CSS. And some things can
be done in the two sides.

Example:

grid margin (Python):
https://developer.gnome.org/gtk3/stable/GtkWidget.html#GtkWidget--margin
margin (CSS) https://developer.gnome.org/gtk3/stable/GtkStyleContext.html#GTK-STYLE-PROPERTY-MARGIN:CAPS
separator height (CSS):
https://developer.gnome.org/gtk3/stable/GtkWidget.html#GtkWidget--s-separator-height

What I've been doing in styling is: use CSS as much as possible.  If
there is a CSS way and also a programmatic way, use CSS.

To check graphics regressions is good to do visual comparisons for example:
http://bugs.sugarlabs.org/attachment/ticket/4295/palette-border-wrong.gif

2013/11/21 Gonzalo Odiard <gonzalo at laptop.org>:
>
> On Thu, Nov 21, 2013 at 4:31 PM, Daniel Narvaez <dwnarvaez at gmail.com> wrote:
>>
>> What about this?
>
>
> Looks right.
>
>>
>> The whole progress thing is a widget by itself and it should probably be
>> factored out to a class but that's just cosmetic.
>>
>
> +1. Can be done later.
>
> Gonzalo
>
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>



-- 
.. manuq ..


More information about the Sugar-devel mailing list