From 4d80e3df9b914e205af1999650883199b3d109c4 Mon Sep 17 00:00:00 2001 From: Dmitry Avdeev Date: Thu, 10 Dec 2015 16:10:50 +0300 Subject: [PATCH] IDEA-144668 Ability to disable "Run config" and "test indicator" gutters: UI tweaks --- .../options/editor/GutterIconsConfigurable.form | 11 +++++++++-- .../options/editor/GutterIconsConfigurable.java | 6 +++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/application/options/editor/GutterIconsConfigurable.form b/platform/lang-impl/src/com/intellij/application/options/editor/GutterIconsConfigurable.form index 1fe72ca832ae..7ec311250506 100644 --- a/platform/lang-impl/src/com/intellij/application/options/editor/GutterIconsConfigurable.form +++ b/platform/lang-impl/src/com/intellij/application/options/editor/GutterIconsConfigurable.form @@ -8,12 +8,19 @@ - + - + + + + + + + + diff --git a/platform/lang-impl/src/com/intellij/application/options/editor/GutterIconsConfigurable.java b/platform/lang-impl/src/com/intellij/application/options/editor/GutterIconsConfigurable.java index dce57dab7024..042304e6156d 100644 --- a/platform/lang-impl/src/com/intellij/application/options/editor/GutterIconsConfigurable.java +++ b/platform/lang-impl/src/com/intellij/application/options/editor/GutterIconsConfigurable.java @@ -155,14 +155,17 @@ public class GutterIconsConfigurable implements Configurable { @Override protected JComponent adjustRendering(JComponent rootComponent, JCheckBox checkBox, int index, boolean selected, boolean hasFocus) { JPanel panel = new JPanel(new BorderLayout()); + panel.setBorder(BorderFactory.createEmptyBorder()); GutterIconDescriptor descriptor = myList.getItemAt(index); Icon icon = descriptor == null ? null : descriptor.getIcon(); JLabel label = new JLabel(icon == null ? EmptyIcon.ICON_16 : icon); + label.setOpaque(true); label.setPreferredSize(new Dimension(25, -1)); label.setHorizontalAlignment(SwingConstants.CENTER); panel.add(label, BorderLayout.WEST); panel.add(checkBox, BorderLayout.CENTER); - panel.setBackground(rootComponent.getBackground()); + panel.setBackground(getBackground(false)); + label.setBackground(getBackground(selected)); checkBox.setBorder(null); PluginDescriptor pluginDescriptor = myFirstDescriptors.get(descriptor); @@ -176,5 +179,6 @@ public class GutterIconsConfigurable implements Configurable { return panel; } }; + myList.setBorder(BorderFactory.createEmptyBorder()); } }