| Summary: | [GTK3] The size of label with wrapping text is computed incorrectly | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Mikhail Gaykovoy <black.pojo> | ||||||
| Component: | SWT | Assignee: | Platform-SWT-Inbox <platform-swt-inbox> | ||||||
| Status: | CLOSED WORKSFORME | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | akurtakov, ericwill, gautier.desaintmartinlacaze | ||||||
| Version: | 4.6 | Keywords: | triaged | ||||||
| Target Milestone: | --- | ||||||||
| Hardware: | PC | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
Created attachment 265960 [details]
patch
Would you please provide the patch via gerrit and some snippet that demoes the issue/can be used for verifying the fix? (In reply to Alexander Kurtakov from comment #2) > Would you please provide the patch via gerrit and some snippet that demoes > the issue/can be used for verifying the fix? I'm interested in which Gtk version and theme this happens with so it is easier to try it out as can't be reproduced on my Fedora 25/Gtk 3.22/ Adwaita combo. (In reply to Alexander Kurtakov from comment #3) > (In reply to Alexander Kurtakov from comment #2) > > Would you please provide the patch via gerrit and some snippet that demoes > > the issue/can be used for verifying the fix? > > I'm interested in which Gtk version and theme this happens with so it is > easier to try it out as can't be reproduced on my Fedora 25/Gtk 3.22/ > Adwaita combo. We use Gtk 3.4.2 and Evolve theme (https://github.com/satya164/Evolve) Is this still an issue on GTK3.22? (In reply to Eric Williams from comment #5) > Is this still an issue on GTK3.22? No response in awhile and there have been some fixes to Label.computeSizeInPixels() lately, like bug 534768. Please reopen this ticket with a reproducer snippet if the issue occurs on 4.8 with GTK3.22. |
Created attachment 265944 [details] patch for label If Label has SWT.WRAP style, the method computeSizeInPixels(int, int, boolean) uses label's Pango layout to compute the size of text in pixels and uses this size as computed size of label. But when GTK3 is used, the origin of underlying Pango layout is shifted from the origin of label. This happens because there is padding setting for the label in the gtk3-theme. As result the text does not fit in computed size.