The issue seems to be caused by gtk_style_context_get_padding() not returning the proper amount of padding. For example on GTK3.19 it returns 0, but returns 11 on GTK3.18 and below. Replacing this call with a call to Control.computeNativeSize() for height calculations returns the correct number. To do: investigate other widgets using gtk_style_context_get_padding() to ensure nothing else is breaking. New Gerrit change created: https://git.eclipse.org/r/67350 Gerrit change https://git.eclipse.org/r/67350 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=4f73bb5f5e4e14e1dc578b1f6ffb0befc8181102 (In reply to Eclipse Genie from comment #3) > Gerrit change https://git.eclipse.org/r/67350 was merged to [master]. > Commit: > http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/ > ?id=4f73bb5f5e4e14e1dc578b1f6ffb0befc8181102 In master now. New Gerrit change created: https://git.eclipse.org/r/67360 Gerrit change https://git.eclipse.org/r/67360 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=8a370a563c18a63d7de19922c28261623b74f8b3 New Gerrit change created: https://git.eclipse.org/r/67361 Gerrit change https://git.eclipse.org/r/67361 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=991352091018ac80965024c1500104d29f23e7f8 Sorry for the Bugzilla spam, I had to revert due to a typo. I accidentally copy and pasted "=" instead of "+=". All fixed now. I don't found another bug about text entry, so i write here. $ rpm -q gtk3 gtk3-3.22.17-1.x86_64 > gtk_style_context_get_padding() no longer returns correct values for GtkEntry widgets. Maybe better, check padding values at first? By default, Adwaita theme not set padding value for text entry. But another theme – may have. As result, no way reduce or enlarge height text entry with theme. In my gtk3 theme text entry have padding: > padding: 4px 5px; In all programs text entry displayed correctly(height 34px - gedit, tweak tool and other), but in eclipse is a bit more (height 38px). I think, better check padding values: if (tmp.top > 0 && tmp.bottom > 0) instead of if (OS.GTK_VERSION >= OS.VERSION (3, 20, 0)) here http://git.eclipse.org/c/gerrit/platform/eclipse.platform.swt.git/tree/bundles/org.eclipse.swt/Eclipse%20SWT/gtk/org/eclipse/swt/widgets/Text.java?h=R4_7_maintenance#n623 Created attachment 270895 [details]
eclipse Oxygen.1 (4.7.1)
(In reply to Alien Huker from comment #10) > I don't found another bug about text entry, so i write here. > > $ rpm -q gtk3 > gtk3-3.22.17-1.x86_64 > > > > gtk_style_context_get_padding() no longer returns correct values for GtkEntry widgets. > > Maybe better, check padding values at first? > > By default, Adwaita theme not set padding value for text entry. > But another theme – may have. As result, no way reduce or enlarge height > text entry with theme. > > In my gtk3 theme text entry have padding: > > > padding: 4px 5px; > > In all programs text entry displayed correctly(height 34px - gedit, tweak > tool and other), > but in eclipse is a bit more (height 38px). > > > I think, better check padding values: > > if (tmp.top > 0 && tmp.bottom > 0) > > instead of > > if (OS.GTK_VERSION >= OS.VERSION (3, 20, 0)) > > > here > http://git.eclipse.org/c/gerrit/platform/eclipse.platform.swt.git/tree/ > bundles/org.eclipse.swt/Eclipse%20SWT/gtk/org/eclipse/swt/widgets/Text. > java?h=R4_7_maintenance#n623 What theme do you use? It will help me investigate a fix. Created attachment 270911 [details]
tar archive with gtk3 theme
$ cd ~/.themes
$ tar -xf test1.tar.xz
$ gsettings set org.gnome.desktop.interface gtk-theme "test1"
Maybe "min-height" property is not counted? > Point widthNative = computeNativeSize(handle, trim.width, SWT.DEFAULT, true); It possible take here min-height and than put > trim.height += tmp.top + tmp.bottom; ? This is will solve my problem. I will take a look at this today. New Gerrit change created: https://git.eclipse.org/r/110038 Gerrit change https://git.eclipse.org/r/110038 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=06c8813f7326155289469803c378321127e0982c (In reply to Eclipse Genie from comment #18) > Gerrit change https://git.eclipse.org/r/110038 was merged to [master]. > Commit: > http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/ > ?id=06c8813f7326155289469803c378321127e0982c The change has been merged into master. Thanks for your help! If you'd like, I can also backport the change into Oxygen (4.7). Thanks:)
> If you'd like, I can also backport the change into Oxygen (4.7).
Yes, please.
New Gerrit change created: https://git.eclipse.org/r/110046 Gerrit change https://git.eclipse.org/r/110046 was merged to [R4_7_maintenance]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=9e64d9d1913a4def07f05ad2eebc45d6f5190c73 (In reply to Eclipse Genie from comment #22) > Gerrit change https://git.eclipse.org/r/110046 was merged to > [R4_7_maintenance]. > Commit: > http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/ > ?id=9e64d9d1913a4def07f05ad2eebc45d6f5190c73 Backport complete. The fix will land in the Oxygen.2 release. |
Created attachment 259669 [details] Quick Access entry too small On GTK3.19/3.20, text entries have smaller heights, making them look cramped and broken. This is more noticeable with the "Quick Access" entry found in the workbench. Attached is a screenshot that shows the issue. The entry on GTK3.19/3.20 is 11px smaller than on GTK3.18 and below.