From f92a04e17152c286342a26a00cb09e78bed405db Mon Sep 17 00:00:00 2001 From: Konstantin Bulenkov Date: Tue, 22 Oct 2013 12:22:11 +0200 Subject: [PATCH] 1px offset for Darcula and IntelliJ lafs --- .../com/intellij/openapi/ui/ComponentWithBrowseButton.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/platform/platform-api/src/com/intellij/openapi/ui/ComponentWithBrowseButton.java b/platform/platform-api/src/com/intellij/openapi/ui/ComponentWithBrowseButton.java index 980d82604daf..23c916ee276b 100644 --- a/platform/platform-api/src/com/intellij/openapi/ui/ComponentWithBrowseButton.java +++ b/platform/platform-api/src/com/intellij/openapi/ui/ComponentWithBrowseButton.java @@ -39,6 +39,7 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import javax.swing.*; +import javax.swing.border.EmptyBorder; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; @@ -71,6 +72,9 @@ public class ComponentWithBrowseButton extends JPanel i if (ApplicationManager.getApplication() != null) { // avoid crash at design time new MyDoClickAction(myBrowseButton).registerShortcut(myComponent); } + if (UIUtil.isUnderIntelliJLaF() || UIUtil.isUnderDarcula()) { + setBorder(new EmptyBorder(0, 1, 0, 1)); + } } public final Comp getChildComponent() {