GP-1981 converting option colors to theme colors and font usages to

theme properties
This commit is contained in:
ghidragon 2022-09-29 17:50:58 -04:00
parent 79b95702ba
commit 45395d7575
110 changed files with 888 additions and 1151 deletions

View file

@ -29,6 +29,7 @@ import org.apache.commons.lang3.StringUtils;
import docking.framework.DockingApplicationConfiguration;
import docking.widgets.label.GDLabel;
import generic.theme.GThemeDefaults.Colors.Messages;
import generic.theme.Gui;
import ghidra.GhidraApplicationLayout;
import ghidra.GhidraLaunchable;
import ghidra.framework.Application;
@ -895,7 +896,7 @@ public class DataTypeArchiveTransformer implements GhidraLaunchable {
});
// Fix up the default fonts that Java 1.5.0 changed to Courier, which looked terrible.
Font f = new Font("Monospaced", Font.PLAIN, 12);
Font f = Gui.getFont("font.monospaced");
UIManager.put("PasswordField.font", f);
UIManager.put("TextArea.font", f);
}

View file

@ -23,6 +23,7 @@ import java.io.IOException;
import javax.swing.*;
import docking.options.editor.ButtonPanelFactory;
import docking.widgets.checkbox.GCheckBox;
import docking.widgets.filechooser.GhidraFileChooser;
import docking.widgets.label.GHtmlLabel;
@ -86,7 +87,7 @@ public class DataTypeArchiveTransformerPanel extends JPanel {
gbc.gridx = 2;
gbc.gridwidth = 1;
JButton oldBrowseButton = new JButton(DOT_DOT_DOT);
JButton oldBrowseButton = ButtonPanelFactory.createButton(ButtonPanelFactory.BROWSE_TYPE);
oldBrowseButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@ -98,8 +99,6 @@ public class DataTypeArchiveTransformerPanel extends JPanel {
}
}
});
Font font = oldBrowseButton.getFont();
oldBrowseButton.setFont(new Font(font.getName(), Font.BOLD, font.getSize()));
filePanel.add(oldBrowseButton, gbc);
gbc.gridx = 3;
@ -125,7 +124,7 @@ public class DataTypeArchiveTransformerPanel extends JPanel {
gbc.gridx = 2;
gbc.gridwidth = 1;
JButton newBrowseButton = new JButton(DOT_DOT_DOT);
JButton newBrowseButton = ButtonPanelFactory.createButton(ButtonPanelFactory.BROWSE_TYPE);
newBrowseButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@ -137,8 +136,6 @@ public class DataTypeArchiveTransformerPanel extends JPanel {
}
}
});
Font font = newBrowseButton.getFont();
newBrowseButton.setFont(new Font(font.getName(), Font.BOLD, font.getSize()));
filePanel.add(newBrowseButton, gbc);
}
@ -158,7 +155,9 @@ public class DataTypeArchiveTransformerPanel extends JPanel {
gbc.gridx = 2;
gbc.gridwidth = 1;
JButton destinationBrowseButton = new JButton(DOT_DOT_DOT);
JButton destinationBrowseButton =
ButtonPanelFactory.createButton(ButtonPanelFactory.BROWSE_TYPE);
destinationBrowseButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@ -170,8 +169,6 @@ public class DataTypeArchiveTransformerPanel extends JPanel {
}
}
});
Font font = destinationBrowseButton.getFont();
destinationBrowseButton.setFont(new Font(font.getName(), Font.BOLD, font.getSize()));
filePanel.add(destinationBrowseButton, gbc);
}