Plugins can now accept colors (not my code)

This commit is contained in:
Giovanni Ruddy Gazivoda
2019-04-19 03:20:27 -04:00
parent 09d2b056f1
commit 8e094f7386
2 changed files with 44 additions and 41 deletions

View File

@@ -310,7 +310,8 @@ public class ConfigPanel extends PluginPanel
String name = listItem.getName(); String name = listItem.getName();
JLabel title = new JLabel(name); JLabel title = new JLabel(name);
title.setForeground(Color.WHITE); title.setForeground(Color.WHITE);
title.setToolTipText("<html>" + name + ":<br>" + listItem.getDescription() + "</html>"); title.setText("<html>" + name +"</html>");
title.setToolTipText("<html>" + ":<br>" + listItem.getDescription() + "</html>");
topPanel.add(title); topPanel.add(title);
for (ConfigItemDescriptor cid : cd.getItems()) for (ConfigItemDescriptor cid : cd.getItems())

View File

@@ -153,8 +153,10 @@ class PluginListItem extends JPanel
setPreferredSize(new Dimension(PluginPanel.PANEL_WIDTH, 20)); setPreferredSize(new Dimension(PluginPanel.PANEL_WIDTH, 20));
JLabel nameLabel = new JLabel(name); JLabel nameLabel = new JLabel(name);
nameLabel.setText("<html>" + name +"</html>");
nameLabel.setForeground(Color.WHITE); nameLabel.setForeground(Color.WHITE);
if (!description.isEmpty()) if (!description.isEmpty())
{ {
nameLabel.setToolTipText("<html>" + name + ":<br>" + description + "</html>"); nameLabel.setToolTipText("<html>" + name + ":<br>" + description + "</html>");