mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-06-01 14:54:29 +08:00
GP-1981 converting option colors to theme colors and font usages to
theme properties
This commit is contained in:
@@ -15,7 +15,6 @@
|
||||
*/
|
||||
package ghidra.feature.fid.debug;
|
||||
|
||||
import java.awt.Font;
|
||||
import java.util.*;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -29,7 +28,6 @@ import ghidra.util.NumericUtilities;
|
||||
* Utility class to handle some debug functions for the FID database.
|
||||
*/
|
||||
public class FidDebugUtils {
|
||||
public static final Font MONOSPACED_FONT = new Font("monospaced", Font.PLAIN, 12);
|
||||
|
||||
/**
|
||||
* Search the FID system for function records by name substring.
|
||||
|
||||
+3
-2
@@ -21,6 +21,7 @@ import java.awt.event.ActionListener;
|
||||
import javax.swing.*;
|
||||
|
||||
import docking.widgets.label.GDLabel;
|
||||
import generic.theme.Gui;
|
||||
import ghidra.feature.fid.db.*;
|
||||
import ghidra.feature.fid.service.FidService;
|
||||
import ghidra.program.model.lang.LanguageID;
|
||||
@@ -55,7 +56,7 @@ public class FidFunctionDebugPanel extends JPanel {
|
||||
JButton button = new JButton(text);
|
||||
button.addActionListener(listener);
|
||||
button.setHorizontalAlignment(SwingConstants.LEFT);
|
||||
button.setFont(FidDebugUtils.MONOSPACED_FONT);
|
||||
button.setFont(Gui.getFont("font.monospaced"));
|
||||
add(button);
|
||||
}
|
||||
|
||||
@@ -66,7 +67,7 @@ public class FidFunctionDebugPanel extends JPanel {
|
||||
private void addLabel(String text) {
|
||||
JLabel label = new GDLabel(text);
|
||||
label.setHorizontalAlignment(SwingConstants.LEFT);
|
||||
label.setFont(FidDebugUtils.MONOSPACED_FONT);
|
||||
label.setFont(Gui.getFont("font.monospaced"));
|
||||
add(label);
|
||||
}
|
||||
|
||||
|
||||
+3
-2
@@ -21,6 +21,7 @@ import javax.swing.*;
|
||||
|
||||
import docking.DialogComponentProvider;
|
||||
import docking.widgets.label.GDLabel;
|
||||
import generic.theme.Gui;
|
||||
import ghidra.feature.fid.db.FidFileManager;
|
||||
import ghidra.feature.fid.db.FidQueryService;
|
||||
import ghidra.feature.fid.plugin.FidPlugin;
|
||||
@@ -75,13 +76,13 @@ public class FidSearchDebugDialog extends DialogComponentProvider {
|
||||
|
||||
private JLabel getPreparedLabel(String text) {
|
||||
JLabel label = new GDLabel(text, SwingConstants.RIGHT);
|
||||
label.setFont(FidDebugUtils.MONOSPACED_FONT);
|
||||
label.setFont(Gui.getFont("font.monospaced"));
|
||||
return label;
|
||||
}
|
||||
|
||||
private JTextField getPreparedTextField() {
|
||||
JTextField textField = new JTextField(25);
|
||||
textField.setFont(FidDebugUtils.MONOSPACED_FONT);
|
||||
textField.setFont(Gui.getFont("font.monospaced"));
|
||||
return textField;
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -26,6 +26,7 @@ import javax.swing.table.TableColumn;
|
||||
import javax.swing.table.TableColumnModel;
|
||||
|
||||
import docking.widgets.table.*;
|
||||
import generic.theme.Gui;
|
||||
import ghidra.feature.fid.db.*;
|
||||
import ghidra.feature.fid.service.FidService;
|
||||
import ghidra.util.Msg;
|
||||
@@ -64,7 +65,7 @@ public class FidSearchResultFrame extends JFrame implements FidQueryCloseListene
|
||||
|
||||
private void buildFrame() {
|
||||
GTableCellRenderer renderer = new GTableCellRenderer();
|
||||
renderer.setFont(FidDebugUtils.MONOSPACED_FONT);
|
||||
renderer.setFont(Gui.getFont("font.monospaced"));
|
||||
int columnCount = table.getColumnCount();
|
||||
for (int ii = 0; ii < columnCount; ++ii) {
|
||||
Class<?> columnClass = table.getColumnClass(ii);
|
||||
|
||||
+3
-5
@@ -15,7 +15,8 @@
|
||||
*/
|
||||
package ghidra.feature.fid.plugin;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Component;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
@@ -279,10 +280,7 @@ public class PopulateFidDialog extends DialogComponentProvider {
|
||||
}
|
||||
|
||||
private JButton createBrowseButton() {
|
||||
JButton browseButton = ButtonPanelFactory.createButton(ButtonPanelFactory.BROWSE_TYPE);
|
||||
Font font = browseButton.getFont();
|
||||
browseButton.setFont(new Font(font.getName(), Font.BOLD, font.getSize()));
|
||||
return browseButton;
|
||||
return ButtonPanelFactory.createButton(ButtonPanelFactory.BROWSE_TYPE);
|
||||
}
|
||||
|
||||
private static class LibraryChoice {
|
||||
|
||||
Reference in New Issue
Block a user