eclipse.platform.swt icon indicating copy to clipboard operation
eclipse.platform.swt copied to clipboard

Links in empty Package Explorer are cut off

Open iloveeclipse opened this issue 9 months ago • 5 comments

I'm using Windows 11 with 125% monitor scaling. It looks like one of the recent changes broke the dimensions calculation for Link elements, because they are cut off now:

Image

Switching "Monitor specific UI scaling" off fixes the problem:

Image

Note: I have a notebook with a single built-in monitor and no other monitors connected to it.

iloveeclipse avatar Apr 06 '25 08:04 iloveeclipse

@HeikoKlare : https://github.com/eclipse-platform/eclipse.platform.ui/pull/2868 is the trigger for the preference being enabled now, but I guess the real bug in in SWT.

iloveeclipse avatar Apr 06 '25 09:04 iloveeclipse

cc @akoch-yatta

fedejeanne avatar Apr 07 '25 07:04 fedejeanne

My initial analysis revealed that the issue is in the GridLayout class, which sometimes passes the wrong childHeight to setBounds(...) here:

https://github.com/eclipse-platform/eclipse.platform.swt/blob/0fe4a76532d5667c984e4f626daeccf2d449012a/bundles/org.eclipse.swt/Eclipse%20SWT/common/org/eclipse/swt/layout/GridLayout.java#L697

I noticed that this only happens with certain widths and when changing to monitors with zoom != 100. Decreasing the width of the panel forces a recalculation and it fixes the issue. Increasing the width again reproduces the issue.

I'm going to look at it more in detail later this week and try to propose a fix. If anyone has an idea, it's appreciated.

fedejeanne avatar Apr 07 '25 14:04 fedejeanne

Caused by #1769 (@akoch-yatta)

fedejeanne avatar Apr 08 '25 13:04 fedejeanne

Reopening as the solution attempt introduced a regression and had to be reverted: https://github.com/eclipse-platform/eclipse.platform.swt/pull/2095

We will propose an updated fix soon.

HeikoKlare avatar May 05 '25 12:05 HeikoKlare

Hi, I still see this issue on latest build Eclipse SDK Version: 2025-06 (4.36), Build id: I20250519-1800, OS: Windows 11, v.10.0, x86_64 / win32, Java vendor: Oracle Corporation, Java runtime version: 24+36-3646, Java version: 24

I am on default scaling provided by windows 11(125% recommended) on my laptop.

Image

deepika-u avatar May 20 '25 06:05 deepika-u

I can confirm that this also happens for me in the Git repositories view with the same configuration: Image

It does not occur for the package explorer though.

HeikoKlare avatar May 20 '25 06:05 HeikoKlare

Fixed by https://github.com/eclipse-platform/eclipse.platform.ui/pull/2975

fedejeanne avatar Aug 05 '25 08:08 fedejeanne

Just for the sake of completeness: the additionally reported Git repositories view issue has been resolved in EGit: https://github.com/eclipse-egit/egit/commit/bd9874c94f98b0a7438f741cd3682c123140b2be

HeikoKlare avatar Aug 05 '25 09:08 HeikoKlare