summaryrefslogtreecommitdiff
path: root/platform/platform-impl/src/com/intellij/ui/Splash.java
diff options
context:
space:
mode:
Diffstat (limited to 'platform/platform-impl/src/com/intellij/ui/Splash.java')
-rw-r--r--platform/platform-impl/src/com/intellij/ui/Splash.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/platform/platform-impl/src/com/intellij/ui/Splash.java b/platform/platform-impl/src/com/intellij/ui/Splash.java
index 0f4147f61753..023cef7bac06 100644
--- a/platform/platform-impl/src/com/intellij/ui/Splash.java
+++ b/platform/platform-impl/src/com/intellij/ui/Splash.java
@@ -44,6 +44,7 @@ import java.util.List;
*/
public class Splash extends JDialog implements StartupProgress {
@Nullable public static Rectangle BOUNDS;
+
private final Icon myImage;
private int myProgressHeight = 2;
private Color myProgressColor = null;
@@ -84,8 +85,16 @@ public class Splash extends JDialog implements StartupProgress {
}
private void setLocationInTheCenterOfScreen() {
- Rectangle deviceBounds = getGraphicsConfiguration().getBounds();
- setLocation((deviceBounds.width - getWidth()) / 2, (deviceBounds.height - getHeight()) / 2);
+ Rectangle bounds = getGraphicsConfiguration().getBounds();
+ if (SystemInfo.isWindows) {
+ Insets insets = Toolkit.getDefaultToolkit().getScreenInsets(getGraphicsConfiguration());
+ int x = insets.left + (bounds.width - insets.left - insets.right - getWidth()) / 2;
+ int y = insets.top + (bounds.height - insets.top - insets.bottom - getHeight()) / 2;
+ setLocation(x, y);
+ }
+ else {
+ setLocation((bounds.width - getWidth()) / 2, (bounds.height - getHeight()) / 2);
+ }
}
public Splash(ApplicationInfoEx info) {