Skip to content
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

[NETBEANS-378,NETBEANS-2455] HiDPI splash screen with product version #1246

Merged
merged 5 commits into from
Jun 14, 2019

Conversation

eirikbakke
Copy link
Contributor

@eirikbakke eirikbakke commented May 11, 2019

These commits (1) add the ability for the NetBeans splash screen to be automatically imprinted with the NetBeans product version and build number (2) makes the splash screen and "About" box look good on HiDPI displays, and (3) adds new simplified splash screen graphics.

(We could also ask David Schulz if he'd like to make an updated version of the old splash screen, making space for the version string. In that case the graphics uploaded here just serves as an example.)

This resolves https://issues.apache.org/jira/browse/NETBEANS-2455 and https://issues.apache.org/jira/browse/NETBEANS-378 . See attached screenshot.

Splash Screen HiDPI and Product Version

Old splash screen showing HiDPI scaling artifacts on Windows 10 at 150% DPI scaling:
old splash

Tested on Windows 10; it would be great if someone else can test it on MacOS (with a Retina screen) and Linux as well.

@AlexFalappa
Copy link
Contributor

AlexFalappa commented May 15, 2019

I see you used a very recent JDK (12.0.1) but are these modifications supported on older JDKs?
Does this also show up nicely on JDK 8 (Oracle and AdoptOpen implementations)?

@eirikbakke
Copy link
Contributor Author

On Windows, HiDPI screens are supported from JDK 9 and upwards; on MacOS it might have been introduced earlier (not sure).

On Java versions that do not support HiDPI screens, the splash screen should show up in low resolution, like before. I have confirmed this on JDK8 on Windows (I don't have a Mac to test).

The way this works is that the splash screen PNG is now double resolution, but resized to 50% (to SPLASH_WIDTH*SPLASH_HEIGHT logical pixels) via a transform on the paint method's Graphics2D object. JDK versions that support HiDPI will in turn apply its own transform to scale the image back up to a higher device pixel resolution.

@AlexFalappa
Copy link
Contributor

@eirikbakke thanks for the details.

You answered to my concerns, that is your implementation also degrades gracefully on older JDKs.

…us line, in preparation for adding a separate optional version text box.

No behavior should change as a result of this commit (refactoring only).
… splash screen.

Also added a horizontal alignment setting for the splash screen text box settings.
… (The splash screen image was already added in high resolution in a previous commit.)
@eirikbakke
Copy link
Contributor Author

eirikbakke commented Jun 7, 2019

The changes to ImageUtilities are now already merged as part of another PR ( #1273 ). Rebased this PR to remove merge conflicts.

@eirikbakke eirikbakke added the API Change [ci] enable extra API related tests label Jun 9, 2019
@eirikbakke
Copy link
Contributor Author

Adding API change label since this PR adds new properties that can be added to the branding file to set the location of the version string on the splash screen.

@neilcsmith-net
Copy link
Member

Added NB11.1 label. Would love to get this merged this week so I don't have to faff around with splash screens during the release process! 😄

@eirikbakke
Copy link
Contributor Author

Added a comment on https://issues.apache.org/jira/browse/NETBEANS-2455 to see if there's consensus on this approach.

@GeertjanWielenga
Copy link

Just merge it unless there’d be any reason to disagree with this.

@eirikbakke
Copy link
Contributor Author

Will merge Friday, before feature freeze... just wanted to give David Schulz a chance to provide updated splash screen artwork, so I don't "overwrite" his work.

@geertjanw
Copy link
Member

Awesome, let's get it in for 11.1. :-)

@geertjanw
Copy link
Member

@eirikbakke, I leave this to you to merge, OK?

@eirikbakke eirikbakke merged commit 7d7d0f7 into apache:master Jun 14, 2019
@eirikbakke
Copy link
Contributor Author

Done. If we get new splash screen artwork but it's after the feature freeze it can just go in the following version.

@neilcsmith-net
Copy link
Member

@eirikbakke great! 👍 Personally, I don't think there's a problem with merging new artwork after feature freeze if people want it. At the same time, I prefer your artwork anyway - it's cleaner and more legible.

One possible enhancement for this might be to also consider screen resolution in deciding splash size? I have a large 2560x1440 display, but with DPI scaling set to 1. Still be nice to have larger splash on such a setup.

@eirikbakke
Copy link
Contributor Author

eirikbakke commented Jun 15, 2019

One possible enhancement for this might be to also consider screen resolution in deciding splash size? I have a large 2560x1440 display, but with DPI scaling set to 1. Still be nice to have larger splash on such a setup.

That would be a simple change to make. Feel free to open a JIRA issue for it. It should be done after the PR at #1278 gets merged, because the latter can make all the caching logic in ScaledBitmapIcon.java go into a superclass (I will make said simplification as part of that other PR).

@eirikbakke eirikbakke deleted the NETBEANS-2455 branch October 5, 2022 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Change [ci] enable extra API related tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants