GNOME Bugzilla – Bug 687286
Icon view text rows misaligned
Last modified: 2012-11-08 14:52:26 UTC
Created attachment 227753 [details] Screenshot of misaligned icon view text As you can see in the attached screenshot, the text columns of the 2nd item are misaligned towards the right. Probably a libgd bug but need to investigate..
Created attachment 228226 [details] Another screenshot w/ fake labels Here is another screenshot of the issue with fake labels. Looking at both screenshots, it seems that text is centered if it fits in the same line.
This is an issue in libgd/gd-two-lines-renderer.c when using wrap-width It sets the layout widths based on wrap_width, and then does the layout calculation based on that, but then gd_two_lines_renderer_render() does: /* now render the first layout */ pango_layout_set_width (layout_one, (cell_area->width - x_offset_1 - 2 * xpad) * PANGO_SCALE); This overrides the wrap_width to the full width after then initial centering of the label. This causes the wrapping to change and the label to look off-center. Just deleting the two set_width from gd_two_lines_renderer_render() fixes this case. But I'm not sure if they are required for some other case?
I pushed a fix for this bug now, thanks for the report.
Created attachment 228457 [details] Screenshot of regression This fix seems to cause a regression. See attached screenshot. The 2nd line is supposed to say "Installing.."
Thanks, I missed one last part of the fix; can you try again with libgd master? I pushed another patch that should solve this.
(In reply to comment #5) > Thanks, I missed one last part of the fix; can you try again with libgd master? > I pushed another patch that should solve this. Yup, that fixes the last issue. Thanks for the quick action. Now i can do the demo at KVM forum tomorrow. :)