Re: padding cleanup



Looking at ClutterBoxLayout, they separate x and y fill, which may be
worth adding here.

void                  clutter_box_layout_pack
(ClutterBoxLayout    *layout,

ClutterActor        *actor,
                                                              gboolean
            expand,
                                                              gboolean
            x_fill,
                                                              gboolean
            y_fill,

ClutterBoxAlignment  x_align,

ClutterBoxAlignment  y_align);

This function has the same "too many bools and ints" problem as
gtk_box_pack_start though (always have to look up the order when
reading/writing code, no compiler warning on mixing them up), and has
fill and align as separate dimensions, so I'd like to fix those issues
with a nice enum.

In my patch this would probably become:

typedef enum
{
  GTK_ALIGN_FILL_HORIZONTAL,
  GTK_ALIGN_FILL_VERTICAL,
  GTK_ALIGN_FILL, /* or FILL_BOTH? */
  GTK_ALIGN_START,
  GTK_ALIGN_END,
  GTK_ALIGN_CENTER
} GtkAlign;

So that would add another nice handy feature that's annoying to do
with GtkBox right now - you could eliminate the need for a
GtkAlignment to keep a widget from expanding perpendicular to box
orientation.

Havoc


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