Skip to content

Commit b031b81

Browse files
Adjusting the Size of Splash Shell a/c to image
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.
1 parent b2a5c1a commit b031b81

File tree

1 file changed

+7
-1
lines changed
  • bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal

1 file changed

+7
-1
lines changed

bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/Workbench.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -820,8 +820,14 @@ public void run() throws Exception {
820820

821821
if (splashShell == null)
822822
return;
823-
if (background != null)
823+
if (background != null) {
824824
splashShell.setBackgroundImage(background);
825+
Rectangle imageBounds = background.getBounds();
826+
Rectangle shellBounds = splashShell.getBounds();
827+
if (imageBounds.width > shellBounds.width || imageBounds.height > shellBounds.height) {
828+
splashShell.setSize(imageBounds.width, imageBounds.height);
829+
}
830+
}
825831
}
826832

827833
Dictionary<String, Object> properties = new Hashtable<>();

0 commit comments

Comments
 (0)