GNOME Bugzilla – Bug 614049
Allow packing options for GtkExpander label widgets
Last modified: 2010-08-10 03:19:47 UTC
Created attachment 157212 [details] screenshot https://bugs.launchpad.net/ubuntu/+source/evolution/+bug/545459 Binary package hint: evolution evolution new message is broken in Arabic locale steps to reproduce: 1.open evolution with in Arabic locale (you can use "LC_ALL=ar_SA.UTF-8 evolution" if you don't want to change the language of your system) 2.try to open new message you will be faced with a broken form of new message window with many of the text hidden. see attachment. what should be: good looking normal window this bug seems to effects all the Arabic locale user
By starting evolution from the shell, is there any output when doing this?
Reproducible in Evolution 2.28 too. Only shell output is: (evolution:6399): gtkhtml-editor-WARNING **: ar-SA: No such language New button seems to be broken too (other issue).
Created attachment 157331 [details] new task is broken too I found this bug in the new task window too
Created attachment 157378 [details] [review] Proposed patch This was caused by an evil hack I pulled in the attachment bar to get the "# Attachments (size)" label to remain centered. Works fine in LTR locales, not so much in RTL locales. So my workaround is to simply skip the hack in RTL locales. It just means the attachments label will be misaligned.
Created attachment 157392 [details] [review] Reproducer program Here's a small GTK+ program that reproduces the same issue: Run the program in a LTR locale and it renders fine. Run the program in a RTL locale and it fails to draw the window correctly. This appears to be a bug in GtkExpander. Reassigning to GTK+.
Lowering importance since this is a GTK+ issue and we have a workaround for Evolution.
I don't see any bug here. The size request misuse is clearly in the 'if it breaks, you keep both parts' area. If anything, this is an enhancement request for GtkExpander.
Fair enough, it is clearly a hack on my part. Any suggestions on a proper API for this? Only thing that comes to mind is to mimic GtkBox: void gtk_expander_set_label_packing (GtkExpander *expander, gboolean expand, gboolean fill, guint padding); Maybe "expand" doesn't make sense in this context?
Created attachment 157426 [details] [review] Proposed patch Decided "expand" doesn't make sense here and can't see a use case for "padding" when you can use a GtkAlignment, so I just added a new boolean property named "label-fill".
My evil GtkExpander hack for Evolution's composer is now tripping an assertion in GTK3's height-for-width logic, so I had to disable it altogether. The above patch would let me do what I'm trying to do properly.
Review of attachment 157426 [details] [review]: overall, I think that having a new packing property is not a bad thing. ::: gtk/gtkexpander.c @@ +673,3 @@ + 2 * focus_width - 2 * focus_pad; + expander_size - 2 * expander_spacing - + label_allocation.width = allocation->width - 2 * border_width - I think you mean: alloc_width = MIN(alloc_width, request_width) here.
I've fixed this up and committed it, thanks.