eclipse-platform / eclipse.platform.swt

Eclipse SWT
https://www.eclipse.org/swt/
Eclipse Public License 2.0
101 stars 124 forks source link

Checkbox labels have their last letter cut #1324

Closed acarstoiu closed 2 days ago

acarstoiu commented 3 days ago

Describe the bug The last letter of checkbox labels gets cut or sometimes squeezed horizontally, as if the size of the label on the X axis is not computed correctly.

Screenshots This is taken from Preferences window. 20240705_075819

Environment: Operating System: Gentoo Linux 2.15 KDE Plasma Version: 6.1.1 GTK+: 3.24.41 Kernel Version: 6.9.7-gentoo (64-bit) Graphics Platform: Wayland Graphics Processor: AMD Radeon Graphics

Version since Eclipse 4.30 (java.vendor.version=Temurin-21.0.3+9)

Workaround (or) Additional context Using GDK_BACKEND=x11 does not help. Actually, the attached picture is taken on XWayland.

deepika-u commented 2 days ago

I have checked on windows 11 with latest I build and dont see any such problem. So issue looks specific on linux. Thanks @elsazac for adding the label.

image

iloveeclipse commented 2 days ago

I guess this could be GTK theme dependent. Could you please try to use Adwaita?

acarstoiu commented 2 days ago

Damn, yes, it's the theme So it's somewhere between GTK+ 3, SWT and KDE's Breeze theme port to GTK+.

akurtakov commented 2 days ago

Back in the days when we did the GTK 3 port it was decided that only Adwaita can be properly supported with the time we could have spent. As GTK3 literally allowed dozens of styling options at every widget it become increasingly hard to get all the sizes proper (especially if a theme uses not so common property). If someone is interested in investigating the issue further it's usually a matter of enhancing some of the computeSize methods in respective widget to properly calculate and return the size.

acarstoiu commented 2 days ago

The funny thing is that the defect is slightly variable, for the very same checkboxes.

iloveeclipse commented 2 days ago

@acarstoiu : you can try to add -Dorg.eclipse.swt.internal.gtk.noThemingFixes to the eclipse.ini and see if that fixes your theme. The default settings in Eclipse are made for Adwaita, but they may not work nice with other themes.

acarstoiu commented 2 days ago

Tested, makes it worse.