From 823c26364512b80fa85ab22e491bb16937eb27d7 Mon Sep 17 00:00:00 2001 From: Anton Makeev Date: Thu, 12 Jul 2012 14:22:17 +0200 Subject: [PATCH] Platform: border around glass-pane progress + progress dialog is always the same size now (I hope) --- .../openapi/progress/util/ProgressWindow.form | 2 +- .../openapi/progress/util/ProgressWindow.java | 11 ++++++----- .../intellij/openapi/ui/impl/ShadowBorderPainter.java | 4 ++++ 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/progress/util/ProgressWindow.form b/platform/platform-impl/src/com/intellij/openapi/progress/util/ProgressWindow.form index f8dd161bfa08..533fd88b7bf4 100644 --- a/platform/platform-impl/src/com/intellij/openapi/progress/util/ProgressWindow.form +++ b/platform/platform-impl/src/com/intellij/openapi/progress/util/ProgressWindow.form @@ -18,7 +18,7 @@ - + diff --git a/platform/platform-impl/src/com/intellij/openapi/progress/util/ProgressWindow.java b/platform/platform-impl/src/com/intellij/openapi/progress/util/ProgressWindow.java index 3392c1bfc71c..53221843a101 100644 --- a/platform/platform-impl/src/com/intellij/openapi/progress/util/ProgressWindow.java +++ b/platform/platform-impl/src/com/intellij/openapi/progress/util/ProgressWindow.java @@ -411,10 +411,11 @@ public class ProgressWindow extends BlockingProgressIndicator implements Disposa private JProgressBar myProgressBar; private boolean myRepaintedFlag = true; - private TitlePanel myTitlePanel; - private DialogWrapper myPopup; - private final Window myParentWindow; - private Point myLastClicked; + private TitlePanel myTitlePanel; + private JPanel myInnerPanel; + private DialogWrapper myPopup; + private final Window myParentWindow; + private Point myLastClicked; public MyDialog(boolean shouldShowBackground, Project project, String cancelText) { Window parentWindow = WindowManager.getInstance().suggestParentWindow(project); @@ -437,7 +438,7 @@ public class ProgressWindow extends BlockingProgressIndicator implements Disposa if (UIUtil.isUnderAquaLookAndFeel()) { UIUtil.applyStyle(UIUtil.ComponentStyle.SMALL, myText2Label); } - myProgressBar.setPreferredSize(new Dimension(UIUtil.isUnderAquaLookAndFeel() ? 350 : 450, -1)); + myInnerPanel.setPreferredSize(new Dimension(UIUtil.isUnderAquaLookAndFeel() ? 350 : 450, -1)); myCancelButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { diff --git a/platform/platform-impl/src/com/intellij/openapi/ui/impl/ShadowBorderPainter.java b/platform/platform-impl/src/com/intellij/openapi/ui/impl/ShadowBorderPainter.java index 7956349c965f..214db85bf92f 100644 --- a/platform/platform-impl/src/com/intellij/openapi/ui/impl/ShadowBorderPainter.java +++ b/platform/platform-impl/src/com/intellij/openapi/ui/impl/ShadowBorderPainter.java @@ -94,6 +94,10 @@ public class ShadowBorderPainter { right.paintIcon(c, g, width - sideSize, _y); } + g.setColor(new Color(0, 0, 0, 30)); + g.drawRect(SIDE_SIZE - 1, TOP_SIZE - 1, + width - SIDE_SIZE * 2 + 1, height - TOP_SIZE - BOTTOM_SIZE + 1); + g.dispose(); return image; }