diff options
author | Tor Norbye <tnorbye@google.com> | 2014-07-25 13:10:36 -0700 |
---|---|---|
committer | Tor Norbye <tnorbye@google.com> | 2014-07-25 13:10:36 -0700 |
commit | e5266e2343c8d275d79fa0be725180d0fe3a993c (patch) | |
tree | 0ba72f5de1949e0527874a799baa224cbe1537e0 /platform/platform-api/src/com/intellij/openapi/ui/FixedSizeButton.java | |
parent | b03a5855292feb8c331815f883fe64372aacd872 (diff) | |
parent | 2e5965e996aad62ab1338b09d54caaf99ff3dd6a (diff) | |
download | idea-e5266e2343c8d275d79fa0be725180d0fe3a993c.tar.gz |
Merge remote-tracking branch 'aosp/upstream-master' into merge
Conflicts:
.idea/modules.xml
Change-Id: I5e3d04bc83cdc26b2b56fca66b44b1dd8941b143
Diffstat (limited to 'platform/platform-api/src/com/intellij/openapi/ui/FixedSizeButton.java')
-rw-r--r-- | platform/platform-api/src/com/intellij/openapi/ui/FixedSizeButton.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/platform/platform-api/src/com/intellij/openapi/ui/FixedSizeButton.java b/platform/platform-api/src/com/intellij/openapi/ui/FixedSizeButton.java index 6f38d9a96356..101444a9d649 100644 --- a/platform/platform-api/src/com/intellij/openapi/ui/FixedSizeButton.java +++ b/platform/platform-api/src/com/intellij/openapi/ui/FixedSizeButton.java @@ -87,7 +87,7 @@ public class FixedSizeButton extends JButton { public Dimension getPreferredSize() { if (myComponent != null) { int size = myComponent.getPreferredSize().height; - if (myComponent instanceof ComboBox && (UIUtil.isUnderIntelliJLaF() || UIUtil.isUnderDarcula())) { + if (myComponent instanceof JComboBox && (UIUtil.isUnderIntelliJLaF() || UIUtil.isUnderDarcula())) { size -= 2; // decrement to match JTextField's preferred height } return new Dimension(size, size); @@ -120,9 +120,7 @@ public class FixedSizeButton extends JButton { public void setBounds(Rectangle r) { if (r.width != r.height) { int size = Math.min(r.width, r.height); - r = new Rectangle(r); - r.width = size; - r.height = size; + r = new Rectangle(r.x, r.y, size, size); } super.setBounds(r); } |