Bug 528284 - [GTK3] Toolbar: TCF dropdown control is cutoff
Summary: [GTK3] Toolbar: TCF dropdown control is cutoff
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.7   Edit
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Target Milestone: 4.8 M5   Edit
Assignee: Eric Williams CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2017-12-07 12:30 EST by Isaac Pendergrass CLA
Modified: 2018-01-23 11:04 EST (History)
4 users (show)

See Also:


Attachments
Image of cutoff tcf control. (40.82 KB, image/png)
2017-12-07 12:30 EST, Isaac Pendergrass CLA
no flags Details
GTK2 vs. GTK3 on Ubuntu 16.04 (17.39 KB, image/png)
2018-01-05 13:22 EST, Tony Homer CLA
no flags Details
Snippet to reproduce the issue (2.48 KB, text/x-java)
2018-01-16 10:45 EST, Eric Williams CLA
no flags Details
TCF dropdown before vs. with patch (4.68 KB, image/png)
2018-01-17 10:57 EST, Eric Williams CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Isaac Pendergrass CLA 2017-12-07 12:30:38 EST
Created attachment 271816 [details]
Image of cutoff tcf control.

When upgrading to GTK3, the tcf control in the toolbar is cutoff at the bottom. (Image attached) This happens for both, Neon and Oxygen.

GTK version: 3.18.9
Comment 1 Andrey Loskutov CLA 2017-12-07 17:23:53 EST
What is TCF and hiw to reproduce the problem? Have you tried Eclipse 4.8?
Comment 2 Eric Williams CLA 2017-12-19 14:58:37 EST
I can reproduce the issue. The widget in question is a CCombo widget.

GTK3.22
Fedora 27
Photon M4
Comment 3 Tony Homer CLA 2018-01-05 13:22:38 EST
Created attachment 272150 [details]
GTK2 vs. GTK3 on Ubuntu 16.04

Added side-by-side comparison showing difference between GTK2 and GTK3 on Ubuntu 16.04.
Comment 4 Eric Williams CLA 2018-01-11 15:58:34 EST
Removing the CCombo tag, as this isn't actually a CCombo (I was mistaken).

Question: does happen on any other versions of GTK3? Or was there a switch from GTK2 to GTK3, and therefore this bug was noticed?
Comment 5 Eric Williams CLA 2018-01-16 10:45:10 EST
Created attachment 272282 [details]
Snippet to reproduce the issue

I've attached a snippet to reproduce the issue. I'll commit this snippet to the bug repository as well once the bug is fixed.
Comment 6 Eclipse Genie CLA 2018-01-16 15:06:40 EST
New Gerrit change created: https://git.eclipse.org/r/115473
Comment 7 Eclipse Genie CLA 2018-01-16 15:15:09 EST
New Gerrit change created: https://git.eclipse.org/r/115475
Comment 8 Eric Williams CLA 2018-01-17 10:48:20 EST
(In reply to Eclipse Genie from comment #7)
> New Gerrit change created: https://git.eclipse.org/r/115475

This fix focuses on the Button having a cut off arrow icon. On Fedora this is particularly bad (I'll post a screenshot in a minute). It should make things better on Ubuntu as well.

As for the text being cut off, I was able to make this better by changing the vertical margin height of the parent composite to be 0. However I would strongly recommend re-factoring this code to use something other than the current approach -- maybe a Combo or even other ToolItems. I'll post more about this in the bug filed against TCF (bug 528743).
Comment 9 Eric Williams CLA 2018-01-17 10:57:28 EST
Created attachment 272297 [details]
TCF dropdown before vs. with patch

The left side shows the current TCF dropdown in Fedora, the right side shows what it would look with my patch applied.

This is Fedora 27, GTK3.22, with GNOME Adwaita.
Comment 11 Eric Williams CLA 2018-01-17 11:32:40 EST
(In reply to Eclipse Genie from comment #10)
> Gerrit change https://git.eclipse.org/r/115475 was merged to [master].
> Commit:
> http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/
> ?id=bf4f51d091c1ca54883063f9567fd83cddafeb63

I've committed the SWT portion of the fix.
Comment 12 Eclipse Genie CLA 2018-01-17 12:09:56 EST
New Gerrit change created: https://git.eclipse.org/r/115552
Comment 14 Eric Williams CLA 2018-01-17 12:51:00 EST
SWT fix is in master now.
Comment 15 Eric Williams CLA 2018-01-23 11:04:53 EST
Verified in I20180122-2000.