Web lists-archives.com

GtkGrid children and GTK_ALIGN_END




Hi,

Would it be correct to expect right-justification of a child in the
following situation?  (Assuming: GTK_ORIENTATION_HORIZONTAL,
GTK_TEXT_DIR_LTR.)

  GtkWindow
  |_ GtkGrid {hexpand=TRUE; halign=GTK_ALIGN_FILL}
     |_ GtkEntry {halign=GTK_ALIGN_END}

I believe GTK 3.12 used to place the GtkEntry flush with the right
edge of the window.

However, in GTK 3.22, the GtkEntry remains flush with the left edge,
regardless of GTK_ALIGN_END being set.

Here are the allocation values, and min & natural size values I'm
seeing:

alloc(   0,   0, 713, 715) min( 176,  38) nat( 176,  38) GtkWindow
alloc(   0,   0, 713,  38) min( 176,  38) nat( 176,  38)  GtkGrid
alloc(   4,   2, 168,  34) min( 176,  38) nat( 176,  38)   GtkEntry

We can see the allocation width of the GtkGrid did indeed expand as
requested.

But the halign=GTK_ALIGN_END setting of the GtkEntry child does not
appear to be honored.

I've perused the commit diffs in gtk/gtkgrid.c between 3.12 and 3.22,
but a fair amount has changed.

So I figured I'd better verify: *Should* we expect GTK_ALIGN_END to
be honored in the case above?


Thanks,

Bill


_______________________________________________
gtk-devel-list mailing list
gtk-devel-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-devel-list