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

Bug 528862

Summary: [GTK3.22] incorrect height edited combo box
Product: [Eclipse Project] Platform Reporter: Nobody - feel free to take it <nobody>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ericwill
Version: 4.8Keywords: triaged
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
eclipse Oxygen.2 (4.7.2RC4)
none
tar archive with gtk3 theme
none
Eclipse Photon (4.8) none

Description Nobody - feel free to take it CLA 2017-12-16 11:39:51 EST
Created attachment 271934 [details]
eclipse Oxygen.2 (4.7.2RC4)

In the continuation of the bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=487522

$ rpm -q gtk3
gtk3-3.22.22-1.x86_64

I also see same problem in edited combo box.

In my gtk3 theme combo box text entry have padding:

> padding: 4px 5px;

In gtk3-widget-factory(gtk3-devel package) edited combo-box have 26px height(1px border, 4px padding, 16px  min-heigth; 1*2 + 4*2 + 16 = 26px).

In eclipse is a bit more (height 36px).


See screenshot eclipse_gtk3_combo.png.


It possible fix this?
Comment 1 Nobody - feel free to take it CLA 2017-12-16 11:42:10 EST
Created attachment 271935 [details]
tar archive with gtk3 theme

$ cd ~/.themes
$ tar -xf test2.tar.xz
$ gsettings set org.gnome.desktop.interface gtk-theme "test2"
Comment 2 Eric Williams CLA 2017-12-18 10:29:57 EST
AFAIK we don't add any padding to SWT Combos but I'll take a look.
Comment 3 Eric Williams CLA 2018-04-09 11:28:38 EDT
Sorry it took me so long to get back to this issue, here is what I have discovered:

The extra padding you describe comes from SWT's additional CSS theming. The good news is that we are changing the way SWT deals with CSS theming in bug 527729, which should be merged in the next week or so.

To summarize the changes that bug 527729 will bring: we are adding checks for themes. SWT's position will be only to explicitly support the Adwaita theme, meaning we will only load our custom CSS changes if the Adwaita (or Adwaita-dark) theme is set. If Adwaita is not the system theme, SWT will not load its custom CSS changes. 

This hands-off approach means that users running a custom theme can expect Eclipse to behave like other GTK3 applications would. Furthermore, users with custom themes can insert any custom CSS into SWT by putting their changes in a file, and then specifying that file to SWT via the "org.eclipse.swt.internal.gtk.cssFile" property.

With the changes in bug 527279, I cannot reproduce the issue you describe.

*** This bug has been marked as a duplicate of bug 527729 ***
Comment 4 Nobody - feel free to take it CLA 2018-06-28 08:08:01 EDT
Created attachment 274667 [details]
Eclipse Photon (4.8)

Eclipse SDK

Version: Photon (4.8)
Build id: I20180611-0500

I still see this bug.

How to fix this?
Comment 5 Nobody - feel free to take it CLA 2018-06-28 08:09:27 EDT
I still see this bug.
Comment 6 Nobody - feel free to take it CLA 2018-06-28 08:14:44 EDT
$ rpm -q gtk3

gtk3-3.22.28-1.x86_64
Comment 7 Eric Williams CLA 2018-06-28 09:39:41 EDT
(In reply to Alien Huker from comment #5)
> I still see this bug.

Are you launching your SWT app with -Dorg.eclipse.swt.internal.gtk.noThemingFixes ?
Comment 8 Nobody - feel free to take it CLA 2018-06-28 09:45:41 EDT
> Are you launching your SWT app with -Dorg.eclipse.swt.internal.gtk.noThemingFixes ?
No.


This property solve problem.
Comment 9 Eric Williams CLA 2018-06-28 09:48:39 EDT
(In reply to Alien Huker from comment #8)
> > Are you launching your SWT app with -Dorg.eclipse.swt.internal.gtk.noThemingFixes ?
> No.
> 
> 
> This property solve problem.

Okay. For future reference, all Adwaita related theme fixes are on by default. If you want to launch SWT without them, use that property.