From aecfed29e7f236367280ca69fa82c61d5a018164 Mon Sep 17 00:00:00 2001 From: Sergey Simonchik Date: Wed, 18 Jun 2014 19:04:31 +0400 Subject: [PATCH] IDEA-126355 IntelliJ LaF: different sizes of browse buttons --- .../src/com/intellij/openapi/ui/FixedSizeButton.java | 3 +++ 1 file changed, 3 insertions(+) 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 bdb9660c9090..a041fd2dd446 100644 --- a/platform/platform-api/src/com/intellij/openapi/ui/FixedSizeButton.java +++ b/platform/platform-api/src/com/intellij/openapi/ui/FixedSizeButton.java @@ -87,6 +87,9 @@ public class FixedSizeButton extends JButton { public Dimension getPreferredSize() { if (myComponent != null) { int size = myComponent.getPreferredSize().height; + if (myComponent instanceof ComboBox && (UIUtil.isUnderIntelliJLaF() || UIUtil.isUnderDarcula())) { + size -= 2; // decrement to match JTextField's preferred height + } return new Dimension(size, size); } else if (mySize != -1) {