mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-06 03:50:02 +02:00
GP-1981 Refactored Gui to use ThemeManager
This commit is contained in:
parent
a92a27e9f1
commit
edfb5a0877
78 changed files with 1902 additions and 1230 deletions
|
@ -26,13 +26,16 @@ import resources.ResourceManager;
|
|||
|
||||
public class ThemingScreenShots extends GhidraScreenShotGenerator {
|
||||
|
||||
private ThemeManager themeManager;
|
||||
|
||||
public ThemingScreenShots() {
|
||||
super();
|
||||
themeManager = ThemeManager.getInstance();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testThemeDialog() {
|
||||
showDialogWithoutBlocking(tool, new ThemeDialog());
|
||||
showDialogWithoutBlocking(tool, new ThemeDialog(themeManager));
|
||||
captureDialog(1000, 500);
|
||||
}
|
||||
|
||||
|
@ -41,7 +44,7 @@ public class ThemingScreenShots extends GhidraScreenShotGenerator {
|
|||
ColorValueEditor editor = new ColorValueEditor(e -> {
|
||||
/**/});
|
||||
ColorValue value = new ColorValue("color.bg.test", Palette.BLUE);
|
||||
Gui.setColor(value);
|
||||
themeManager.setColor(value);
|
||||
editor.editValue(value);
|
||||
captureDialog();
|
||||
}
|
||||
|
@ -51,7 +54,7 @@ public class ThemingScreenShots extends GhidraScreenShotGenerator {
|
|||
FontValueEditor editor = new FontValueEditor(e -> {
|
||||
/**/});
|
||||
FontValue value = new FontValue("font.xyz", new Font("Monospaced", Font.BOLD, 14));
|
||||
Gui.setFont(value);
|
||||
themeManager.setFont(value);
|
||||
editor.editValue(value);
|
||||
captureDialog();
|
||||
}
|
||||
|
@ -61,7 +64,7 @@ public class ThemingScreenShots extends GhidraScreenShotGenerator {
|
|||
IconValueEditor editor = new IconValueEditor(e -> {
|
||||
/**/});
|
||||
IconValue value = new IconValue("icon.bomb", ResourceManager.getDefaultIcon());
|
||||
Gui.setIcon(value);
|
||||
themeManager.setIcon(value);
|
||||
editor.editValue(value);
|
||||
captureDialog();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue