From e896501d665ab4af9342a67a1b7517009bd8fa1d Mon Sep 17 00:00:00 2001 From: Alexander Zolotov Date: Tue, 16 Jun 2020 16:33:33 +0300 Subject: [PATCH] [status bar] make code style widget transparent status bar itself knows better how to catch mouse leave events GitOrigin-RevId: 90f2fe54c30ef699207f09152b948adce175a785 --- .../psi/codeStyle/statusbar/CodeStyleStatusBarPanel.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/psi/codeStyle/statusbar/CodeStyleStatusBarPanel.java b/platform/lang-impl/src/com/intellij/psi/codeStyle/statusbar/CodeStyleStatusBarPanel.java index 0aaf8dbef9eb..cc419b1dd0f0 100644 --- a/platform/lang-impl/src/com/intellij/psi/codeStyle/statusbar/CodeStyleStatusBarPanel.java +++ b/platform/lang-impl/src/com/intellij/psi/codeStyle/statusbar/CodeStyleStatusBarPanel.java @@ -10,8 +10,6 @@ import org.jetbrains.annotations.Nullable; import javax.swing.*; import java.awt.*; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; public class CodeStyleStatusBarPanel extends JPanel { private final TextPanel myLabel; @@ -19,6 +17,7 @@ public class CodeStyleStatusBarPanel extends JPanel { public CodeStyleStatusBarPanel() { super(); + setOpaque(false); setLayout(new BoxLayout(this, BoxLayout.LINE_AXIS)); setAlignmentY(Component.CENTER_ALIGNMENT); myLabel = new TextPanel() {}; @@ -28,12 +27,6 @@ public class CodeStyleStatusBarPanel extends JPanel { myIconLabel.setBorder(JBUI.Borders.empty(2,2,2,0)); add(myIconLabel); setBorder(JBUI.Borders.empty(0)); - addMouseListener(new MouseAdapter() { - @Override - public void mouseExited(MouseEvent e) { - setBackground(null); - } - }); } public void setText(@NotNull String text) {