From ab22b2e07cd2b3dbd38713ad697002b850f44c9e Mon Sep 17 00:00:00 2001 From: Julia Beliaeva Date: Tue, 12 Sep 2017 18:42:27 +0300 Subject: [PATCH] [vcs-log] use dpi-aware borders, simplify borders creation --- .../com/intellij/vcs/log/ui/actions/GoToHashOrRefPopup.java | 3 +-- .../impl/src/com/intellij/vcs/log/ui/frame/CommitPanel.java | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/actions/GoToHashOrRefPopup.java b/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/actions/GoToHashOrRefPopup.java index eaa5788b7460..babf954546d8 100644 --- a/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/actions/GoToHashOrRefPopup.java +++ b/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/actions/GoToHashOrRefPopup.java @@ -46,7 +46,6 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import javax.swing.*; -import javax.swing.border.EmptyBorder; import java.awt.*; import java.util.Collection; import java.util.Comparator; @@ -112,7 +111,7 @@ public class GoToHashOrRefPopup { panel.setLayout(layout); panel.add(label); panel.add(myTextField); - panel.setBorder(new EmptyBorder(2, 2, 2, 2)); + panel.setBorder(JBUI.Borders.empty(2)); myPopup = JBPopupFactory.getInstance().createComponentPopupBuilder(panel, myTextField.getPreferableFocusComponent()) .setCancelOnClickOutside(true).setCancelOnWindowDeactivation(true).setCancelKeyEnabled(true).setRequestFocus(true).createPopup(); diff --git a/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/frame/CommitPanel.java b/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/frame/CommitPanel.java index 4518e65f2969..3a7bd01ff3cc 100644 --- a/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/frame/CommitPanel.java +++ b/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/frame/CommitPanel.java @@ -80,9 +80,9 @@ public class CommitPanel extends JBPanel { myRootPanel = new RootPanel(); myBranchesPanel = new ReferencesPanel(); - myBranchesPanel.setBorder(JBUI.Borders.empty(REFERENCES_BORDER, 0, 0, 0)); + myBranchesPanel.setBorder(JBUI.Borders.emptyTop(REFERENCES_BORDER)); myTagsPanel = new ReferencesPanel(); - myTagsPanel.setBorder(JBUI.Borders.empty(REFERENCES_BORDER, 0, 0, 0)); + myTagsPanel.setBorder(JBUI.Borders.emptyTop(REFERENCES_BORDER)); myDataPanel = new DataPanel(myLogData.getProject()); myContainingBranchesPanel = new BranchesPanel();