-
Notifications
You must be signed in to change notification settings - Fork 229
Adjusting the Size of Splash Shell a/c to image #2828
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
Conversation
|
This pull request changes some projects for the first time in this development cycle. An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch. Git patchFurther information are available in Common Build Issues - Missing version increments. |
The splash is initialized by the Equinox native launcher while image is set by SWT. SWT uses "correctly scaled images". This inconsistency leads to image cut off during start up.
b3e830e to
b031b81
Compare
|
This pull request changes some projects for the first time in this development cycle. An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch. Git patchFurther information are available in Common Build Issues - Missing version increments. |
HeikoKlare
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To precise about the issue: if I am not mistaken, this only happens with monitor-specific scaling enabled (or even when only quarter scaling is activated).
| Rectangle imageBounds = background.getBounds(); | ||
| Rectangle shellBounds = splashShell.getBounds(); | ||
| if (imageBounds.width > shellBounds.width || imageBounds.height > shellBounds.height) { | ||
| splashShell.setSize(imageBounds.width, imageBounds.height); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't the issue that the image is too large/small for the shell (because Platform UI applies quarter scaling while Equinox native launcher uses integer200) and not that the shell does not fit to the image? Changing the shell size here will result in a rescaling of the splash during application startup, won't it?

The splash is initialized by the Equinox native launcher while image is set by SWT. SWT uses "correctly scaled images". This inconsistency leads to image cut off during start up.
Proposed Solution
We are adjusting the size of the shell with the size of the image in case of inconsistency.