diff options
author | Alex Lockwood <alockwood@google.com> | 2014-10-10 11:28:46 -0400 |
---|---|---|
committer | Alex Lockwood <alockwood@google.com> | 2014-10-17 10:32:14 -0400 |
commit | a2cce3aef865cc46a6310f9790d6d0fdbe119647 (patch) | |
tree | 161d733abbb1a1f5890408a0b4c18b8c2f0d8dc5 | |
parent | 32f0f46af834c09bcd98a082826b03f5d132b6a9 (diff) | |
download | login-a2cce3aef865cc46a6310f9790d6d0fdbe119647.tar.gz |
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
-rw-r--r-- | src/com/google/gct/login/ui/UsersListCellRenderer.java | 15 |
1 files changed, 3 insertions, 12 deletions
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.ui.JBColor; 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 @@ public class UsersListCellRenderer extends JComponent implements ListCellRendere 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(); |