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

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

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link
Contributor Author

commented May 15, 2019

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

This comment has been minimized.

Copy link
Contributor

commented May 20, 2019

@eirikbakke thanks for the details.

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

ultorg added some commits May 11, 2019

Factored out the parameter parsing logic for the splash screen's stat…
…us line, in preparation for adding a separate optional version text box.

No behavior should change as a result of this commit (refactoring only).
Added the ability to have a version string automatically added to the…
… splash screen.

Also added a horizontal alignment setting for the splash screen text box settings.
Support proper HiDPI rendering of splash screen and About box images.…
… (The splash screen image was already added in high resolution in a previous commit.)

@eirikbakke eirikbakke force-pushed the eirikbakke:NETBEANS-2455 branch from b4c0e1d to 8e81440 Jun 7, 2019

@eirikbakke

This comment has been minimized.

Copy link
Contributor Author

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

This comment has been minimized.

Copy link
Contributor Author

commented Jun 9, 2019

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

This comment has been minimized.

Copy link
Member

commented Jun 10, 2019

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

This comment has been minimized.

Copy link
Contributor Author

commented Jun 10, 2019

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

@GeertjanWielenga

This comment has been minimized.

Copy link

commented Jun 10, 2019

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

@eirikbakke

This comment has been minimized.

Copy link
Contributor Author

commented Jun 12, 2019

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

This comment has been minimized.

Copy link
Member

commented Jun 13, 2019

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

@geertjanw

This comment has been minimized.

Copy link
Member

commented Jun 14, 2019

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

@eirikbakke eirikbakke merged commit 7d7d0f7 into apache:master Jun 14, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@eirikbakke

This comment has been minimized.

Copy link
Contributor Author

commented Jun 14, 2019

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

This comment has been minimized.

Copy link
Member

commented Jun 14, 2019

@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

This comment has been minimized.

Copy link
Contributor Author

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.