fontmanager: Change font on panels

This commit is contained in:
sdburns1998
2019-07-08 22:26:28 +02:00
parent b861ce4121
commit 314f45dc79
6 changed files with 12 additions and 12 deletions

View File

@@ -49,7 +49,7 @@ class ItemPanel extends JPanel
JLabel name = new JLabel(item.getName()); JLabel name = new JLabel(item.getName());
JLabel location = new JLabel(StringUtils.capitalize(kitType.toString().toLowerCase())); JLabel location = new JLabel(StringUtils.capitalize(kitType.toString().toLowerCase()));
location.setFont(FontManager.getRunescapeSmallFont()); location.setFont(FontManager.getSmallFont(getFont()));
JLabel imageLabel = new JLabel(); JLabel imageLabel = new JLabel();
icon.addTo(imageLabel); icon.addTo(imageLabel);

View File

@@ -77,8 +77,8 @@ class ProfilesPanel extends PluginPanel
private static final String ACCOUNT_LABEL = "Account Label"; private static final String ACCOUNT_LABEL = "Account Label";
private static final String PASSWORD_LABEL = "Account Password"; private static final String PASSWORD_LABEL = "Account Password";
private static final String HELP = "To add and load accounts, first enter a password into the Encryption Password " + private static final String HELP = "To add and load accounts, first enter a password into the Encryption Password " +
"field then press Load Accounts. You can now add as many accounts as you would like. The next time you restart" + "field then press Load Accounts. You can now add as many accounts as you would like. The next time you restart " +
"Runelite, enter your encryption password and click load accounts to see the accounts you entered"; "RunelitePlus, enter your encryption password and click load accounts to see the accounts you entered";
private static final Dimension PREFERRED_SIZE = new Dimension(PluginPanel.PANEL_WIDTH - 20, 30); private static final Dimension PREFERRED_SIZE = new Dimension(PluginPanel.PANEL_WIDTH - 20, 30);
private static final Dimension HELP_PREFERRED_SIZE = new Dimension(PluginPanel.PANEL_WIDTH - 20, 130); private static final Dimension HELP_PREFERRED_SIZE = new Dimension(PluginPanel.PANEL_WIDTH - 20, 130);
@@ -116,7 +116,7 @@ class ProfilesPanel extends PluginPanel
JPanel helpPanel = new JPanel(new BorderLayout()); JPanel helpPanel = new JPanel(new BorderLayout());
helpPanel.setBackground(ColorScheme.DARKER_GRAY_COLOR); helpPanel.setBackground(ColorScheme.DARKER_GRAY_COLOR);
JLabel helpLabel = new JLabel("<html> <p>" + HELP + "</p></html>"); JLabel helpLabel = new JLabel("<html> <p>" + HELP + "</p></html>");
helpLabel.setFont(FontManager.getRunescapeSmallFont()); helpLabel.setFont(FontManager.getSmallFont(getFont()));
helpPanel.setPreferredSize(HELP_PREFERRED_SIZE); helpPanel.setPreferredSize(HELP_PREFERRED_SIZE);
// helpPanel.setSize(MINIMUM_SIZE); // helpPanel.setSize(MINIMUM_SIZE);
helpPanel.add(helpLabel, BorderLayout.NORTH); helpPanel.add(helpLabel, BorderLayout.NORTH);

View File

@@ -195,8 +195,8 @@ public class SlayerTaskPanel extends PluginPanel
overallInfo.setBackground(ColorScheme.DARKER_GRAY_COLOR); overallInfo.setBackground(ColorScheme.DARKER_GRAY_COLOR);
overallInfo.setLayout(new GridLayout(2, 1)); overallInfo.setLayout(new GridLayout(2, 1));
overallInfo.setBorder(new EmptyBorder(2, 10, 2, 0)); overallInfo.setBorder(new EmptyBorder(2, 10, 2, 0));
overallKillsLabel.setFont(FontManager.getRunescapeSmallFont()); overallKillsLabel.setFont(FontManager.getSmallFont(getFont()));
overallTimeLabel.setFont(FontManager.getRunescapeSmallFont()); overallTimeLabel.setFont(FontManager.getSmallFont(getFont()));
overallInfo.add(overallKillsLabel); overallInfo.add(overallKillsLabel);
overallInfo.add(overallTimeLabel); overallInfo.add(overallTimeLabel);
overallPanel.add(overallIcon, BorderLayout.WEST); overallPanel.add(overallIcon, BorderLayout.WEST);

View File

@@ -91,7 +91,7 @@ class ItemPanel extends JPanel
} }
JShadowedLabel labelValue = new JShadowedLabel(gpLabel); JShadowedLabel labelValue = new JShadowedLabel(gpLabel);
labelValue.setFont(FontManager.getRunescapeSmallFont()); labelValue.setFont(FontManager.getSmallFont(getFont()));
colorLabel(labelValue, this.record.getTotal()); colorLabel(labelValue, this.record.getTotal());
labelValue.setVerticalAlignment(SwingUtilities.TOP); labelValue.setVerticalAlignment(SwingUtilities.TOP);

View File

@@ -80,12 +80,12 @@ class LootTrackerBox extends JPanel
logTitle.setBackground(ColorScheme.DARKER_GRAY_COLOR.darker()); logTitle.setBackground(ColorScheme.DARKER_GRAY_COLOR.darker());
final JLabel titleLabel = new JLabel(Text.removeTags(id)); final JLabel titleLabel = new JLabel(Text.removeTags(id));
titleLabel.setFont(FontManager.getRunescapeSmallFont()); titleLabel.setFont(FontManager.getSmallFont(getFont()));
titleLabel.setForeground(Color.WHITE); titleLabel.setForeground(Color.WHITE);
logTitle.add(titleLabel, BorderLayout.WEST); logTitle.add(titleLabel, BorderLayout.WEST);
subTitleLabel.setFont(FontManager.getRunescapeSmallFont()); subTitleLabel.setFont(FontManager.getSmallFont(getFont()));
subTitleLabel.setForeground(ColorScheme.LIGHT_GRAY_COLOR); subTitleLabel.setForeground(ColorScheme.LIGHT_GRAY_COLOR);
logTitle.add(subTitleLabel, BorderLayout.CENTER); logTitle.add(subTitleLabel, BorderLayout.CENTER);
@@ -94,7 +94,7 @@ class LootTrackerBox extends JPanel
subTitleLabel.setText(subtitle); subTitleLabel.setText(subtitle);
} }
priceLabel.setFont(FontManager.getRunescapeSmallFont()); priceLabel.setFont(FontManager.getSmallFont(getFont()));
priceLabel.setForeground(ColorScheme.LIGHT_GRAY_COLOR); priceLabel.setForeground(ColorScheme.LIGHT_GRAY_COLOR);
logTitle.add(priceLabel, BorderLayout.EAST); logTitle.add(priceLabel, BorderLayout.EAST);

View File

@@ -90,8 +90,8 @@ class SuppliesTrackerPanel extends PluginPanel
overallInfo.setBackground(ColorScheme.DARKER_GRAY_COLOR); overallInfo.setBackground(ColorScheme.DARKER_GRAY_COLOR);
overallInfo.setLayout(new GridLayout(2, 1)); overallInfo.setLayout(new GridLayout(2, 1));
overallInfo.setBorder(new EmptyBorder(0, 10, 0, 0)); overallInfo.setBorder(new EmptyBorder(0, 10, 0, 0));
overallSuppliesUsedLabel.setFont(FontManager.getRunescapeSmallFont()); overallSuppliesUsedLabel.setFont(FontManager.getSmallFont(getFont()));
overallCostLabel.setFont(FontManager.getRunescapeSmallFont()); overallCostLabel.setFont(FontManager.getSmallFont(getFont()));
overallInfo.add(overallSuppliesUsedLabel); overallInfo.add(overallSuppliesUsedLabel);
overallInfo.add(overallCostLabel); overallInfo.add(overallCostLabel);
overallPanel.add(overallIcon, BorderLayout.WEST); overallPanel.add(overallIcon, BorderLayout.WEST);