Bug 552323 - [GTK] in-place Spinner as table editor not usable in plugin configuration dialog
Summary: [GTK] in-place Spinner as table editor not usable in plugin configuration dialog
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.14   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 4.14 M3   Edit
Assignee: Eric Williams CLA
QA Contact:
URL:
Whiteboard:
Keywords: regression, triaged
Depends on:
Blocks:
 
Reported: 2019-10-22 08:15 EDT by Andrey Loskutov CLA
Modified: 2019-11-19 08:52 EST (History)
2 users (show)

See Also:


Attachments
screenshot (136.49 KB, image/png)
2019-10-22 08:15 EDT, Andrey Loskutov CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Loskutov CLA 2019-10-22 08:15:48 EDT
Created attachment 280375 [details]
screenshot

Using I20191020-1800 / master.

org.eclipse.swt.internal.deviceZoom=100
org.eclipse.swt.internal.gdk.backend=x11
org.eclipse.swt.internal.gtk.theme=Adwaita
org.eclipse.swt.internal.gtk.version=3.22.30

1) Run -> Run Configurations -> Double click on Eclipse Application to create new launch config
2) Go to Plug-Ins tab, select "Launch with -> Plugins selected below only"
3) Click on any plugin in the list in the "Start Level" column - *nothing happens*.
4) Close dialog, reopen again and try to repeat step 3). Now an in-place spinner is *partly* shown.

Two bugs:
1) In 4.14 we have a regression that first time the editor is not shown at all at step 3).
2) In 4.11 - 4.14 we have a bug that only the part of the "minus" button is visible, and "plus" is invisible at step 4).

Tested with Adwaita and Cleralooks-Phenix themes, same result.

The code in question that creates in-place editors is under org.eclipse.pde.internal.ui.launcher.AbstractPluginBlock.createEditors() line 496 - 523.

On Windows everything looks OK, I assume this is GTK only problem.
Comment 1 Eric Williams CLA 2019-10-22 22:00:17 EDT
The regression in step 3) comes from bug 541427, which I am now going to revert  as it was a naive change on my part and has caused too much trouble. I'll investigate the other bug relating to Spinner size tomorrow.
Comment 2 Eric Williams CLA 2019-10-23 09:21:24 EDT
Looks like it happens on 4.10 too, at least on my machine.
Comment 3 Eric Williams CLA 2019-10-23 09:58:51 EDT
Going back to 4.8 the issue described in 2) is still reproducible. Sounds like some general bug, or at least not a recent regression.
Comment 4 Eric Williams CLA 2019-10-28 09:57:28 EDT
The issue here is that the Spinner widget on GTK is quite large, thanks to GTK internal min-size machinery. In addition, TreeEditor sizes are by-and-large determined by the size of the column/cell they are attached to. In this case the column/cell is pretty small as the only thing set there is some text "default". This isn't large enough compared to the size the Spinner needs, which is why we see a truncated widget.

In the PDE UI code there is already some messing around with the editor min-size for Mac, which leads me to believe this isn't the first time this issue has been encountered. I'm going to work on making the Spinner smaller, but I believe some fix will also need to be made in PDE in order to make the column/editor size larger.
Comment 5 Eric Williams CLA 2019-10-28 16:16:57 EDT
Looking at the PDE code a little bit closer, the column widths aren't even packed they are hard coded.

My suggestion is to close this bug as the GTK regression is fixed (bug 541427 reverted), and I'll open a new ticket for PDE UI work. I think a fix where the width of the column is set to the Spinner.computeSize().x value should be sufficient.

Andrey, what do you think?
Comment 6 Andrey Loskutov CLA 2019-10-28 16:42:34 EDT
Sure.
Comment 7 Eric Williams CLA 2019-10-29 09:04:35 EDT
I've opened bug 552519 for the PDE work, I'll post a Gerrit there today. I'm closing this bug as the regression from 1) has been resolved by: 

https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=969f688ac68be9c6a24e2d8d816137a85bfd53e1
Comment 8 Andrey Loskutov CLA 2019-10-29 09:26:31 EDT
Thanks Eric.
Comment 9 Eric Williams CLA 2019-11-19 08:52:04 EST
Verified in I20191119-0510.