GP-2910 - Fixed missing theme definitions; removed unused theme

definitions; fixed module theme dependencies
This commit is contained in:
dragonmacher 2022-12-14 17:53:29 -05:00
parent 1a99e2518d
commit 63d6063fa0
31 changed files with 178 additions and 139 deletions

View file

@ -1,6 +1,6 @@
[Defaults] [Defaults]
color.bg.debugger.diff.marker = color.bg.programdiff.highlight color.bg.debugger.diff.marker = color.bg.plugin.programdiff.highlight
color.debugger.plugin.plugin.memview.arrow = red color.debugger.plugin.plugin.memview.arrow = red
color.debugger.plugin.memview.box = blue color.debugger.plugin.memview.box = blue
@ -68,7 +68,6 @@ icon.debugger.object.unpopulated = object-unpopulated.png
font.debugger.object.tree.renderer = Tahoma-plain-11 font.debugger.object.tree.renderer = Tahoma-plain-11
icon.debugger.display.graph = breakpoint-enable.png // TODO this icon was missing 'breakpoints.png' icon.debugger.display.graph = breakpoint-enable.png // TODO this icon was missing 'breakpoints.png'
icon.debugger.display.graph.filtered = icon.debugger.display.graph
icon.debugger.display.xml = text-xml.png icon.debugger.display.xml = text-xml.png
icon.debugger.display.xml.filtered = icon.debugger.display.xml icon.debugger.display.xml.filtered = icon.debugger.display.xml
icon.debugger.display.export.facts = closedFolder.png icon.debugger.display.export.facts = closedFolder.png
@ -195,7 +194,6 @@ icon.debugger.disassemble = editbytes.gif // TODO this icon was missing 'disasse
[Dark Defaults] [Dark Defaults]
color.bg.debugger.diff.marker = color.bg.programdiff.highlight
color.debugger.plugin.plugin.memview.arrow = red color.debugger.plugin.plugin.memview.arrow = red
color.debugger.plugin.memview.box = blue color.debugger.plugin.memview.box = blue

View file

@ -36,7 +36,7 @@ public class MemoryBox {
protected long stopAddr = -1; protected long stopAddr = -1;
protected long startTime; protected long startTime;
protected long stopTime = -1; protected long stopTime = -1;
protected Color color = new GColor("color.bg.debugger.memview.box"); protected Color color = new GColor("color.debugger.plugin.memview.box");
protected int pixAstart; protected int pixAstart;
protected int pixAend; protected int pixAend;

View file

@ -544,7 +544,7 @@ public class DebuggerPcodeStepperProvider extends ComponentProviderAdapter {
private Color unimplColor = new GColor("color.fg.listing.mnemonic.unimplemented"); private Color unimplColor = new GColor("color.fg.listing.mnemonic.unimplemented");
private Color separatorColor = new GColor("color.fg.listing.separator"); private Color separatorColor = new GColor("color.fg.listing.separator");
private Color lineLabelColor = new GColor("color.fg.listing.pcode.label"); private Color lineLabelColor = new GColor("color.fg.listing.pcode.label");
private Color spaceColor = new GColor("color.fg.listing.pcode.space"); private Color spaceColor = new GColor("color.fg.listing.pcode.address.space");
private Color rawColor = new GColor("color.fg.listing.pcode.varnode"); private Color rawColor = new GColor("color.fg.listing.pcode.varnode");
private Color useropColor = new GColor("color.fg.listing.pcode.userop"); private Color useropColor = new GColor("color.fg.listing.pcode.userop");

View file

@ -189,7 +189,7 @@ public class SampleTableProvider extends ComponentProviderAdapter implements Opt
return SwingUtilities.isDescendingFrom((Component) sourceObject, filterTable); return SwingUtilities.isDescendingFrom((Component) sourceObject, filterTable);
} }
}; };
icon = new GIcon("icons.sample.plugin.action.save"); icon = new GIcon("icon.sample.plugin.action.save");
saveTableDataAction.setToolBarData(new ToolBarData(icon)); saveTableDataAction.setToolBarData(new ToolBarData(icon));
saveTableDataAction.setPopupMenuData(new MenuData(new String[] { "Save Data" })); saveTableDataAction.setPopupMenuData(new MenuData(new String[] { "Save Data" }));

View file

@ -4,8 +4,8 @@ icon.sample.provider.graph = color_swatch.png
icon.sample.provider.hello.world = information.png icon.sample.provider.hello.world = information.png
icon.sample.action.hello.world = information.png icon.sample.action.hello.world = information.png
icon.sample.kitchen.sink.action.hellow.world = left.png icon.sample.kitchen.sink.action.hello.world = left.png
icon.sample.kitchen.sink.action.hellow.program = right.png icon.sample.kitchen.sink.action.hello.program = right.png
icon.sample.action.show.graph = applications-development.png icon.sample.action.show.graph = applications-development.png

View file

@ -15,12 +15,12 @@
*/ */
package ghidra.examples; package ghidra.examples;
import java.awt.Event;
import java.awt.event.KeyEvent; import java.awt.event.KeyEvent;
import javax.swing.*; import javax.swing.*;
import docking.ActionContext; import docking.ActionContext;
import docking.DockingUtils;
import docking.action.*; import docking.action.*;
import generic.theme.GIcon; import generic.theme.GIcon;
import ghidra.app.ExamplesPluginPackage; import ghidra.app.ExamplesPluginPackage;
@ -73,11 +73,7 @@ public class KitchenSinkPlugin extends ProgramPlugin {
private void setupServices() { private void setupServices() {
registerServiceProvided(HelloWorldService.class, registerServiceProvided(HelloWorldService.class,
new HelloWorldService() { (HelloWorldService) () -> announce("Hello"));
public void sayHello() {
announce("Hello");
}
});
} }
private void setupActions() { private void setupActions() {
@ -95,7 +91,8 @@ public class KitchenSinkPlugin extends ProgramPlugin {
new MenuData(new String[] { "Misc", "Hello World" }, prevImage, helloGroup)); new MenuData(new String[] { "Misc", "Hello World" }, prevImage, helloGroup));
action.setPopupMenuData( action.setPopupMenuData(
new MenuData(new String[] { "Hello World" }, prevImage, helloGroup)); new MenuData(new String[] { "Hello World" }, prevImage, helloGroup));
action.setKeyBindingData(new KeyBindingData(KeyStroke.getKeyStroke('H', Event.CTRL_MASK))); action.setKeyBindingData(new KeyBindingData(
KeyStroke.getKeyStroke('H', DockingUtils.CONTROL_KEY_MODIFIER_MASK)));
action.setToolBarData(new ToolBarData(prevImage, helloGroup)); action.setToolBarData(new ToolBarData(prevImage, helloGroup));
action.setDescription("Hello World"); action.setDescription("Hello World");
action.setHelpLocation(new HelpLocation("SampleHelpTopic", "KS_Hello_World")); action.setHelpLocation(new HelpLocation("SampleHelpTopic", "KS_Hello_World"));
@ -114,7 +111,8 @@ public class KitchenSinkPlugin extends ProgramPlugin {
action.setMenuBarData( action.setMenuBarData(
new MenuData(new String[] { "Misc", "Hello Program" }, nextImage, helloGroup)); new MenuData(new String[] { "Misc", "Hello Program" }, nextImage, helloGroup));
action.setKeyBindingData( action.setKeyBindingData(
new KeyBindingData(KeyStroke.getKeyStroke(KeyEvent.VK_P, Event.CTRL_MASK))); new KeyBindingData(
KeyStroke.getKeyStroke(KeyEvent.VK_P, DockingUtils.CONTROL_KEY_MODIFIER_MASK)));
action.setToolBarData(new ToolBarData(nextImage, helloGroup)); action.setToolBarData(new ToolBarData(nextImage, helloGroup));
action.setDescription("Hello Program"); action.setDescription("Hello Program");
action.setHelpLocation(new HelpLocation("SampleHelpTopic", "KS_Hello_Program")); action.setHelpLocation(new HelpLocation("SampleHelpTopic", "KS_Hello_Program"));

View file

@ -23,8 +23,6 @@ icon.base.application.64 = GhidraIcon64.png
icon.base.application.128 = GhidraIcon128.png icon.base.application.128 = GhidraIcon128.png
icon.base.application.256 = GhidraIcon256.png icon.base.application.256 = GhidraIcon256.png
icon.help.home = GHIDRA_1.png
icon.provider.clone = camera-photo.png icon.provider.clone = camera-photo.png
icon.plugin.datatypes.built.in = package_development.png icon.plugin.datatypes.built.in = package_development.png

View file

@ -64,8 +64,6 @@ color.fg.plugin.comments.history.text = blue
color.fg.plugin.comments.history.user = color.fg color.fg.plugin.comments.history.user = color.fg
color.fg.plugin.comments.history.date = rgb(124, 37, 18) color.fg.plugin.comments.history.date = rgb(124, 37, 18)
color.bg.plugin.programtree = color.bg
color.bg.plugin.datamgr.edge.default = blue color.bg.plugin.datamgr.edge.default = blue
color.bg.plugin.datamgr.edge.composite = magenta color.bg.plugin.datamgr.edge.composite = magenta
color.bg.plugin.datamgr.edge.reference = blue color.bg.plugin.datamgr.edge.reference = blue
@ -138,13 +136,13 @@ color.bg.plugin.overview.entropy.knot.5 = blue
color.bg.plugin.overview.entropy.uninitialized = blue color.bg.plugin.overview.entropy.uninitialized = blue
color.bg.plugin.overview.entropy.palette.base.low = black color.bg.plugin.overview.entropy.palette.base.low = black
color.bg.plugin.overview.entropy.palette.base.high = white color.bg.plugin.overview.entropy.palette.base.high = white
color.bg.plugin.overview.entropy.palette.text = color.fg
color.bg.plugin.programdiff.highlight = moccasin
color.bg.plugin.programdiff.details.address = #009999 color.bg.plugin.programdiff.details.address = #009999
color.bg.plugin.programdiff.details.comment = #009900 color.bg.plugin.programdiff.details.comment = #009900
color.bg.plugin.programdiff.details.danger = #FF0000 color.bg.plugin.programdiff.details.danger = #FF0000
color.bg.plugin.programdiff.details.emphasize = #009900 color.bg.plugin.programdiff.details.emphasize = #009900
color.bg.plugin.programdiff.details.program = #990099
color.bg.plugin.references.table.active.operand = rgb(205, 205, 205) color.bg.plugin.references.table.active.operand = rgb(205, 205, 205)
@ -205,3 +203,5 @@ color.fg.analysis.options.prototype = lightcoral
color.bg.plugin.datamgr.edge.default = deepskyblue color.bg.plugin.datamgr.edge.default = deepskyblue
color.bg.plugin.datamgr.edge.composite = plum color.bg.plugin.datamgr.edge.composite = plum
color.bg.plugin.datamgr.edge.reference = deepskyblue color.bg.plugin.datamgr.edge.reference = deepskyblue
color.bg.plugin.programdiff.highlight = darkRed

View file

@ -60,8 +60,8 @@ class ExternalAddConflictPanel extends JPanel implements CodeFormatService {
public static final String MERGE_BOTH_BUTTON_NAME = public static final String MERGE_BOTH_BUTTON_NAME =
ExternalFunctionMerger.MERGE_BOTH_BUTTON_NAME; ExternalFunctionMerger.MERGE_BOTH_BUTTON_NAME;
private static final Icon HIDE_ICON = new GIcon("icons.base.listing.conflict.collapse"); private static final Icon HIDE_ICON = new GIcon("icon.plugin.merge.conflict.collapse");
private static final Icon SHOW_ICON = new GIcon("icons.base.listing.conflict.expand"); private static final Icon SHOW_ICON = new GIcon("icon.plugin.merge.conflict.expand");
private DomainObjectMergeManager mergeManager; private DomainObjectMergeManager mergeManager;
private int totalConflicts; private int totalConflicts;

View file

@ -41,14 +41,14 @@ import ghidra.util.exception.AssertException;
/** /**
* Extend this class to create screen shot images for help. The name of the class determines the * Extend this class to create screen shot images for help. The name of the class determines the
* topic directory where the captured image will be stored. So if the class name is * topic directory where the captured image will be stored. So if the class name is
* XyzShreenShots, the resulting captured image will appear in help topic directy "Xyz", regardless * XyzShreenShots, the resulting captured image will appear in help topic directly "Xyz", regardless
* of which module has that topic. The test name will determine the name of the image file * of which module has that topic. The test name will determine the name of the image file
* that is generated. So if the test name is testHappyBirthday, the filename will be * that is generated. So if the test name is testHappyBirthday, the filename will be
* HappyBirthday.png. * HappyBirthday.png.
*/ */
public abstract class GhidraScreenShotGenerator extends AbstractScreenShotGenerator { public abstract class GhidraScreenShotGenerator extends AbstractScreenShotGenerator {
private static final Color FG_COLOR_TEXT = Palette.getColor("color.palate.cornflowerblue"); private static final Color FG_COLOR_TEXT = Palette.getColor("color.palette.cornflowerblue");
private static final String CAPTURE = "Capture"; private static final String CAPTURE = "Capture";
protected GhidraScreenShotGenerator() { protected GhidraScreenShotGenerator() {

View file

@ -6,8 +6,6 @@ icon.bytepatterns.send.to.clipboard = 2rightarrow.png
icon.bytepatterns.byte.sequence.analyzer.clipboard.merged = smallRightArrow.png icon.bytepatterns.byte.sequence.analyzer.clipboard.merged = smallRightArrow.png
icon.bytepatterns.byte.sequence.analyzer.merge = xor.png icon.bytepatterns.byte.sequence.analyzer.merge = xor.png
icon.bytepatterns.closed.pattern = 2rightarrow.png
icon.bytepatterns.pattern.mining.analyzer = magnifier.png icon.bytepatterns.pattern.mining.analyzer = magnifier.png
icon.bytepatterns.function.bit.patterns.disabled = ledred.png icon.bytepatterns.function.bit.patterns.disabled = ledred.png

View file

@ -71,11 +71,6 @@ src/main/doc/sleigh_common.xsl||GHIDRA||||END|
src/main/doc/sleigh_html.xsl||GHIDRA||||END| src/main/doc/sleigh_html.xsl||GHIDRA||||END|
src/main/doc/sleigh_pdf.xsl||GHIDRA||||END| src/main/doc/sleigh_pdf.xsl||GHIDRA||||END|
src/main/help/help/TOC_Source.xml||GHIDRA||||END| src/main/help/help/TOC_Source.xml||GHIDRA||||END|
src/main/help/help/shared/arrow.gif||GHIDRA||reviewed||END|
src/main/help/help/shared/close16.gif||GHIDRA||||END|
src/main/help/help/shared/note.png||Oxygen Icons - LGPL 3.0||||END|
src/main/help/help/shared/note.yellow.png||Oxygen Icons - LGPL 3.0||||END|
src/main/help/help/shared/tip.png||Oxygen Icons - LGPL 3.0||||END|
src/main/help/help/topics/DecompilePlugin/DecompilerAnnotations.html||GHIDRA||||END| src/main/help/help/topics/DecompilePlugin/DecompilerAnnotations.html||GHIDRA||||END|
src/main/help/help/topics/DecompilePlugin/DecompilerConcepts.html||GHIDRA||||END| src/main/help/help/topics/DecompilePlugin/DecompilerConcepts.html||GHIDRA||||END|
src/main/help/help/topics/DecompilePlugin/DecompilerIntro.html||GHIDRA||||END| src/main/help/help/topics/DecompilePlugin/DecompilerIntro.html||GHIDRA||||END|

View file

@ -15,7 +15,6 @@ color.fg.decompiler.global = darkCyan
color.fg.decompiler.special = #cc0033 color.fg.decompiler.special = #cc0033
color.bg.decompiler.current.variable = rgba(255,255,0,0.5) color.bg.decompiler.current.variable = rgba(255,255,0,0.5)
color.fg.line.numbers = gray
color.bg.decompiler.highlights.default = rgba(255, 255, 0, .5) color.bg.decompiler.highlights.default = rgba(255, 255, 0, .5)
color.bg.decompiler.highlights.special = sandybrown color.bg.decompiler.highlights.special = sandybrown

View file

@ -350,7 +350,7 @@ public class DecompileOptions {
private static final GColor BACKGROUND_COLOR = new GColor(BACKGROUND_COLOR_ID); private static final GColor BACKGROUND_COLOR = new GColor(BACKGROUND_COLOR_ID);
// Color applied to a token to indicate warning/error // Color applied to a token to indicate warning/error
private final static Color ERROR_COLOR = new GColor("color.fg.decompiler.comment"); private final static Color ERROR_COLOR = new GColor("color.fg.decompiler.error");
final static String FONT_MSG = "Display.Font"; final static String FONT_MSG = "Display.Font";
public final static String DEFAULT_FONT_ID = "font.decompiler"; public final static String DEFAULT_FONT_ID = "font.decompiler";

View file

@ -1,6 +1,5 @@
[Defaults] [Defaults]
color.bg.programdiff.highlight = moccasin
icon.plugin.programdiff.apply = pencil16.png icon.plugin.programdiff.apply = pencil16.png
icon.plugin.programdiff.apply.next = pencil_arrow16.png icon.plugin.programdiff.apply.next = pencil_arrow16.png
@ -13,4 +12,3 @@ icon.plugin.programdiff.cursor.location = cursor_arrow.gif
[Dark Defaults] [Dark Defaults]
color.bg.programdiff.highlight = darkRed

View file

@ -98,7 +98,7 @@ public class ProgramDiffPlugin extends ProgramPlugin
private static final String SELECTION_GROUP = "Selection Colors"; private static final String SELECTION_GROUP = "Selection Colors";
private static final String DIFF_HIGHLIGHT_COLOR_NAME = private static final String DIFF_HIGHLIGHT_COLOR_NAME =
SELECTION_GROUP + Options.DELIMITER + "Difference Color"; SELECTION_GROUP + Options.DELIMITER + "Difference Color";
private GColor diffHighlightColor = new GColor("color.bg.programdiff.highlight"); private GColor diffHighlightColor = new GColor("color.bg.plugin.programdiff.highlight");
private Color cursorHighlightColor = GhidraOptions.DEFAULT_CURSOR_LINE_COLOR; private Color cursorHighlightColor = GhidraOptions.DEFAULT_CURSOR_LINE_COLOR;
protected static final HelpService help = Help.getHelpService(); protected static final HelpService help = Help.getHelpService();

View file

@ -47,7 +47,7 @@ icon.version.tracking.replaced = sync_enabled.png
icon.version.tracking.accept.match = flag.png icon.version.tracking.accept.match = flag.png
icon.version.tracking.add = Plus.png icon.version.tracking.add = Plus.png
icon.version.tracking.substract = list-remove.png icon.version.tracking.subtract = list-remove.png
icon.version.tracking.replace = sync_enabled.png icon.version.tracking.replace = sync_enabled.png
icon.version.tracking.auto = wizard.png icon.version.tracking.auto = wizard.png

View file

@ -9,7 +9,6 @@
##MODULE IP: Tango Icons - Public Domain ##MODULE IP: Tango Icons - Public Domain
Module.manifest||GHIDRA||||END| Module.manifest||GHIDRA||||END|
data/ExtensionPoint.manifest||GHIDRA||||END| data/ExtensionPoint.manifest||GHIDRA||||END|
data/docking.palette.theme.properties||GHIDRA||||END|
data/docking.theme.properties||GHIDRA||||END| data/docking.theme.properties||GHIDRA||||END|
src/main/help/help/TOC_Source.xml||GHIDRA||||END| src/main/help/help/TOC_Source.xml||GHIDRA||||END|
src/main/help/help/topics/Misc/Welcome_to_Help.htm||GHIDRA||||END| src/main/help/help/topics/Misc/Welcome_to_Help.htm||GHIDRA||||END|

View file

@ -1,30 +1,5 @@
[Defaults] [Defaults]
color.bg = white // note: this is the text/widget bg color
color.fg = black
color.fg.error = red
color.bg.error = lightcoral
color.fg.disabled = lightGray
color.bg.uneditable = system.color.bg.application // TODO see if there exists an LaF setting for this
color.bg.filtered = yellow
color.fg.hint = gray
color.fg.messages.hint = color.fg.hint
color.fg.messages.alert = orange
color.fg.messages.error = color.fg.error
color.fg.messages.normal = blue
color.fg.messages.warning = orange
color.bg.help.hint = rgba(100, 100, 255, 100)
color.fg.help.selector.h1 = #000080
color.fg.help.selector.h2 = #984C4C
color.fg.help.selector.h3 = #0000FF
color.fg.help.selector.p.provided.by.plugin = #7F7F7F
color.fg.help.selector.p.related.topic = #800080
color.fg.help.selector.th = #EDF3FE
color.fg.help.selector.code = black
color.fg.help.selector.code.path = #4682B4
color.bg.splashscreen = black color.bg.splashscreen = black
@ -41,27 +16,8 @@ color.fg.dialog.status.warning = color.fg.messages.warning
color.bg.selection = rgb(180, 255, 180) // pale green color.bg.selection = rgb(180, 255, 180) // pale green
color.bg.highlight = rgb(255,255,150) // pale yellow color.bg.highlight = rgb(255,255,150) // pale yellow
color.bg.tooltip = rgb(255, 255, 230)
color.bg.currentline = rgb(232,242,254) color.bg.currentline = rgb(232,242,254)
color.cursor.focused = red
color.cursor.unfocused = pink
color.bg.table.grid = gray
color.bg.table.row.drag = color.palette.lavender
color.bg.table.row = color.bg
color.bg.table.row.alt = rgb(237,243,254)
color.fg.table.uneditable.selected = yellow
color.fg.table.uneditable.unselected = lightgray
color.fg.table = color.fg
color.fg.table.unselected = white
color.fg.error.table.unselected = color.fg.error
color.fg.error.table.selected = lightpink
color.bg.tableheader.gradient.start = color.bg
color.bg.tableheader.gradient.end = lightGray
color.bg.tableheader.gradient.start.primary = rgb(205, 227, 244)
color.bg.tableheader.gradient.end.primary = rgb(126, 186, 233)
color.bg.textfield.hint.valid = color.bg color.bg.textfield.hint.valid = color.bg
color.bg.textfield.hint.invalid = rgb(255,225,225) color.bg.textfield.hint.invalid = rgb(255,225,225)
@ -73,8 +29,6 @@ color.bg.tree.drag.no.selection = rgb(204, 204, 255)
color.bg.filterfield = color.bg.filtered color.bg.filterfield = color.bg.filtered
color.fg.filterfield = black color.fg.filterfield = black
color.bg.selection.help = lightsteelblue
// generic component items // generic component items
color.border.bevel.highlight = lightGray color.border.bevel.highlight = lightGray
color.border.bevel.shadow = gray color.border.bevel.shadow = gray
@ -90,13 +44,10 @@ color.bg.fieldpanel.selection = color.bg.selection
color.bg.fieldpanel.highlight = color.bg.highlight color.bg.fieldpanel.highlight = color.bg.highlight
color.bg.fieldpanel.selection.and.highlight = green color.bg.fieldpanel.selection.and.highlight = green
color.bg.tree = [color]Tree.textBackground
color.bg.tree.selected = [color]Tree.selectionBackground
// docking buttons // docking buttons
color.fg.button = black color.fg.button = black
icon.folder.new = folder_add.png icon.folder.new = folder_add.png
icon.subtract = list-remove.png
icon.toggle.expand = expand.gif icon.toggle.expand = expand.gif
icon.toggle.collapse = collapse.gif icon.toggle.collapse = collapse.gif
@ -120,9 +71,6 @@ icon.window = application_xp.png
icon.zoom.in = zoom_in.png icon.zoom.in = zoom_in.png
icon.zoom.out = zoom_out.png icon.zoom.out = zoom_out.png
icon.theme.import = mail-receive.png
icon.theme.export = mail-folder-outbox.png
icon.docking.application.home = www_16.png icon.docking.application.home = www_16.png
icon.docking.application.16 = www_16.png icon.docking.application.16 = www_16.png
icon.docking.application.128 = www_128.png icon.docking.application.128 = www_128.png
@ -146,7 +94,6 @@ icon.filter.options.not = bullet_delete.png
icon.widget.imagepanel.reset = tag.png icon.widget.imagepanel.reset = tag.png
icon.widget.imagepanel.zoom.in = icon.zoom.in icon.widget.imagepanel.zoom.in = icon.zoom.in
icon.widget.imagepanel.zoom.out = icon.zoom.out icon.widget.imagepanel.zoom.out = icon.zoom.out
icon.widget.imagepanel.zoom.reset = zoom.png
icon.widget.filterpanel.filter.off = filter_off.png icon.widget.filterpanel.filter.off = filter_off.png
icon.widget.filterpanel.filter.on = filter_on.png icon.widget.filterpanel.filter.on = filter_on.png
@ -190,23 +137,15 @@ font.splash.status = Serif-BOLD-12
font.table.header.number = arial-BOLD-12 font.table.header.number = arial-BOLD-12
font.input.hint = monospaced-PLAIN-10 font.input.hint = monospaced-PLAIN-10
[Dark Defaults] [Dark Defaults]
color.bg = #1c1d1e
color.fg = lightgray
color.fg.error = indianRed
color.fg.disabled = gray
color.bg.filtered = beige
color.fg.hint = darkgray
color.fg.help.selector.h1 = #66AAF4
color.fg.help.selector.h2 = #9999F9
color.fg.help.selector.h3 = #FF99CC
color.fg.help.selector.p.provided.by.plugin = #CCCCCC
color.fg.help.selector.p.related.topic = #800080
color.fg.help.selector.th = #EDF3FE
color.fg.help.selector.code = gray
color.fg.help.selector.code.path = #5BA5E3
color.bg.splashscreen = black color.bg.splashscreen = black
@ -223,9 +162,6 @@ color.fg.dialog.status.normal = lightBlue
color.bg.currentline = rgb(40,40,56) // dark bluish gray color.bg.currentline = rgb(40,40,56) // dark bluish gray
color.cursor.focused = indianRed
color.cursor.unfocused = darkGray
color.bg.textfield.hint.invalid = maroon color.bg.textfield.hint.invalid = maroon
color.bg.filterfield = color.bg.filtered color.bg.filterfield = color.bg.filtered
@ -236,20 +172,10 @@ color.bg.highlight = #404028 // yellowish
color.bg.fieldpanel.selection.and.highlight = #344028 // yellow greenish color.bg.fieldpanel.selection.and.highlight = #344028 // yellow greenish
color.bg.table.row.alt = rgb(45,47,65)
color.fg.table.uneditable.selected = lemonchiffon
color.fg.table.uneditable.unselected = lightgray
color.bg.tableheader.gradient.start = color.bg
color.bg.tableheader.gradient.end = darkGray
color.bg.tableheader.gradient.start.primary = color.bg
color.bg.tableheader.gradient.end.primary = darkBlue
// docking buttons // docking buttons
color.fg.button = darkGray color.fg.button = darkGray
color.bg.filechooser.shortcut = system.color.bg.widget color.bg.filechooser.shortcut = system.color.bg.widget
color.bg.tree = color.bg
color.bg.tree.selected = [color]Tree.selectionBackground

View file

@ -46,7 +46,7 @@ public abstract class AbstractColumnConstraintEditor<T> implements ColumnConstra
/** Color indicating a valid value is defined by the editor widget(s) */ /** Color indicating a valid value is defined by the editor widget(s) */
protected static final Color VALID_INPUT_COLOR = Colors.BACKGROUND; protected static final Color VALID_INPUT_COLOR = Colors.BACKGROUND;
/** Color indicating a invalid value is defined by the editor widget(s) */ /** Color indicating a invalid value is defined by the editor widget(s) */
protected static final Color INVALID_INPUT_COLOR = new GColor("docking.palette.mistyrose"); protected static final Color INVALID_INPUT_COLOR = new GColor("color.palette.mistyrose");
/** /**
* Constructor. * Constructor.

View file

@ -2,7 +2,6 @@
# visual graph # visual graph
color.bg.visualgraph = color.bg color.bg.visualgraph = color.bg
color.bg.visualgraph.satellite = lightgray
color.bg.highlight.visualgraph = rgba(255,255,0,155) // somewhat transparent yellow color.bg.highlight.visualgraph = rgba(255,255,0,155) // somewhat transparent yellow
color.bg.visualgraph.message = rgb(138, 185, 241) // jordy blue color.bg.visualgraph.message = rgb(138, 185, 241) // jordy blue
@ -10,7 +9,6 @@ color.bg.visualgraph.drop.shadow.dark = black
color.bg.visualgraph.drop.shadow.light = gray color.bg.visualgraph.drop.shadow.light = gray
color.bg.visualgraph.satellite.vertex = #018786 color.bg.visualgraph.satellite.vertex = #018786
color.fg.visualgraph.message = color.palette.black
color.bg.visualgraph.dockingvertex = #03DAC6 color.bg.visualgraph.dockingvertex = #03DAC6
color.fg.visualgraph.dockingvertex = black color.fg.visualgraph.dockingvertex = black
@ -52,7 +50,6 @@ font.graph.component.message = SansSerif-BOLDITALIC-18
color.bg.highlight.visualgraph = rgba(120,120,120,155) // light gray with dark bg = dark gray color.bg.highlight.visualgraph = rgba(120,120,120,155) // light gray with dark bg = dark gray
color.bg.visualgraph.message = rgb(65, 146, 242) // dark blue close to jordy blue color.bg.visualgraph.message = rgb(65, 146, 242) // dark blue close to jordy blue
color.fg.visualgraph.message = color.palette.lightgray
color.bg.visualgraph.drop.shadow.dark = black color.bg.visualgraph.drop.shadow.dark = black
color.bg.visualgraph.drop.shadow.light = gray color.bg.visualgraph.drop.shadow.light = gray

View file

@ -6,6 +6,7 @@
##MODULE IP: Tango Icons - Public Domain ##MODULE IP: Tango Icons - Public Domain
.classpath||GHIDRA||||END| .classpath||GHIDRA||||END|
Module.manifest||GHIDRA||||END| Module.manifest||GHIDRA||||END|
data/gui.palette.theme.properties||GHIDRA||||END|
data/gui.theme.properties||GHIDRA||||END| data/gui.theme.properties||GHIDRA||||END|
src/main/java/ghidra/framework/options/package.html||GHIDRA||||END| src/main/java/ghidra/framework/options/package.html||GHIDRA||||END|
src/main/java/ghidra/util/layout/package.html||GHIDRA||||END| src/main/java/ghidra/util/layout/package.html||GHIDRA||||END|

View file

@ -1,9 +1,44 @@
[Defaults] [Defaults]
color.bg = white // note: this is the text/widget bg color
color.fg = black
color.cursor.focused = red
color.cursor.unfocused = pink
color.fg.error = red
color.bg.error = lightcoral
color.fg.disabled = lightGray
color.bg.uneditable = system.color.bg.application // TODO see if there exists an LaF setting for this
color.bg.filtered = yellow
color.fg.hint = gray
color.bg.tooltip = rgb(255, 255, 230)
color.fg.messages.hint = color.fg.hint
color.fg.messages.alert = orange
color.fg.messages.error = color.fg.error
color.fg.messages.normal = blue
color.fg.messages.warning = orange
color.bg.table.grid = gray
color.bg.table.row.drag = color.palette.lavender
color.bg.table.row = color.bg
color.bg.table.row.alt = rgb(237,243,254)
color.fg.table.uneditable.selected = yellow
color.fg.table.uneditable.unselected = lightgray
color.fg.table = color.fg
color.fg.table.unselected = white
color.fg.error.table.unselected = color.fg.error
color.fg.error.table.selected = lightpink
color.bg.tree = [color]Tree.textBackground
color.bg.tree.selected = [color]Tree.selectionBackground
// Fonts // Fonts
font.standard = [font]Panel.font font.standard = [font]Panel.font
font.bold = font.standard[bold] font.bold = font.standard[bold]
font.italics = font.standard[italic] font.italic = font.standard[italic]
font.bold.italic = font.standard[bold][italic] font.bold.italic = font.standard[bold][italic]
font.monospaced = monospaced-PLAIN-12 font.monospaced = monospaced-PLAIN-12
@ -19,6 +54,7 @@ icon.empty.20 = EmptyIcon.gif
icon.help = help-browser.png icon.help = help-browser.png
icon.add = Plus2.png icon.add = Plus2.png
icon.subtract = list-remove.png
icon.copy = page_white_copy.png icon.copy = page_white_copy.png
icon.cut = edit-cut.png icon.cut = edit-cut.png
icon.paste = page_paste.png icon.paste = page_paste.png
@ -66,4 +102,24 @@ icon.arrow.up.left = viewmagfit.png[rotate(275)]
[Dark Defaults] [Dark Defaults]
color.fg = lightgray
color.bg = #1c1d1e
color.fg.error = indianRed
color.fg.disabled = gray
color.bg.filtered = beige
color.fg.hint = darkgray
color.cursor.focused = indianRed
color.cursor.unfocused = darkGray
color.bg.table.row.alt = rgb(45,47,65)
color.fg.table.uneditable.selected = lemonchiffon
color.fg.table.uneditable.unselected = lightgray
color.bg.tree = color.bg
color.bg.tree.selected = [color]Tree.selectionBackground

View file

@ -309,7 +309,7 @@ public abstract class AbstractThemeReader {
return; return;
} }
if (properties.containsKey(key)) { if (properties.containsKey(key)) {
error(lineNumber, "Duplicate key found in this file!: " + key + "\""); error(lineNumber, "Duplicate key found in this file!: \"" + key + "\"");
return; return;
} }
properties.put(key, value); properties.put(key, value);

View file

@ -4,6 +4,7 @@
##MODULE IP: Oxygen Icons - LGPL 3.0 ##MODULE IP: Oxygen Icons - LGPL 3.0
Module.manifest||GHIDRA||||END| Module.manifest||GHIDRA||||END|
build.files/buildLocalHelp.xml||GHIDRA||||END| build.files/buildLocalHelp.xml||GHIDRA||||END|
data/help.theme.properties||GHIDRA||||END|
src/main/resources/help/shared/arrow.gif||GHIDRA||||END| src/main/resources/help/shared/arrow.gif||GHIDRA||||END|
src/main/resources/help/shared/close16.gif||GHIDRA||||END| src/main/resources/help/shared/close16.gif||GHIDRA||||END|
src/main/resources/help/shared/note.png||Oxygen Icons - LGPL 3.0|||Oxygen icon theme (dual license; LGPL or CC-SA-3.0)|END| src/main/resources/help/shared/note.png||Oxygen Icons - LGPL 3.0|||Oxygen icon theme (dual license; LGPL or CC-SA-3.0)|END|

View file

@ -0,0 +1,27 @@
[Defaults]
color.bg.help.hint = rgba(100, 100, 255, 100)
color.fg.help.selector.h1 = #000080
color.fg.help.selector.h2 = #984C4C
color.fg.help.selector.h3 = #0000FF
color.fg.help.selector.p.provided.by.plugin = #7F7F7F
color.fg.help.selector.p.related.topic = #800080
color.fg.help.selector.th = #EDF3FE
color.fg.help.selector.code = black
color.fg.help.selector.code.path = #4682B4
[Dark Defaults]
color.fg.help.selector.h1 = #66AAF4
color.fg.help.selector.h2 = #9999F9
color.fg.help.selector.h3 = #FF99CC
color.fg.help.selector.p.provided.by.plugin = #CCCCCC
color.fg.help.selector.p.related.topic = #800080
color.fg.help.selector.th = #EDF3FE
color.fg.help.selector.code = gray
color.fg.help.selector.code.path = #5BA5E3

View file

@ -21,8 +21,8 @@ import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener; import java.beans.PropertyChangeListener;
import java.io.*; import java.io.*;
import java.net.*; import java.net.*;
import java.util.Collection; import java.util.*;
import java.util.List; import java.util.Map;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
@ -34,8 +34,7 @@ import javax.swing.text.html.*;
import javax.swing.text.html.HTML.Tag; import javax.swing.text.html.HTML.Tag;
import generic.jar.ResourceFile; import generic.jar.ResourceFile;
import generic.theme.GIcon; import generic.theme.*;
import generic.theme.Gui;
import ghidra.framework.Application; import ghidra.framework.Application;
import ghidra.framework.preferences.Preferences; import ghidra.framework.preferences.Preferences;
import ghidra.util.Msg; import ghidra.util.Msg;
@ -63,6 +62,25 @@ public class GHelpHTMLEditorKit extends HTMLEditorKit {
private static final String HELP_WINDOW_ZOOM_FACTOR = "HELP.WINDOW.FONT.SIZE.MODIFIER"; private static final String HELP_WINDOW_ZOOM_FACTOR = "HELP.WINDOW.FONT.SIZE.MODIFIER";
private static int fontSizeModifier; private static int fontSizeModifier;
/**
* A mapping of known style sheet colors to convert from the values in the style sheet to colors
* defined in the system theme.
*/
private static final Map<String, GColor> colorsById = new HashMap<>();
static {
colorsById.put("h1", new GColor("color.fg.help.selector.h1"));
colorsById.put("h2", new GColor("color.fg.help.selector.h2"));
colorsById.put("h3", new GColor("color.fg.help.selector.h3"));
colorsById.put("p.providedbyplugin",
new GColor("color.fg.help.selector.p.provided.by.plugin"));
colorsById.put("p.relatedtopic",
new GColor("color.fg.help.selector.p.related.topic"));
colorsById.put("th", new GColor("color.fg.help.selector.th"));
colorsById.put("code", new GColor("color.fg.help.selector.code"));
colorsById.put("code.path", new GColor("color.fg.help.selector.code.path"));
}
private static final Pattern COLOR_PATTERN = Pattern.compile("(color:\\s*#{0,1}\\w+;)");
private HyperlinkListener[] delegateListeners = null; private HyperlinkListener[] delegateListeners = null;
private HyperlinkListener resolverHyperlinkListener; private HyperlinkListener resolverHyperlinkListener;
@ -279,11 +297,19 @@ public class GHelpHTMLEditorKit extends HTMLEditorKit {
return null; return null;
} }
StringBuffer buffy = new StringBuffer(); StringBuilder buffy = new StringBuilder();
try { try {
List<String> lines = FileUtilities.getLines(url); List<String> lines = FileUtilities.getLines(url);
for (String line : lines) { for (String line : lines) {
changePixels(line, fontSizeModifier, buffy);
StringBuilder lineBuilder = new StringBuilder();
changePixels(line, fontSizeModifier, lineBuilder);
String updatedLine = lineBuilder.toString();
lineBuilder.delete(0, lineBuilder.length());
changeColor(updatedLine, lineBuilder);
buffy.append(lineBuilder.toString());
buffy.append('\n'); buffy.append('\n');
} }
} }
@ -296,7 +322,31 @@ public class GHelpHTMLEditorKit extends HTMLEditorKit {
return reader; return reader;
} }
private void changePixels(String line, int amount, StringBuffer buffy) { private void changeColor(String line, StringBuilder buffy) {
int blockStart = line.indexOf("{");
if (blockStart == -1) {
buffy.append(line);
return;
}
String cssSelector = line.substring(0, blockStart).trim();
cssSelector = cssSelector.toLowerCase(); // normalize
GColor gColor = colorsById.get(cssSelector);
if (gColor == null) {
buffy.append(line);
return;
}
Matcher matcher = COLOR_PATTERN.matcher(line);
if (matcher.find()) {
matcher.appendReplacement(buffy, "color: " + gColor.toHexString() + ";");
}
matcher.appendTail(buffy);
}
private void changePixels(String line, int amount, StringBuilder buffy) {
Matcher matcher = FONT_SIZE_PATTERN.matcher(line); Matcher matcher = FONT_SIZE_PATTERN.matcher(line);
while (matcher.find()) { while (matcher.find()) {

View file

@ -23,8 +23,6 @@ color.fg.pluginpanel.details.developer =mediumVioletRed
color.fg.pluginpanel.details.dependency = green color.fg.pluginpanel.details.dependency = green
color.fg.pluginpanel.details.novalue = lightGray color.fg.pluginpanel.details.novalue = lightGray
color.border.pluginpanel = darkGray
color.fg.plugin.installer.table.has.dependents = red color.fg.plugin.installer.table.has.dependents = red
color.fg.plugin.installer.table.has.dependents.selected = pink color.fg.plugin.installer.table.has.dependents.selected = pink

View file

@ -78,7 +78,7 @@ public class FVToolBar extends JToolBar {
private class ScrollLockAction extends AbstractAction { private class ScrollLockAction extends AbstractAction {
public ScrollLockAction() { public ScrollLockAction() {
super("FVScrollLockAction", new GIcon("icon.version.control.dialog.add")); super("FVScrollLockAction", new GIcon("icon.logviewer.toolbar.scroll.lock"));
putValue(SHORT_DESCRIPTION, "Scroll Lock"); putValue(SHORT_DESCRIPTION, "Scroll Lock");
} }