Label alignment inconsistent between gtk/pango versions?



Hi all,

I'm facing some trouble with gtk label alignment and the ellipsize property with Pango.

It seems that the alignment of the label changes when setting the ellipsize property and I can't find how to get a consistent behavior between gtk+-2.6 with pango 1.10 and gtk+-2.8 and pango 1.12.

To illustrate that, I've made a small test program, available here:

http://www.xfce.org/~olivier/misc/testalign.tar.gz

Then I run the same executable on 3 different gtk+ versions and get different results, screenshot here:

http://www.xfce.org/~olivier/misc/testalign.png

The first one is with gtk+-2.4 so ellipisze property has no effect and generates a warning at runtime (expected).

But when run with gtk+-2.6 and pango 1.10, the label is aligned on the right (this is unexpected).

When run with gtk+-2.8 and pango 1.12, the label is properly centered.

Also, note that if I don't reset the "justify" property, then it's just the contrary, the label is centered with gtk+-2.6/pango-1.10 and left aligned with gtk+-2.8/pango-1.12.

Could someone sched my light on this, how can I get a consistent behavior with label alignment?

Thanks in advance,
Best regards,
Olivier.




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