-
Notifications
You must be signed in to change notification settings - Fork 719
Implements DPI scaling detection and automatic UI scaling #5147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Implements DPI scaling detection and automatic UI scaling #5147
Conversation
On high-DPI displays with scaling enabled (e.g., Windows 150%, 200%, or macOS Retina), UI elements like tooltips in the Performance view were not properly sized, making text and values difficult or impossible to read. - **`SWTHelper.java`**: Added DPI detection utilities - **`MoneyTrailDataSource.java`**: Applied DPI scaling to tooltip rendering - **`SWTHelperTest.java`**: Comprehensive test coverage - **Windows**: 100%, 125%, 150%, 175%, 200%, 225%, 250%, 300%, 350%, 400% - **macOS**: Non-Retina (72 DPI), Retina 2x (144 DPI), Retina 3x (218 DPI) - **Linux**: Standard 96 DPI base with custom scaling
71127fa to
a1f9a12
Compare
|
@Nirus2000 happy to take a look at this on Mac, but can you tell me where in the app to find the view(s) concerned? Seems to be some feature I don't use and I can't find it. |
|
@georgemac-labs |
|
@Nirus2000 I don't see any problems on Mac, even in v0.80.4. However, the widget also looks different from your screenshots, so maybe I'm not looking in the right place. I don't see anything that looks like the Monatliche Investitionen with letters for the months. I've tried with my personal portfolio and the Kommer sample file. Perhaps it's because neither uses an Investment Plan? This is what I see as Performance Calculation with the Kommer file: |
|
@georgemac-labs you need to hover "Capital Gains" or "Earnings"... for example... |
@Nirus2000 finally figured it out, but even with the same dates, I see different numbers – your Kommer file seems to have different data from mine! Anyway, can't see any issue on macOS 13.7.2. However I am a few years behind the current release...
|
|
I think the shown disappearance of text fragments at zoom level 150 is caused by a bug in SWT and should be fixed in Eclipse 2025-12: |
|
@wahlbrink writes:
Sounds like it. The size is measured, but rounded down. The label cannot be rendered in full. Because it is right aligned, the currency code shows up on the right. @Nirus2000 can you test on your machine? You can use the latest 4.38 release candidate by using this updated fragment in the target definition: <location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<repository location="https://download.eclipse.org/eclipse/updates/4.38-I-builds/I20251120-1800/"/>
<unit id="org.eclipse.e4.rcp.feature.group" version="4.38.0.v20251120-0906"/>
<unit id="org.eclipse.equinox.executable" version="3.8.3100.v20251111-0406"/>
<unit id="org.eclipse.equinox.executable.feature.group" version="3.8.3100.v20251111-0406"/>
<unit id="org.eclipse.platform.feature.group" version="4.38.0.v20251120-1800"/>
<unit id="org.osgi.service.component.annotations" version="1.5.1.202212101352"/>
<unit id="org.eclipse.osgi.services" version="3.12.300.v20250707-1221"/>
</location> |
|
Hello @buchen after this pull request I think... |
triggers an error for me: "Unable to locate installable unit org.eclipse.equinox.executable/3.8.3100.v20251111-0406" |
|
I can no longer reproduce the problem with 2025-12. |
|
Hello @buchen Here are my results: |
|
Thanks @wahlbrink and @Nirus2000 for the testing. I read this as we should update to 2026-12. The release is scheduled for 10 December. Usually, I try to give it a couple weeks to see if urgent problem occur. But the rendering with zoom factor certainly merits an early update. And tweaking the spacing can also make sense. By default it is (5,5). With scaling that should change. I would want to check how the platform does this. I wouldn't want to touch each and every grid layout. |
|
Okay, what are the next steps?! |
|
@Nirus2000 writes:
First, the bug will be fixed with the Eclipse 4.38 which is to be published early December. I do not want to ship a release candidate build. So we will have to wait for that release. Then to my understanding, the remaining material change in this pull request is to change the spacing in the grid layout. By default, this is 5x5 pixels. When scaling, it could change to 7x7 pixels. For this change alone, I would not want to add the complexity and maintenance of the SWTHelper#getScalingFactor to the code base. On the other hand, I do not want to close the pull request just yet. It might come in handy. To better support HiDPI, I think there are multiple activities:
|
|
And one more thing: I think the HiDPI does not only apply to Windows but could also apply to Linux as well (macOS is already supported. One issue there is that the OS widgets do not always handle if the font size is increased). |
I have been using/testing it for PP for two weeks (wahlbrink@7b69b89): It works well. Setting the property |
|
@wahlbrink I plan to add an "experimental preference page" that enables this property. |
|
Because I am not running Windows, I find it hard to wrap my head around the configuration. Playing with the virtual machine, I see the following:
My 2 cents:
I appreciate any comments. |
The property |
|
The master branch is now updated to Eclipse 2025-12 - see 8a8911a |













in memory #4115
Problem
On high-DPI displays with scaling enabled (e.g., Windows 150%, 200%, or macOS Retina), UI elements like tooltips in the Performance view were not properly sized, making text and values difficult or impossible to read.
Changes
SWTHelper.java: Added DPI detection utilitiesSWTHelperTest.java: Comprehensive test coveragePlatform Support
First try... sooo... can anybody please test?
MoneyTrailDataSource.java: Applied DPI scaling to tooltip renderingSo... @buchen
First try... sooo... can anybody please test?
MoneyTrailDataSource.java: Applied DPI scaling to tooltip rendering