Merge pull request #3061 from psikoi/obsidian-redesign-tweaks
Obsidian redesign tweaks
This commit is contained in:
@@ -399,8 +399,6 @@ public class ConfigPanel extends PluginPanel
|
|||||||
if (component instanceof JComboBox)
|
if (component instanceof JComboBox)
|
||||||
{
|
{
|
||||||
JComboBox jComboBox = (JComboBox) component;
|
JComboBox jComboBox = (JComboBox) component;
|
||||||
jComboBox.setRenderer(new ComboBoxListRenderer());
|
|
||||||
jComboBox.setForeground(Color.WHITE);
|
|
||||||
configManager.setConfiguration(cd.getGroup().keyName(), cid.getItem().keyName(), ((Enum) jComboBox.getSelectedItem()).name());
|
configManager.setConfiguration(cd.getGroup().keyName(), cid.getItem().keyName(), ((Enum) jComboBox.getSelectedItem()).name());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -411,6 +409,7 @@ public class ConfigPanel extends PluginPanel
|
|||||||
removeAll();
|
removeAll();
|
||||||
String name = cd.getGroup().name() + " Configuration";
|
String name = cd.getGroup().name() + " Configuration";
|
||||||
JLabel title = new JLabel(name);
|
JLabel title = new JLabel(name);
|
||||||
|
title.setForeground(Color.WHITE);
|
||||||
title.setToolTipText(cd.getGroup().description());
|
title.setToolTipText(cd.getGroup().description());
|
||||||
add(title, SwingConstants.CENTER);
|
add(title, SwingConstants.CENTER);
|
||||||
|
|
||||||
@@ -425,6 +424,7 @@ public class ConfigPanel extends PluginPanel
|
|||||||
item.setLayout(new BorderLayout());
|
item.setLayout(new BorderLayout());
|
||||||
name = cid.getItem().name();
|
name = cid.getItem().name();
|
||||||
JLabel configEntryName = new JLabel(name);
|
JLabel configEntryName = new JLabel(name);
|
||||||
|
configEntryName.setForeground(Color.WHITE);
|
||||||
configEntryName.setToolTipText("<html>" + name + ":<br>" + cid.getItem().description() + "</html>");
|
configEntryName.setToolTipText("<html>" + name + ":<br>" + cid.getItem().description() + "</html>");
|
||||||
item.add(configEntryName, BorderLayout.CENTER);
|
item.add(configEntryName, BorderLayout.CENTER);
|
||||||
|
|
||||||
|
|||||||
@@ -99,7 +99,6 @@ class XpInfoBox extends JPanel
|
|||||||
popupMenu.setBorder(new EmptyBorder(5, 5, 5, 5));
|
popupMenu.setBorder(new EmptyBorder(5, 5, 5, 5));
|
||||||
popupMenu.add(openXpTracker);
|
popupMenu.add(openXpTracker);
|
||||||
popupMenu.add(reset);
|
popupMenu.add(reset);
|
||||||
container.setComponentPopupMenu(popupMenu);
|
|
||||||
|
|
||||||
JLabel skillIcon = new JLabel(new ImageIcon(iconManager.getSkillImage(skill)));
|
JLabel skillIcon = new JLabel(new ImageIcon(iconManager.getSkillImage(skill)));
|
||||||
skillIcon.setHorizontalAlignment(SwingConstants.CENTER);
|
skillIcon.setHorizontalAlignment(SwingConstants.CENTER);
|
||||||
@@ -153,6 +152,9 @@ class XpInfoBox extends JPanel
|
|||||||
container.add(headerPanel, BorderLayout.NORTH);
|
container.add(headerPanel, BorderLayout.NORTH);
|
||||||
container.add(progressWrapper, BorderLayout.SOUTH);
|
container.add(progressWrapper, BorderLayout.SOUTH);
|
||||||
|
|
||||||
|
container.setComponentPopupMenu(popupMenu);
|
||||||
|
progressBar.setComponentPopupMenu(popupMenu);
|
||||||
|
|
||||||
add(container, BorderLayout.NORTH);
|
add(container, BorderLayout.NORTH);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -70,8 +70,6 @@ public class IconTextField extends JPanel
|
|||||||
this.textField = new JTextField();
|
this.textField = new JTextField();
|
||||||
this.textField.setBorder(null);
|
this.textField.setBorder(null);
|
||||||
this.textField.setOpaque(false);
|
this.textField.setOpaque(false);
|
||||||
this.textField.setSelectedTextColor(Color.WHITE);
|
|
||||||
this.textField.setSelectionColor(ColorScheme.BRAND_ORANGE_TRANSPARENT);
|
|
||||||
|
|
||||||
add(iconWrapperLabel, BorderLayout.WEST);
|
add(iconWrapperLabel, BorderLayout.WEST);
|
||||||
add(textField, BorderLayout.CENTER);
|
add(textField, BorderLayout.CENTER);
|
||||||
@@ -161,6 +159,13 @@ public class IconTextField extends JPanel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean requestFocusInWindow()
|
||||||
|
{
|
||||||
|
super.requestFocusInWindow();
|
||||||
|
return textField.requestFocusInWindow();
|
||||||
|
}
|
||||||
|
|
||||||
public Document getDocument()
|
public Document getDocument()
|
||||||
{
|
{
|
||||||
return textField.getDocument();
|
return textField.getDocument();
|
||||||
|
|||||||
@@ -90,6 +90,12 @@ public class SwingUtil
|
|||||||
UIManager.put("MenuItem.foreground", Color.WHITE);
|
UIManager.put("MenuItem.foreground", Color.WHITE);
|
||||||
UIManager.put("Panel.background", ColorScheme.DARK_GRAY_COLOR);
|
UIManager.put("Panel.background", ColorScheme.DARK_GRAY_COLOR);
|
||||||
UIManager.put("ScrollBarUI", CustomScrollBarUI.class.getName());
|
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.
|
// Do not render shadows under popups/tooltips.
|
||||||
// Fixes black boxes under popups that are above the game applet.
|
// Fixes black boxes under popups that are above the game applet.
|
||||||
|
|||||||
Reference in New Issue
Block a user