Community
Participate
Working Groups
Using gtk3.10 After applying workaround for bug 421127 (removing reference to CTabRendering in CSS), I could see that in many cases, some UI elements (generally text) gets painted out of its expected region. See http://imgur.com/rUkbs6a for a screenshot of what it look like. I investigated a little and got to see what happens when widgets are painted: http://imgur.com/QpaK5cx . The long blue element is the one that is selected when widget is painted (for exmaple because of a resize). It seems to me that a draw operation is happening when the size is not correctly computed so the operation has effects in area where is shouldn't have. As I could reproduce it only for elements which have text (trees, editors), I'm wondering whether this could be an issue in computing the size of the text to be displayed as well.
The org.eclipse.swt.widgets.Tree.rendererRender(long, long, long, long, long, long, long, long) method expects a cairo for the bin window of GtkViewport, but GTK >= 3.10 sends a cairo for the window of the tree widget. Besides, SWT invalidates the cairo. This isn't a problem in GTK < 3.10 because it always sends a new cairo. The patch fixes the issue by creating a new cairo whenever something is painted in this method. The patch: https://git.eclipse.org/r/#/c/25668
> The patch fixes the issue by creating a new cairo whenever something is > painted in this method. > > The patch: https://git.eclipse.org/r/#/c/25668 I have tried this out; the tree view is clipped properly but there are a couple of issues: - Horizontal scrolling does not move the text. Only the arrows. - The icons don't seem to be drawn. Just the text and arrows.
There is another bug for this issue: bug 427480
> There is another bug for this issue: bug 427480 Hmmm... I may have missed something but I believe the issues on bug 427480 (with the exception of the lack of clipping) are present with or without the patch where as the issues mentioned above are present only after applying the patch.
Could you, please, try both of the patches - https://git.eclipse.org/r/#/c/25758 and https://git.eclipse.org/r/#/c/25668?
(In reply to Snjezana Peco from comment #5) > Could you, please, try both of the patches - > https://git.eclipse.org/r/#/c/25758 and https://git.eclipse.org/r/#/c/25668? Looks good. Horizontal and vertical scroll both work and the content is properly clipped. I did notice the horizontal scrolling of the highlighting on the selected item is a bit strange. It seems like it is a bit out of sync with the highlighted item.
(In reply to Sami Wagiaalla from comment #6) > (In reply to Snjezana Peco from comment #5) > > I did notice the horizontal scrolling of the highlighting on the selected > item is a bit strange. It seems like it is a bit out of sync with the > highlighted item. I have updated the patch so that GTK also paints a background. Could you, please, test the patch?
(In reply to Snjezana Peco from comment #7) > (In reply to Sami Wagiaalla from comment #6) > > (In reply to Snjezana Peco from comment #5) > > > > I did notice the horizontal scrolling of the highlighting on the selected > > item is a bit strange. It seems like it is a bit out of sync with the > > highlighted item. > > I have updated the patch so that GTK also paints a background. > Could you, please, test the patch? All looks good. Content is clipped properly, horizontal and vertical scrolling works as expected.
Definetely improves the current situation significantly. Let's push it.
Arun, as there is already the review would you please push if you agree with it?
(In reply to Alexander Kurtakov from comment #10) > Arun, as there is already the review would you please push if you agree with > it? Done - http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=090e8dfef891d537ee91a695bdd9547272135b17
Bug 427511 was RESOLVED_FIXED in 4.4-RC1, but surprisingly below commit was made against this bug 427511 in 4.5 time-frame, which is causing a critical bug 464816: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=77d858e5c6ed3ebe8fa843c1bb721ed789ee186a