Hi Murray,

On 2014-07-17, at 5:25 PM, Murray Cumming <murr...@murrayc.com> wrote:

> I'm trying to replace a use of the deprecated GtkMisc:xalign property
> with the newer GtkWidget:halign property with some labels that are in a
> GtkSizeGroup. The (GTK_ALIGN_START) alignment doesn't seem to be having
> any effect, though it does when work using the deprecated xalign
> property.
> 
> This screenshot shows the result in Glade with some GtkBoxes and a
> GtkSizeGroup, and the correct behaviour in a GtkGrid. Should it work
> with a GtkSizeGroup?

Not in this way it cannot work.

The size group effects the request in a way that all labels have the same size 
(or "at least" the same size) while the widget halign property can only align a 
widget into its potential allocation... I.e the halign property has "allocation 
- request" pixels add to the left or right of those labels before giving a 
final allocation to the label.

The GtkMisc properties work because they center some opaque widget content 
inside that widget's allocation.

What would work is to place each GtkLabel into its own "box", use the halign 
properties on those labels and use the size groups on each label's "box".

Cheers,
    -Tristan


> 
> I can't just use a GtkGrid because I am actually using a custom
> container in my application.
> 
> -- 
> Murray Cumming
> murr...@murrayc.com
> www.murrayc.com
> 
> <screenshot_label_alignment_in_sizegroup.png>
> _______________________________________________
> gtk-devel-list mailing list
> gtk-devel-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gtk-devel-list
_______________________________________________
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list

Reply via email to