Moved the new text selection colors globally

Fixes #3042

I had new selections colors for the ge/hiscores/config search bars
but forgot there were other text elements in the configs, so
I moved these new colors to UI defaults (SwingUtil)

Also removed some unused code that was setting styles to a combobox that
never gets displayed.
This commit is contained in:
Ruben Amendoeira
2018-05-21 13:10:17 +01:00
parent 2fdded3884
commit 90845534dd
2 changed files with 6 additions and 2 deletions

View File

@@ -70,8 +70,6 @@ public class IconTextField extends JPanel
this.textField = new JTextField();
this.textField.setBorder(null);
this.textField.setOpaque(false);
this.textField.setSelectedTextColor(Color.WHITE);
this.textField.setSelectionColor(ColorScheme.BRAND_ORANGE_TRANSPARENT);
add(iconWrapperLabel, BorderLayout.WEST);
add(textField, BorderLayout.CENTER);

View File

@@ -90,6 +90,12 @@ public class SwingUtil
UIManager.put("MenuItem.foreground", Color.WHITE);
UIManager.put("Panel.background", ColorScheme.DARK_GRAY_COLOR);
UIManager.put("ScrollBarUI", CustomScrollBarUI.class.getName());
UIManager.put("TextField.selectionBackground", ColorScheme.BRAND_ORANGE_TRANSPARENT);
UIManager.put("TextField.selectionForeground", Color.WHITE);
UIManager.put("FormattedTextField.selectionBackground", ColorScheme.BRAND_ORANGE_TRANSPARENT);
UIManager.put("FormattedTextField.selectionForeground", Color.WHITE);
UIManager.put("TextArea.selectionBackground", ColorScheme.BRAND_ORANGE_TRANSPARENT);
UIManager.put("TextArea.selectionForeground", Color.WHITE);
// Do not render shadows under popups/tooltips.
// Fixes black boxes under popups that are above the game applet.