Adjust active user background color.
This CL adjusts the contrast between the active user
text color and the active user background color, making
it a little bit easier to read.
Before: https://screenshot.googleplex.com/9wM3ctWJ35
After: https://screenshot.googleplex.com/t3Ua0pBYN8
Change-Id: I4134717235e5e19b9b66dd45150daad839e3173e
diff --git a/src/com/google/gct/login/ui/UsersListCellRenderer.java b/src/com/google/gct/login/ui/UsersListCellRenderer.java
index 01e319a..5796029 100644
--- a/src/com/google/gct/login/ui/UsersListCellRenderer.java
+++ b/src/com/google/gct/login/ui/UsersListCellRenderer.java
@@ -23,15 +23,7 @@
import com.intellij.util.ui.UIUtil;
import org.jetbrains.annotations.Nullable;
-import javax.swing.BorderFactory;
-import javax.swing.Box;
-import javax.swing.BoxLayout;
-import javax.swing.ImageIcon;
-import javax.swing.JComponent;
-import javax.swing.JLabel;
-import javax.swing.JList;
-import javax.swing.JPanel;
-import javax.swing.ListCellRenderer;
+import javax.swing.*;
import java.awt.Color;
import java.awt.Component;
@@ -95,9 +87,8 @@
myGeneralFont = new Font("Helvetica", Font.PLAIN, 13);
myMainPanelDimension = new Dimension(250, 68);
myActiveMainPanelDimension = new Dimension(250, 116);
- Color bg = UIUtil.getTextFieldBackground();
- myActiveColor = UIUtil.isUnderDarcula() ? ColorUtil.shift(bg, 1.4) : new Color(0xffffff);
- myInactiveColor = UIUtil.isUnderDarcula() ? bg : new Color(0xf5f5f5);
+ myActiveColor = UIUtil.isUnderDarcula() ? UIManager.getColor("TextField.background") : Color.WHITE;
+ myInactiveColor = UIUtil.isUnderDarcula() ? UIManager.getColor("darcula.inactiveBackground") : new Color(0xf5f5f5);
FontMetrics fontMetrics = getFontMetrics(myGeneralFont);
myGeneralFontHeight = fontMetrics.getHeight();