From c9d79d7e0ff5dee3fa54ea57befc27c9ecde8dcf Mon Sep 17 00:00:00 2001 From: Dmitry Batkovich Date: Tue, 1 Mar 2016 11:19:39 +0300 Subject: [PATCH] inspection tool window: inspection name is bold --- .../intellij/codeInspection/ui/InspectionNodeInfo.java | 8 +++----- .../com/intellij/codeInspection/ui/QuickFixToolbar.java | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/codeInspection/ui/InspectionNodeInfo.java b/platform/lang-impl/src/com/intellij/codeInspection/ui/InspectionNodeInfo.java index f6afb1cca039..c39505934441 100644 --- a/platform/lang-impl/src/com/intellij/codeInspection/ui/InspectionNodeInfo.java +++ b/platform/lang-impl/src/com/intellij/codeInspection/ui/InspectionNodeInfo.java @@ -37,8 +37,6 @@ import java.awt.event.MouseEvent; * @author Dmitry Batkovich */ public class InspectionNodeInfo extends JPanel { - private final static Logger LOG = Logger.getInstance(InspectionNodeInfo.class); - private final JButton myButton; private final SimpleColoredComponent myTitle; private final HighlightDisplayKey myKey; @@ -48,7 +46,7 @@ public class InspectionNodeInfo extends JPanel { public InspectionNodeInfo(final InspectionToolWrapper toolWrapper, Project project) { setLayout(new GridBagLayout()); - setBorder(IdeBorderFactory.createEmptyBorder(0, 3, 0, 0)); + setBorder(IdeBorderFactory.createEmptyBorder(5, 3, 0, 0)); myProject = project; myTitle = new SimpleColoredComponent(); myCurrentProfile = (InspectionProfileImpl)InspectionProjectProfileManager.getInstance(project).getProjectProfileImpl(); @@ -69,7 +67,7 @@ public class InspectionNodeInfo extends JPanel { SingleInspectionProfilePanel.readHTML(description, SingleInspectionProfilePanel.toHTML(description, toolDescription == null ? "" : toolDescription, true)); add(ScrollPaneFactory.createScrollPane(description, true), - new GridBagConstraints(0, 1, 1, 1, 0, 1.0, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, + new GridBagConstraints(0, 1, 1, 1, 1.0, 1.0, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new JBInsets(5, 5, 0, 0), 0, 0)); add(myButton, new GridBagConstraints(0, 2, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, @@ -101,7 +99,7 @@ public class InspectionNodeInfo extends JPanel { } myButton.setText((isEnabled ? "Disable" : "Enable") + " inspection"); myTitle.clear(); - myTitle.append(myName); + myTitle.append(myName, SimpleTextAttributes.REGULAR_BOLD_ATTRIBUTES); if (!isEnabled) { myTitle.append(" Disabled", SimpleTextAttributes.GRAYED_ATTRIBUTES); } diff --git a/platform/lang-impl/src/com/intellij/codeInspection/ui/QuickFixToolbar.java b/platform/lang-impl/src/com/intellij/codeInspection/ui/QuickFixToolbar.java index f153d0a2b451..501669cb3d95 100644 --- a/platform/lang-impl/src/com/intellij/codeInspection/ui/QuickFixToolbar.java +++ b/platform/lang-impl/src/com/intellij/codeInspection/ui/QuickFixToolbar.java @@ -57,7 +57,7 @@ public class QuickFixToolbar extends JPanel { final boolean multipleDescriptors = problemCount > 1; setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0)); - setBorder(IdeBorderFactory.createEmptyBorder(5, 5, 0, 0)); + setBorder(IdeBorderFactory.createEmptyBorder(hasFixes ? 5 : 10, 5, 0, 0)); fill(multipleDescriptors, () -> getLabel(fixes, tree.getSelectionCount() == 1 ? (InspectionTreeNode)tree.getSelectionPath().getLastPathComponent() : null, problemCount), this); fill(hasFixes, () -> createFixPanel(fixes), this);