eclipse-platform / eclipse.platform.swt

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

With DPI settings to SYSTEM ENHANCED & theme enabled, tabs disappear when Windows resolution is anything but 100% #1560

Open hellorsanjeev opened 1 month ago

hellorsanjeev commented 1 month ago

Describe the bug I'm using 2024-06 and 2024-09 on a 4K 32" panel with high DPI settings set to "System Enhanced" in my Windows, but when I enable 'theme' and I hover my mouse over tabs, they disappear and sometimes only reappear when I move it outside (and sometimes they don't reappear at all). My screen resolution is set to 150% (as suggested by Windows 10/11 - however, I don't think this is Windows version problem). Btw, I have been experiencing this problem for last several years. Please refer to the screenshot.

To be clear, this only happens when high DPI setting is set to SYSTEM ENHANCED (not SYSTEM, not APPLICATION) and when the theme is enabled and resolution is 150% (too many variables, but this is the right combination).

To Reproduce

  1. Set Windows resolution to 150% (or any resolution other than 100%)
  2. Enable theme in Eclipse - doesn't matter what theme you choose - all you need is to have that checkbox checked.
  3. Set high DPI setting to 'System Enhanced' in Windows for Eclipse.exe.

Expected behavior With above 3 things in place, I want Eclipse to not hide tabs.

Screenshots Screenshot 2024-10-26 151015 Screenshot 2024-10-26 151235

Environment:

  1. Select the platform(s) on which the behavior is seen:

      • [ ] All OS
      • [x] Windows
      • [ ] Linux
      • [ ] macOS
  2. Additional OS info (e.g. OS version, Linux Desktop, etc)

  3. JRE/JDK version

Version since Like forever

Workaround (or) Additional context

  1. With scaling set to 150% and theme enabled, the first workaround is to use high DP setting set to either 'system' or 'application', but I don't want it. Instead, I like to set it to 'system enhanced' as it makes everything so sharp and good.
  2. The other workaround is to use scaling to 100% when using DPI setting set at 'system enhanced', but then everything becomes to tiny.
jukzi commented 1 month ago

I could not reproduce with master. please test with M2: https://download.eclipse.org/eclipse/downloads/drops4/S-4.34M2-202410172140/ And also please edit the issue to clean it up from template.

Phillipus commented 1 month ago

I can reproduce this. OP needs to make steps to reproduce clearer. "With high DPI settings set to "System Enhanced" is the key part. See here.

merks commented 1 month ago

I use system because system enhanced worked poorly as this issue described.

hellorsanjeev commented 4 weeks ago

@merks @Phillipus @jukzi - Sorry for not being able to explain the issue correctly. I just went ahead and modified the 'title' and the 'description'. Thank you for looking into it.

HeikoKlare commented 4 weeks ago

Unfortunately, there are several DPI-related settings that you can change and combine. The Windows modes "System" and "Application" both work fine (to some extent and depending on what you consider "fine") with Eclipse and both have their advantages and drawbacks. When you download an Eclipse product, it defaults to "System" while common JREs usually default to run their applications in "Application" mode (which is what usually happens when you launch an Eclipse application from within an Eclipse SDK). "System (enhanced)", however, seems to be rarely used and is probably not well tested.

We are working on enhanced HiDPI support for Windows in Eclipse SWT that is supposed to make all of this obsolete. It will always use "Application" mode (more specifically: PerMonitorV2) and perform according in-application, per-monitor scaling. We plan to provide an Eclipse preference to experimentally activate this feature in the next week (until M3), so that you can try out the feature in the upcoming release. Please do not expect it to be perfect yet (which is why we will tag it as "experimental"), but we should then rather put efforts into this improved HiDPI support than working on glitches with other, rarely used modes.

hellorsanjeev commented 3 weeks ago

@HeikoKlare - Thank you for your comemnt.

I'm using 2024-09 and I can see a 'Light Preview' option in Eclipse. Now even with this option selected and HiDPI set to Application or System, and scaling set to 150%, everything appears very small (The menubar icons, the new search dialog etc). I don't know, but for me, the best experience on a 4k 32" monitor with scaling set to 150% is when hiDPI set to System Enhanced.

We are working on enhanced HiDPI support for Windows in Eclipse SWT that is supposed to make all of this obsolete. It will always use "Application" mode (more specifically: PerMonitorV2) and perform according in-application, per-monitor scaling. We plan to provide an Eclipse preference to experimentally activate this feature in the next week (until M3)

Is it the same Light Preview option I see in 2024-09?

HeikoKlare commented 3 weeks ago

I'm using 2024-09 and I can see a 'Light Preview' option in Eclipse. Now even with this option selected and HiDPI set to Application or System, and scaling set to 150%, everything appears very small (The menubar icons, the new search dialog etc). I don't know, but for me, the best experience on a 4k 32" monitor with scaling set to 150% is when hiDPI set to System Enhanced.

This is something you should be able to improve with the following setting added to your eclipse.ini:

-Dswt.autoScale=quarter

The following screenshot shows the difference: left is with that option and right is without (default): image

We are working on enhanced HiDPI support for Windows in Eclipse SWT that is supposed to make all of this obsolete. It will always use "Application" mode (more specifically: PerMonitorV2) and perform according in-application, per-monitor scaling. We plan to provide an Eclipse preference to experimentally activate this feature in the next week (until M3)

Is it the same Light Preview option I see in 2024-09?

It is a different option, not related to the new/preview theme. I have just pushed the according news for the feature, so you can best have a look there: https://eclipse.dev/eclipse/news/4.34/platform.php#rescale-on-runtime-preference It will be available in 2024-12 (starting from the milestone 3 build).