GNOME Bugzilla – Bug 469593
Clearlooks randomly overwrites PangoLayout size attribute
Last modified: 2007-08-23 16:23:42 UTC
If I create a PangoLayout using gtk_widget_create_pango_layout and set its size by doing something like: attrs = pango_attr_list_new (); pango_attr_list_change (attrs, pango_attr_size_new (NUMBER)); pango_layout_set_attributes (layout, attrs); Then draw the layout using gtk_paint_layout, the layout will randomly be drawn with the default size instead of the specified size. I really have no idea what condition causes this I'm afraid, but it happens with the 'Clearlooks' theme and not with the 'Mist' theme.
Hm, I don't see how this can be happening. Clearlooks only calls gdk_draw_layout and gdk_draw_layout_with_colors (when the text is insensitive). No layout changes should happen there.
I have just asked in #gtk+ and it seems like your code snippet is wrong. You need to set the start and end position of the attribute, or else you will get random results. Closing, feel free to reopen should this not be the cause of the problem.
Lets initialize all attrs to start/end=0/MAXUINT then: Bug 469641 – Initialize attribute start/end to [0..MAXUINT]