IDEA-126355 IntelliJ LaF: different sizes of browse buttons

This commit is contained in:
Sergey Simonchik
2014-06-18 19:04:31 +04:00
parent 77b70e9057
commit aecfed29e7
@@ -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) {