Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 517590

Summary: [gtk3] Combo: actual size larger than SWT bounds
Product: [Eclipse Project] Platform Reporter: Carsten Reckord <reckord>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: akurtakov, ericwill, peter
Version: 4.7Keywords: triaged
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Combo is much too wide
none
Combo entry causing width none

Description Carsten Reckord CLA 2017-05-31 14:11:48 EDT
In SWT GTK3, the actual (minimum?) width of a Combo seems to always match its popup list's width, which in turn is determined by the largest entry. 

I'm not able to restrict the combo's width with layouts or by setting its bounds manually. Interestingly enough, the size returned by getBounds() matches what my layout specifies, and all other widgets behave as if it had that size. But the actual width on screen is clearly much larger, with the combo overlapping the widgets to the left. 

See attached screenshots of the Marketplace Client for an example. In the example, the combo's width was restricted to 20px, and combo.getBounds() actually returned that value (you can kind of see it in the screenshot by how wide the search field and the covered second combo to the left are).

This is with Ubuntu 16.10 and this GTK version:
> libgtk-3-0:amd64  3.20.9-1ubuntu2

It works fine with GTK 2 (SWT_GTK3=0)
Comment 1 Carsten Reckord CLA 2017-05-31 14:12:39 EDT
Created attachment 268680 [details]
Combo is much too wide
Comment 2 Carsten Reckord CLA 2017-05-31 14:13:08 EDT
Created attachment 268681 [details]
Combo entry causing width
Comment 3 Eric Williams CLA 2017-05-31 14:55:53 EDT
Seems somewhat related to bug 500703.
Comment 4 Eric Williams CLA 2017-05-31 14:56:09 EDT
Also I can reproduce this on my machine: GTK3.22, Fedora 25.
Comment 5 Eric Williams CLA 2018-05-02 15:47:15 EDT
(In reply to Eric Williams from comment #3)
> Seems somewhat related to bug 500703.

Apparently not, the issue still happens after that fix.
Comment 6 Carsten Reckord CLA 2018-06-05 09:23:28 EDT
Just fyi, if you check the Marketplace Client to reproduce the issue: I've now worked around it by using CCombos on Linnux/GTK, so you won't see that behavior in the latest MPC anymore...
Comment 7 Eric Williams CLA 2018-08-23 12:16:15 EDT

*** This bug has been marked as a duplicate of bug 535323 ***