mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-03 09:49:23 +02:00
GP-3094 - Theming - Converted most colors to palette colors
This commit is contained in:
parent
318d5e01f0
commit
4f1d3c8053
72 changed files with 1149 additions and 983 deletions
|
@ -1,46 +1,46 @@
|
||||||
[Defaults]
|
[Defaults]
|
||||||
|
|
||||||
color.bg.debugger.diff.marker = color.bg.plugin.programdiff.highlight
|
color.bg.debugger.diff.marker = color.bg.highlight.listing.diff
|
||||||
|
|
||||||
color.debugger.plugin.plugin.memview.arrow = red
|
color.debugger.plugin.plugin.memview.arrow = color.palette.red
|
||||||
color.debugger.plugin.memview.box = blue
|
color.debugger.plugin.memview.box = color.palette.blue
|
||||||
color.debugger.plugin.memview.box.type.instructions = rgb(128, 000, 000)
|
color.debugger.plugin.memview.box.type.instructions = color.palette.darkred
|
||||||
color.debugger.plugin.memview.box.type.process = rgb(200, 200, 255)
|
color.debugger.plugin.memview.box.type.process = color.palette.lightcornflowerblue
|
||||||
color.debugger.plugin.memview.box.type.thread = rgb(200, 255, 255)
|
color.debugger.plugin.memview.box.type.thread = color.palette.lightskyblue
|
||||||
color.debugger.plugin.memview.box.type.module = lime
|
color.debugger.plugin.memview.box.type.module = color.palette.lime
|
||||||
color.debugger.plugin.memview.box.type.region = yellow
|
color.debugger.plugin.memview.box.type.region = color.palette.yellow
|
||||||
color.debugger.plugin.memview.box.type.image = magenta
|
color.debugger.plugin.memview.box.type.image = color.palette.magenta
|
||||||
color.debugger.plugin.memview.box.type.virtual.alloc = lightgray
|
color.debugger.plugin.memview.box.type.virtual.alloc = color.palette.lightgray
|
||||||
color.debugger.plugin.memview.box.type.heap.create = blue
|
color.debugger.plugin.memview.box.type.heap.create = color.palette.blue
|
||||||
color.debugger.plugin.memview.box.type.heap.alloc = rgb(000, 100, 050)
|
color.debugger.plugin.memview.box.type.heap.alloc = color.palette.darkgreen
|
||||||
color.debugger.plugin.memview.box.type.pool = rgb(100, 000, 150)
|
color.debugger.plugin.memview.box.type.pool = color.palette.indigo
|
||||||
color.debugger.plugin.memview.box.type.stack = cyan
|
color.debugger.plugin.memview.box.type.stack = color.palette.cyan
|
||||||
color.debugger.plugin.memview.box.type.perfinfo = lightgray
|
color.debugger.plugin.memview.box.type.perfinfo = color.palette.lightgray
|
||||||
color.debugger.plugin.memview.box.type.read.memory = darkgray
|
color.debugger.plugin.memview.box.type.read.memory = color.palette.darkgray
|
||||||
color.debugger.plugin.memview.box.type.write.memory = blue
|
color.debugger.plugin.memview.box.type.write.memory = color.palette.blue
|
||||||
color.debugger.plugin.memview.box.type.breakpoint = red
|
color.debugger.plugin.memview.box.type.breakpoint = color.palette.red
|
||||||
|
|
||||||
color.bg.debugger.plugin.objects.default = color.bg
|
color.bg.debugger.plugin.objects.default = color.bg
|
||||||
color.fg.debugger.plugin.objects.default = color.fg
|
color.fg.debugger.plugin.objects.default = color.fg
|
||||||
color.fg.debugger.plugin.objects.invisible = lightgray
|
color.fg.debugger.plugin.objects.invisible = color.palette.lightgray
|
||||||
color.fg.debugger.plugin.objects.invalidated = lightgray
|
color.fg.debugger.plugin.objects.invalidated = color.palette.lightgray
|
||||||
color.fg.debugger.plugin.objects.modified = red
|
color.fg.debugger.plugin.objects.modified = color.palette.red
|
||||||
color.fg.debugger.plugin.objects.subscribed = color.fg
|
color.fg.debugger.plugin.objects.subscribed = color.fg
|
||||||
color.fg.debugger.plugin.objects.error = color.fg.error
|
color.fg.debugger.plugin.objects.error = color.fg.error
|
||||||
color.fg.debugger.plugin.objects.intrinsic = blue
|
color.fg.debugger.plugin.objects.intrinsic = color.palette.blue
|
||||||
color.fg.debugger.plugin.objects.target = magenta
|
color.fg.debugger.plugin.objects.target = color.palette.magenta
|
||||||
color.fg.debugger.plugin.objects.accessor = lightgray
|
color.fg.debugger.plugin.objects.accessor = color.palette.lightgray
|
||||||
color.fg.debugger.plugin.objects.link = green
|
color.fg.debugger.plugin.objects.link = color.palette.green
|
||||||
|
|
||||||
color.bg.debugger.plugin.resources.stale = lightgray
|
color.bg.debugger.plugin.resources.stale = color.palette.lightgray
|
||||||
color.bg.debugger.plugin.resources.error = lightpink
|
color.bg.debugger.plugin.resources.error = color.palette.lightpink
|
||||||
|
|
||||||
color.fg.debugger.value.stale = gray
|
color.fg.debugger.value.stale = color.palette.gray
|
||||||
color.fg.debugger.value.stale.selected = lightgray
|
color.fg.debugger.value.stale.selected = color.palette.lightgray
|
||||||
color.fg.debugger.value.changed = red
|
color.fg.debugger.value.changed = color.palette.red
|
||||||
color.fg.debugger.value.changed.selected = lightcoral
|
color.fg.debugger.value.changed.selected = color.palette.lightcoral
|
||||||
|
|
||||||
color.debugger.plugin.resources.register.marker = #c0e0c0
|
color.debugger.plugin.resources.register.marker = color.palette.lightgreen
|
||||||
color.debugger.plugin.resources.register.stale = color.fg.debugger.value.stale
|
color.debugger.plugin.resources.register.stale = color.fg.debugger.value.stale
|
||||||
color.debugger.plugin.resources.register.stale.selected = color.fg.debugger.value.stale.selected
|
color.debugger.plugin.resources.register.stale.selected = color.fg.debugger.value.stale.selected
|
||||||
color.debugger.plugin.resources.register.changed = color.fg.debugger.value.changed
|
color.debugger.plugin.resources.register.changed = color.fg.debugger.value.changed
|
||||||
|
@ -51,14 +51,14 @@ color.debugger.plugin.resources.watch.stale.selected = color.fg.debugger.value.s
|
||||||
color.debugger.plugin.resources.watch.changed = color.fg.debugger.value.changed
|
color.debugger.plugin.resources.watch.changed = color.fg.debugger.value.changed
|
||||||
color.debugger.plugin.resources.watch.changed.selected = color.fg.debugger.value.changed.selected
|
color.debugger.plugin.resources.watch.changed.selected = color.fg.debugger.value.changed.selected
|
||||||
|
|
||||||
color.debugger.plugin.resources.value.changed = red
|
color.debugger.plugin.resources.value.changed = color.palette.red
|
||||||
color.debugger.plugin.resources.value.changed.selected = lightcoral
|
color.debugger.plugin.resources.value.changed.selected = color.palette.lightcoral
|
||||||
|
|
||||||
color.debugger.plugin.resources.pcode.counter = lightgreen
|
color.debugger.plugin.resources.pcode.counter = color.palette.lightgreen
|
||||||
|
|
||||||
color.debugger.plugin.resources.breakpoint.marker.enabled = lightsteelblue
|
color.debugger.plugin.resources.breakpoint.marker.enabled = color.palette.lightsteelblue
|
||||||
color.debugger.plugin.resources.breakpoint.marker.disabled = color.debugger.plugin.resources.breakpoint.marker.enabled
|
color.debugger.plugin.resources.breakpoint.marker.disabled = color.debugger.plugin.resources.breakpoint.marker.enabled
|
||||||
color.debugger.plugin.resources.breakpoint.marker.enabled.ineffective = silver
|
color.debugger.plugin.resources.breakpoint.marker.enabled.ineffective = color.palette.silver
|
||||||
color.debugger.plugin.resources.breakpoint.marker.disabled.ineffective = color.debugger.plugin.resources.breakpoint.marker.enabled.ineffective
|
color.debugger.plugin.resources.breakpoint.marker.disabled.ineffective = color.debugger.plugin.resources.breakpoint.marker.enabled.ineffective
|
||||||
|
|
||||||
|
|
||||||
|
@ -194,64 +194,5 @@ icon.debugger.enable.edits = editbytes.gif
|
||||||
icon.debugger.disassemble = editbytes.gif // TODO this icon was missing 'disassemble.png'
|
icon.debugger.disassemble = editbytes.gif // TODO this icon was missing 'disassemble.png'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[Dark Defaults]
|
[Dark Defaults]
|
||||||
|
|
||||||
|
|
||||||
color.debugger.plugin.plugin.memview.arrow = red
|
|
||||||
color.debugger.plugin.memview.box = blue
|
|
||||||
color.debugger.plugin.memview.box.type.instructions = rgb(128, 000, 000)
|
|
||||||
color.debugger.plugin.memview.box.type.process = rgb(200, 200, 255)
|
|
||||||
color.debugger.plugin.memview.box.type.thread = rgb(200, 255, 255)
|
|
||||||
color.debugger.plugin.memview.box.type.module = lime
|
|
||||||
color.debugger.plugin.memview.box.type.region = yellow
|
|
||||||
color.debugger.plugin.memview.box.type.image = magenta
|
|
||||||
color.debugger.plugin.memview.box.type.virtual.alloc = lightgray
|
|
||||||
color.debugger.plugin.memview.box.type.heap.create = blue
|
|
||||||
color.debugger.plugin.memview.box.type.heap.alloc = rgb(000, 100, 050)
|
|
||||||
color.debugger.plugin.memview.box.type.pool = rgb(100, 000, 150)
|
|
||||||
color.debugger.plugin.memview.box.type.stack = cyan
|
|
||||||
color.debugger.plugin.memview.box.type.perfinfo = lightgray
|
|
||||||
color.debugger.plugin.memview.box.type.read.memory = darkgray
|
|
||||||
color.debugger.plugin.memview.box.type.write.memory = blue
|
|
||||||
color.debugger.plugin.memview.box.type.breakpoint = red
|
|
||||||
|
|
||||||
color.bg.debugger.plugin.objects.default = color.bg
|
|
||||||
color.fg.debugger.plugin.objects.default = color.fg
|
|
||||||
color.fg.debugger.plugin.objects.invisible = lightgray
|
|
||||||
color.fg.debugger.plugin.objects.invalidated = lightgray
|
|
||||||
color.fg.debugger.plugin.objects.modified = color.palette.red
|
|
||||||
color.fg.debugger.plugin.objects.subscribed = color.fg
|
|
||||||
color.fg.debugger.plugin.objects.error = color.fg.error
|
|
||||||
color.fg.debugger.plugin.objects.intrinsic = color.palette.blue
|
|
||||||
color.fg.debugger.plugin.objects.target = color.palette.magenta
|
|
||||||
color.fg.debugger.plugin.objects.accessor = lightgray
|
|
||||||
color.fg.debugger.plugin.objects.link = color.palette.green
|
|
||||||
|
|
||||||
color.bg.debugger.plugin.resources.stale = #383838 // grayish
|
|
||||||
color.bg.debugger.plugin.resources.error = color.palette.darkred
|
|
||||||
|
|
||||||
color.fg.debugger.value.stale = gray
|
|
||||||
color.fg.debugger.value.stale.selected = gray
|
|
||||||
color.fg.debugger.value.changed = color.palette.red
|
|
||||||
color.fg.debugger.value.changed.selected = color.palette.red
|
|
||||||
|
|
||||||
color.debugger.plugin.resources.register.marker = #284040 // cyanish
|
|
||||||
color.debugger.plugin.resources.register.stale = color.fg.debugger.value.stale
|
|
||||||
color.debugger.plugin.resources.register.stale.selected = color.fg.debugger.value.stale.selected
|
|
||||||
color.debugger.plugin.resources.register.changed = color.fg.debugger.value.changed
|
|
||||||
color.debugger.plugin.resources.register.changed.selected = color.fg.debugger.value.changed.selected
|
|
||||||
|
|
||||||
color.debugger.plugin.resources.watch.stale = color.fg.debugger.value.stale
|
|
||||||
color.debugger.plugin.resources.watch.stale.selected = color.fg.debugger.value.stale.selected
|
|
||||||
color.debugger.plugin.resources.watch.changed = color.fg.debugger.value.changed
|
|
||||||
color.debugger.plugin.resources.watch.changed.selected = color.fg.debugger.value.changed.selected
|
|
||||||
|
|
||||||
color.debugger.plugin.resources.value.changed = color.fg.debugger.value.changed
|
|
||||||
color.debugger.plugin.resources.value.changed.selected = color.fg.debugger.value.changed.selected
|
|
||||||
|
|
||||||
color.debugger.plugin.resources.pcode.counter = color.debugger.plugin.resources.register.marker
|
|
||||||
|
|
||||||
color.debugger.plugin.resources.breakpoint.marker.enabled = #282860 // bluish
|
|
||||||
color.debugger.plugin.resources.breakpoint.marker.disabled = color.debugger.plugin.resources.breakpoint.marker.enabled
|
|
||||||
color.debugger.plugin.resources.breakpoint.marker.enabled.ineffective = #383838 // grayish
|
|
||||||
color.debugger.plugin.resources.breakpoint.marker.disabled.ineffective = color.debugger.plugin.resources.breakpoint.marker.enabled.ineffective
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ import javax.swing.border.EmptyBorder;
|
||||||
import javax.swing.text.*;
|
import javax.swing.text.*;
|
||||||
|
|
||||||
import docking.DialogComponentProvider;
|
import docking.DialogComponentProvider;
|
||||||
import generic.theme.GColor;
|
import generic.theme.GThemeDefaults.Colors;
|
||||||
import generic.theme.Gui;
|
import generic.theme.Gui;
|
||||||
import ghidra.framework.plugintool.PluginTool;
|
import ghidra.framework.plugintool.PluginTool;
|
||||||
import ghidra.pcode.exec.SleighUtils.SleighParseError;
|
import ghidra.pcode.exec.SleighUtils.SleighParseError;
|
||||||
|
@ -31,7 +31,7 @@ import ghidra.pcode.exec.SleighUtils.SleighParseErrorEntry;
|
||||||
import ghidra.util.*;
|
import ghidra.util.*;
|
||||||
|
|
||||||
public abstract class AbstractDebuggerSleighInputDialog extends DialogComponentProvider {
|
public abstract class AbstractDebuggerSleighInputDialog extends DialogComponentProvider {
|
||||||
protected static final Color COLOR_ERROR = new GColor("color.fg.error");
|
protected static final Color COLOR_ERROR = Colors.ERROR;
|
||||||
protected static final AttributeSet RED_UNDERLINE;
|
protected static final AttributeSet RED_UNDERLINE;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
|
|
|
@ -57,23 +57,14 @@ import ghidra.trace.model.program.TraceProgramView;
|
||||||
import ghidra.trace.model.time.schedule.TraceSchedule;
|
import ghidra.trace.model.time.schedule.TraceSchedule;
|
||||||
import ghidra.util.Msg;
|
import ghidra.util.Msg;
|
||||||
|
|
||||||
@PluginInfo(
|
@PluginInfo(shortDescription = "Compare memory state between times in a trace", description = "Provides a side-by-side diff view between snapshots (points in time) in a " +
|
||||||
shortDescription = "Compare memory state between times in a trace",
|
"trace. The comparison is limited to raw bytes.", category = PluginCategoryNames.DEBUGGER, packageName = DebuggerPluginPackage.NAME, status = PluginStatus.RELEASED, eventsConsumed = {
|
||||||
description = "Provides a side-by-side diff view between snapshots (points in time) in a " +
|
|
||||||
"trace. The comparison is limited to raw bytes.",
|
|
||||||
category = PluginCategoryNames.DEBUGGER,
|
|
||||||
packageName = DebuggerPluginPackage.NAME,
|
|
||||||
status = PluginStatus.RELEASED,
|
|
||||||
eventsConsumed = {
|
|
||||||
TraceClosedPluginEvent.class,
|
TraceClosedPluginEvent.class,
|
||||||
},
|
}, eventsProduced = {}, servicesRequired = {
|
||||||
eventsProduced = {},
|
|
||||||
servicesRequired = {
|
|
||||||
DebuggerListingService.class,
|
DebuggerListingService.class,
|
||||||
},
|
}, servicesProvided = {})
|
||||||
servicesProvided = {})
|
|
||||||
public class DebuggerTraceViewDiffPlugin extends AbstractDebuggerPlugin {
|
public class DebuggerTraceViewDiffPlugin extends AbstractDebuggerPlugin {
|
||||||
static final Color COLOR_DIFF = new GColor("color.bg.debugger.diff.marker");
|
static final Color COLOR_DIFF = new GColor("color.bg.highlight.listing.diff");
|
||||||
|
|
||||||
protected static final String MARKER_NAME = "Trace Diff";
|
protected static final String MARKER_NAME = "Trace Diff";
|
||||||
protected static final String MARKER_DESCRIPTION = "Difference between snapshots in this trace";
|
protected static final String MARKER_DESCRIPTION = "Difference between snapshots in this trace";
|
||||||
|
|
|
@ -22,7 +22,7 @@ import javax.swing.JTree;
|
||||||
import javax.swing.tree.TreePath;
|
import javax.swing.tree.TreePath;
|
||||||
|
|
||||||
import docking.widgets.tree.support.GTreeRenderer;
|
import docking.widgets.tree.support.GTreeRenderer;
|
||||||
import generic.theme.GThemeDefaults.Colors.Tables;
|
import generic.theme.GColor;
|
||||||
import generic.theme.Gui;
|
import generic.theme.Gui;
|
||||||
import ghidra.app.plugin.core.debug.gui.objects.DebuggerObjectsProvider;
|
import ghidra.app.plugin.core.debug.gui.objects.DebuggerObjectsProvider;
|
||||||
import ghidra.app.plugin.core.debug.gui.objects.ObjectContainer;
|
import ghidra.app.plugin.core.debug.gui.objects.ObjectContainer;
|
||||||
|
@ -31,6 +31,8 @@ import ghidra.dbg.target.TargetExecutionStateful.TargetExecutionState;
|
||||||
import ghidra.dbg.target.TargetObject;
|
import ghidra.dbg.target.TargetObject;
|
||||||
|
|
||||||
class ObjectTreeCellRenderer extends GTreeRenderer {
|
class ObjectTreeCellRenderer extends GTreeRenderer {
|
||||||
|
|
||||||
|
private static final Color COLOR_FOREGROUND_SELECTION = new GColor("color.fg.tree.selected");
|
||||||
private static final String FONT_ID = "font.debugger.object.tree.renderer";
|
private static final String FONT_ID = "font.debugger.object.tree.renderer";
|
||||||
|
|
||||||
private final DebuggerObjectsProvider provider;
|
private final DebuggerObjectsProvider provider;
|
||||||
|
@ -51,7 +53,7 @@ class ObjectTreeCellRenderer extends GTreeRenderer {
|
||||||
TargetObject targetObject = container.getTargetObject();
|
TargetObject targetObject = container.getTargetObject();
|
||||||
if (container.isSubscribed()) {
|
if (container.isSubscribed()) {
|
||||||
Color color = provider.COLOR_FOREGROUND_SUBSCRIBED;
|
Color color = provider.COLOR_FOREGROUND_SUBSCRIBED;
|
||||||
if (!color.equals(Tables.FG_UNSELECTED)) {
|
if (!color.equals(getTextNonSelectionColor())) {
|
||||||
component.setForeground(color);
|
component.setForeground(color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -86,7 +88,7 @@ class ObjectTreeCellRenderer extends GTreeRenderer {
|
||||||
if (last instanceof ObjectNode) {
|
if (last instanceof ObjectNode) {
|
||||||
ObjectContainer selection = ((ObjectNode) last).getContainer();
|
ObjectContainer selection = ((ObjectNode) last).getContainer();
|
||||||
if (container.equals(selection)) {
|
if (container.equals(selection)) {
|
||||||
component.setForeground(Tables.FG_SELECTED);
|
component.setForeground(COLOR_FOREGROUND_SELECTION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,12 +15,15 @@
|
||||||
*/
|
*/
|
||||||
package ghidra.app.plugin.core.debug.gui.stack.vars;
|
package ghidra.app.plugin.core.debug.gui.stack.vars;
|
||||||
|
|
||||||
|
import static ghidra.app.plugin.core.debug.gui.stack.vars.VariableValueRow.*;
|
||||||
|
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
import generic.theme.GColor;
|
import generic.theme.GColor;
|
||||||
|
import generic.theme.GThemeDefaults.Colors;
|
||||||
import ghidra.app.plugin.core.debug.stack.UnwoundFrame;
|
import ghidra.app.plugin.core.debug.stack.UnwoundFrame;
|
||||||
import ghidra.pcode.exec.DebuggerPcodeUtils.PrettyBytes;
|
import ghidra.pcode.exec.DebuggerPcodeUtils.PrettyBytes;
|
||||||
import ghidra.pcode.exec.DebuggerPcodeUtils.WatchValue;
|
import ghidra.pcode.exec.DebuggerPcodeUtils.WatchValue;
|
||||||
|
@ -44,7 +47,7 @@ import ghidra.util.exception.InvalidInputException;
|
||||||
*/
|
*/
|
||||||
public interface VariableValueRow {
|
public interface VariableValueRow {
|
||||||
// TODO: Colors specific to hovers?
|
// TODO: Colors specific to hovers?
|
||||||
GColor COLOR_ERROR = new GColor("color.fg.error");
|
GColor COLOR_ERROR = Colors.ERROR;
|
||||||
GColor COLOR_STALE = new GColor("color.fg.debugger.value.stale");
|
GColor COLOR_STALE = new GColor("color.fg.debugger.value.stale");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -5,17 +5,22 @@ color.bg.currentline.listing = color.bg.currentline
|
||||||
color.bg.selection.listing = color.bg.selection
|
color.bg.selection.listing = color.bg.selection
|
||||||
color.bg.highlight.listing = color.bg.highlight
|
color.bg.highlight.listing = color.bg.highlight
|
||||||
|
|
||||||
|
color.bg.highlight.listing.diff = moccasin // bisque / blanchedalmond / peachpuff / navajowhite
|
||||||
|
|
||||||
|
color.bg.listing.highlighter.default = color.palette.yellow
|
||||||
|
color.bg.listing.highlighter.scoped.read = color.palette.darkkhaki
|
||||||
|
color.bg.listing.highlighter.scoped.write = color.palette.lightgreen
|
||||||
|
|
||||||
color.bg.listing.tabs.selected = [color]system.color.bg.selected.view
|
color.bg.listing.tabs.selected = [color]system.color.bg.selected.view
|
||||||
color.bg.listing.tabs.unselected = [color]system.color.bg.control
|
color.bg.listing.tabs.unselected = [color]system.color.bg.control
|
||||||
color.bg.listing.tabs.highlighted = #ABC8FF
|
color.bg.listing.tabs.highlighted = color.palette.lightcornflowerblue
|
||||||
color.bg.listing.tabs.list = rgb(255, 255, 230)
|
color.bg.listing.tabs.list = [color]system.color.bg.tooltip
|
||||||
color.bg.listing.tabs.more.tabs.hover = rgb(255, 226, 213)
|
color.bg.listing.tabs.more.tabs.hover = color.bg.listing.tabs.selected
|
||||||
color.fg.listing.tabs.text.selected = [color]system.color.fg.selected.view
|
color.fg.listing.tabs.text.selected = [color]system.color.fg.selected.view
|
||||||
color.fg.listing.tabs.text.unselected = color.fg
|
color.fg.listing.tabs.text.unselected = color.fg
|
||||||
color.fg.listing.tabs.list = black
|
color.fg.listing.tabs.list = color.fg
|
||||||
|
|
||||||
|
color.bg.listing.header.active.field = color.palette.tan
|
||||||
color.bg.listing.header.active.field = rgb(244, 221, 183)
|
|
||||||
color.fg.listing.header.active.field = color.fg
|
color.fg.listing.header.active.field = color.fg
|
||||||
|
|
||||||
color.cursor.focused.listing = color.cursor.focused
|
color.cursor.focused.listing = color.cursor.focused
|
||||||
|
@ -25,10 +30,10 @@ color.fg.listing.address = color.fg
|
||||||
color.fg.listing.bytes = color.palette.blue
|
color.fg.listing.bytes = color.palette.blue
|
||||||
color.fg.listing.constant = color.palette.green
|
color.fg.listing.constant = color.palette.green
|
||||||
|
|
||||||
color.fg.listing.comment.auto = lightGray
|
color.fg.listing.comment.auto = color.palette.lightgray
|
||||||
color.fg.listing.comment.eol = color.palette.blue
|
color.fg.listing.comment.eol = color.palette.blue
|
||||||
color.fg.listing.comment.repeatable = color.palette.darkorange
|
color.fg.listing.comment.repeatable = color.palette.darkorange
|
||||||
color.fg.listing.comment.ref.repeatable = cornflowerBlue
|
color.fg.listing.comment.ref.repeatable = color.palette.cornflowerblue
|
||||||
color.fg.listing.comment.plate = color.palette.gray
|
color.fg.listing.comment.plate = color.palette.gray
|
||||||
color.fg.listing.comment.post = color.palette.blue
|
color.fg.listing.comment.post = color.palette.blue
|
||||||
color.fg.listing.comment.pre = color.palette.indigo
|
color.fg.listing.comment.pre = color.palette.indigo
|
||||||
|
@ -38,28 +43,28 @@ color.fg.listing.ext.ref.unresolved = color.fg.listing.ref.bad
|
||||||
color.fg.listing.ext.ref.resolved = color.palette.teal
|
color.fg.listing.ext.ref.resolved = color.palette.teal
|
||||||
color.fg.listing.fieldname = color.fg
|
color.fg.listing.fieldname = color.fg
|
||||||
|
|
||||||
color.fg.listing.function.callfixup = fuchsia
|
color.fg.listing.function.callfixup = color.palette.magenta
|
||||||
color.fg.listing.function.name = color.palette.blue
|
color.fg.listing.function.name = color.palette.blue
|
||||||
color.fg.listing.function.name.thunk = color.fg.listing.function.name
|
color.fg.listing.function.name.thunk = color.fg.listing.function.name
|
||||||
color.fg.listing.function.param = color.fg
|
color.fg.listing.function.param = color.fg
|
||||||
color.fg.listing.function.param.auto = color.palette.gray
|
color.fg.listing.function.param.auto = color.palette.gray
|
||||||
color.fg.listing.function.param.custom = color.palette.indigo
|
color.fg.listing.function.param.custom = color.palette.indigo
|
||||||
color.fg.listing.function.param.dynamic = #006666
|
color.fg.listing.function.param.dynamic = color.palette.teal
|
||||||
color.fg.listing.function.purge = color.palette.blue
|
color.fg.listing.function.purge = color.palette.blue
|
||||||
color.fg.listing.function.return.type = color.fg
|
color.fg.listing.function.return.type = color.fg
|
||||||
color.fg.listing.function.source = color.fg
|
color.fg.listing.function.source = color.fg
|
||||||
color.fg.listing.function.tag = mediumVioletRed
|
color.fg.listing.function.tag = color.palette.purple
|
||||||
color.fg.listing.function.variable = color.palette.purple
|
color.fg.listing.function.variable = color.palette.purple
|
||||||
color.fg.listing.function.variable.assigned = color.palette.purple
|
color.fg.listing.function.variable.assigned = color.palette.purple
|
||||||
|
|
||||||
color.fg.listing.label.local = color.palette.green
|
color.fg.listing.label.local = color.palette.green
|
||||||
color.fg.listing.label.non.primary = color.palette.olive
|
color.fg.listing.label.non.primary = color.palette.olive
|
||||||
color.fg.listing.label.primary = darkBlue
|
color.fg.listing.label.primary = color.palette.blue
|
||||||
color.fg.listing.label.unreferenced = color.fg
|
color.fg.listing.label.unreferenced = color.fg
|
||||||
|
|
||||||
color.fg.listing.mnemonic = navy
|
color.fg.listing.mnemonic = color.palette.navy
|
||||||
color.fg.listing.mnemonic.override = deepPink
|
color.fg.listing.mnemonic.override = color.palette.magenta
|
||||||
color.fg.listing.mnemonic.unimplemented = navy
|
color.fg.listing.mnemonic.unimplemented = color.palette.navy
|
||||||
|
|
||||||
color.fg.listing.array.values = color.fg
|
color.fg.listing.array.values = color.fg
|
||||||
color.fg.listing.block.start = color.palette.indigo
|
color.fg.listing.block.start = color.palette.indigo
|
||||||
|
@ -90,14 +95,16 @@ color.fg.listing.pcode.address.space = color.palette.blue
|
||||||
color.fg.listing.pcode.varnode = color.palette.blue
|
color.fg.listing.pcode.varnode = color.palette.blue
|
||||||
color.fg.listing.pcode.userop = color.palette.blue
|
color.fg.listing.pcode.userop = color.palette.blue
|
||||||
|
|
||||||
color.fg.listing.stack.depth = blue
|
color.fg.listing.stack.depth = color.palette.blue
|
||||||
color.fg.listing.taint = color.fg
|
color.fg.listing.taint = color.fg
|
||||||
|
|
||||||
color.bg.listing.comparison.bytes = chartreuse
|
color.bg.listing.comparison.bytes = color.palette.lightgreen
|
||||||
color.bg.listing.comparison.mnemonic = chartreuse
|
color.bg.listing.comparison.mnemonic = color.palette.lightgreen
|
||||||
color.bg.listing.comparison.operand = chartreuse
|
color.bg.listing.comparison.operand = color.palette.lightgreen
|
||||||
color.bg.listing.comparison.code.units.diff = silver
|
color.bg.listing.comparison.code.units.diff = color.palette.silver
|
||||||
color.bg.listing.comparison.code.units.unmatched = skyblue
|
color.bg.listing.comparison.code.units.unmatched = color.palette.lightskyblue
|
||||||
|
|
||||||
|
color.bg.listing.error = color.palette.lightcoral
|
||||||
|
|
||||||
font.listing.base = font.monospaced
|
font.listing.base = font.monospaced
|
||||||
font.listing.header = SansSerif-PLAIN-11
|
font.listing.header = SansSerif-PLAIN-11
|
||||||
|
@ -105,23 +112,5 @@ font.listing.header = SansSerif-PLAIN-11
|
||||||
|
|
||||||
[Dark Defaults]
|
[Dark Defaults]
|
||||||
|
|
||||||
color.bg.listing.header.active.field = rgb(244, 221, 183)
|
color.bg.highlight.listing.diff = #4D4D2A
|
||||||
color.fg.listing.header.active.field = black
|
|
||||||
color.fg.listing.comment.auto = color.fg
|
|
||||||
color.fg.listing.comment.ref.repeatable = color.palette.darkcyan
|
|
||||||
color.fg.listing.function.callfixup = color.palette.magenta
|
|
||||||
color.fg.listing.function.param.dynamic = color.palette.teal
|
|
||||||
color.fg.listing.function.tag = #ff7090
|
|
||||||
color.fg.listing.label.primary = color.palette.cyan
|
|
||||||
|
|
||||||
color.bg.listing.comparison.bytes = #C6F4DD
|
|
||||||
color.bg.listing.comparison.mnemonic = #C6F4DD
|
|
||||||
color.bg.listing.comparison.operand = #C6F4DD
|
|
||||||
color.bg.listing.comparison.code.units.diff = #9B6631
|
|
||||||
color.bg.listing.comparison.code.units.unmatched = #2A4651
|
|
||||||
|
|
||||||
|
|
||||||
color.fg.listing.mnemonic.override = color.palette.pink
|
|
||||||
color.fg.listing.mnemonic = color.palette.cyan
|
|
||||||
color.fg.listing.mnemonic.unimplemented = color.palette.cyan
|
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ color.bg.plugin.programgraph.edge.read.write.indirect = brown
|
||||||
color.bg.plugin.programgraph.edge.terminator = purple
|
color.bg.plugin.programgraph.edge.terminator = purple
|
||||||
color.bg.plugin.programgraph.edge.thunk = blue
|
color.bg.plugin.programgraph.edge.thunk = blue
|
||||||
color.bg.plugin.programgraph.edge.write = red
|
color.bg.plugin.programgraph.edge.write = red
|
||||||
color.bg.plugin.programgraph.edge.write.indirect = darkred
|
color.bg.plugin.programgraph.edge.write.indirect = color.palette.darkred
|
||||||
|
|
||||||
|
|
||||||
color.bg.plugin.programgraph.vertex.default = red
|
color.bg.plugin.programgraph.vertex.default = red
|
||||||
|
|
|
@ -1,27 +1,27 @@
|
||||||
[Defaults]
|
[Defaults]
|
||||||
|
|
||||||
color.bg.undefined = rgb(220, 220, 220) // bg for clients displaying undefined functions
|
color.bg.undefined = color.palette.lightgray
|
||||||
|
|
||||||
color.flowtype.fall.through = red
|
color.flowtype.fall.through = color.palette.red
|
||||||
color.flowtype.jump.conditional = #007C00 // dark green
|
color.flowtype.jump.conditional = color.palette.green
|
||||||
color.flowtype.jump.unconditional = blue
|
color.flowtype.jump.unconditional = color.palette.blue
|
||||||
|
|
||||||
color.bg.table.selection.bundle = [color]system.color.bg.selected.view
|
color.bg.table.selection.bundle = [color]system.color.bg.selected.view
|
||||||
color.fg.table.selection.bundle = [color]system.color.fg.selected.view
|
color.fg.table.selection.bundle = [color]system.color.fg.selected.view
|
||||||
color.fg.table.bundle.disabled = darkGray
|
color.fg.table.bundle.disabled = color.palette.darkgray
|
||||||
color.fg.table.bundle.busy = gray
|
color.fg.table.bundle.busy = color.palette.gray
|
||||||
color.fg.table.bundle.inactive = black
|
color.fg.table.bundle.inactive = color.palette.black
|
||||||
color.fg.table.bundle.active = green
|
color.fg.table.bundle.active = color.palette.green
|
||||||
|
|
||||||
color.fg.table.offcut.selected = pink
|
color.fg.table.offcut.selected = color.palette.pink
|
||||||
color.fg.table.offcut.unselected = color.fg.error
|
color.fg.table.offcut.unselected = color.fg.error
|
||||||
|
|
||||||
color.bg.splash.infopanel = color.bg
|
color.bg.splash.infopanel = color.bg
|
||||||
|
|
||||||
color.bg.table.selected.ghidratable = color.bg
|
color.fg.dialog.equates.equate.selected = color.fg
|
||||||
color.fg.table.ghidratable.equate.bad = red
|
color.fg.dialog.equates.equate.bad = color.fg.error
|
||||||
color.fg.table.ghidratable.equate = blue
|
color.fg.dialog.equates.equate = color.palette.blue
|
||||||
color.fg.table.ghidratable.suggestion = silver
|
color.fg.dialog.equates.suggestion = color.palette.hint
|
||||||
|
|
||||||
color.fg.consoletextpane = color.fg
|
color.fg.consoletextpane = color.fg
|
||||||
color.fg.error.consoletextpane = color.fg.error
|
color.fg.error.consoletextpane = color.fg.error
|
||||||
|
@ -32,125 +32,122 @@ color.bg.interpreterconsole = color.bg
|
||||||
color.fg.interpreterconsole = color.fg
|
color.fg.interpreterconsole = color.fg
|
||||||
color.fg.interpreterconsole.error = color.fg.error
|
color.fg.interpreterconsole.error = color.fg.error
|
||||||
|
|
||||||
color.bg.listing.highlighter.default = yellow
|
color.bg.listing.highlighter.default = color.palette.yellow
|
||||||
color.bg.listing.highlighter.scoped.read = rgb(204,204, 0)
|
color.bg.listing.highlighter.scoped.read = color.palette.darkkhaki
|
||||||
color.bg.listing.highlighter.scoped.write = green
|
color.bg.listing.highlighter.scoped.write = color.palette.lightgreen
|
||||||
|
|
||||||
color.bg.markerservice = color.bg
|
color.bg.markerservice = color.bg
|
||||||
|
|
||||||
color.bg.search.highlight = rgb(255,255,200)
|
color.bg.search.highlight = color.bg.highlight
|
||||||
color.bg.search.current.line.highlight = yellow
|
color.bg.search.current.line.highlight = color.palette.yellow
|
||||||
|
|
||||||
color.bg.tree.renderer.icon.fill = #9F9FFF
|
color.bg.analysis.options.not.default.enablement = color.palette.lightgray
|
||||||
color.bg.tree.renderer.icon.line = #8282FF
|
color.bg.analysis.options.not.default.enablement.selected = color.palette.gray
|
||||||
|
color.fg.analysis.options.prototype = color.palette.crimson
|
||||||
|
color.fg.analysis.options.prototype.selected = color.palette.lightcoral
|
||||||
|
|
||||||
color.bg.analysis.options.not.default.enablement = rgb(255, 255, 200)
|
color.fg.plugin.assembler.completion.least = color.palette.green
|
||||||
color.bg.analysis.options.not.default.enablement.selected = rgb(177, 212, 236)
|
color.fg.plugin.assembler.completion.middle = color.palette.navy
|
||||||
color.fg.analysis.options.prototype = crimson
|
color.fg.plugin.assembler.completion.most = color.palette.blue
|
||||||
color.fg.analysis.options.prototype.selected = crimson
|
|
||||||
|
|
||||||
color.fg.plugin.assembler.completion.least = rgb(0, 128, 0)
|
color.bg.plugin.bookmark.analysis = color.palette.orange
|
||||||
color.fg.plugin.assembler.completion.middle = rgb(0, 0, 128)
|
color.bg.plugin.bookmark.default = color.palette.magenta
|
||||||
color.fg.plugin.assembler.completion.most = blue
|
color.bg.plugin.bookmark.error = color.palette.crimson
|
||||||
|
color.bg.plugin.bookmark.info = color.palette.cyan
|
||||||
|
color.bg.plugin.bookmark.note = color.palette.blueviolet
|
||||||
|
color.bg.plugin.bookmark.warning = color.palette.gold
|
||||||
|
|
||||||
color.bg.plugin.bookmark.analysis = rgb(255, 128, 0) // orange
|
color.bg.plugin.colorizer.default = color.palette.lightskyblue
|
||||||
color.bg.plugin.bookmark.default = rgb(255, 0, 255) // magenta
|
color.bg.plugin.colorizer.marker = color.palette.pink
|
||||||
color.bg.plugin.bookmark.error = rgb(204, 0, 51) // dark red
|
|
||||||
color.bg.plugin.bookmark.info = rgb(0, 255, 255) // cyan
|
|
||||||
color.bg.plugin.bookmark.note = rgb(128, 0, 255) // purple
|
|
||||||
color.bg.plugin.bookmark.warning = rgb(255, 196, 51) // dark yellow
|
|
||||||
|
|
||||||
color.bg.plugin.colorizer.default = #84AFD3
|
color.fg.plugin.comments.history.text = color.palette.blue
|
||||||
color.bg.plugin.colorizer.marker = pink
|
|
||||||
|
|
||||||
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 = color.palette.darkred
|
||||||
|
|
||||||
color.bg.plugin.datamgr.edge.default = blue
|
color.bg.plugin.datamgr.edge.default = color.palette.blue
|
||||||
color.bg.plugin.datamgr.edge.composite = magenta
|
color.bg.plugin.datamgr.edge.composite = color.palette.magenta
|
||||||
color.bg.plugin.datamgr.edge.reference = blue
|
color.bg.plugin.datamgr.edge.reference = color.palette.blue
|
||||||
color.bg.plugin.datamgr.icon.highlight = rgb(204, 204, 255)
|
color.bg.plugin.datamgr.icon.highlight = color.palette.lightsteelblue
|
||||||
|
|
||||||
color.fg.plugin.disassembledview.address = color.fg
|
color.fg.plugin.disassembledview.address = color.fg
|
||||||
|
|
||||||
color.bg.plugin.editors.compositeeditor.text = color.fg
|
color.bg.plugin.editors.compositeeditor.text = color.fg
|
||||||
color.bg.plugin.editors.compositeeditor.line = [color]system.color.bg.border
|
color.bg.plugin.editors.compositeeditor.line = [color]system.color.bg.border
|
||||||
color.bg.plugin.editors.compositeeditor.line.interior = #D4D4D4
|
color.bg.plugin.editors.compositeeditor.line.interior = color.palette.lightgray
|
||||||
color.bg.plugin.editors.compositeeditor.byte.header = #DFDFDF
|
color.bg.plugin.editors.compositeeditor.byte.header = color.palette.lightgray
|
||||||
color.bg.plugin.editors.compositeeditor.bit.undefined = #F8F8F8
|
color.bg.plugin.editors.compositeeditor.bit.undefined = color.palette.white
|
||||||
color.bg.plugin.editors.compositeeditor.bit.component = #BFBFFF
|
color.bg.plugin.editors.compositeeditor.bit.component = color.palette.lightpurple
|
||||||
color.bg.plugin.editors.compositeeditor.bit.active = green
|
color.bg.plugin.editors.compositeeditor.bit.active = color.palette.green
|
||||||
color.bg.plugin.editors.compositeeditor.bit.conflict = yellow
|
color.bg.plugin.editors.compositeeditor.bit.conflict = color.palette.yellow
|
||||||
color.bg.plugin.editors.compositeeditor.non.bit = #A0A0FF
|
color.bg.plugin.editors.compositeeditor.non.bit = color.palette.lightpurple
|
||||||
|
|
||||||
color.fg.plugin.equate.enum = royalblue
|
color.fg.plugin.equate.user.defined = color.palette.blue
|
||||||
|
|
||||||
color.fg.plugin.function.editor.dialog.textfield.default = color.fg
|
color.fg.plugin.function.editor.dialog.textfield.default = color.fg
|
||||||
color.fg.plugin.function.editor.dialog.textfield.error = color.fg.error
|
color.fg.plugin.function.editor.dialog.textfield.error = color.fg.error
|
||||||
color.fg.plugin.function.editor.dialog.textfield.function.name = color.palette.blue
|
color.fg.plugin.function.editor.dialog.textfield.function.name = color.palette.blue
|
||||||
color.fg.plugin.function.editor.dialog.textfield.parameter = color.fg.listing.function.param
|
color.fg.plugin.function.editor.dialog.textfield.parameter = color.fg.listing.function.param
|
||||||
|
|
||||||
color.bg.plugin.instructionsearch.table.masked.instruction = rgb(237, 243, 254) // faint blue
|
color.bg.plugin.instructionsearch.table.masked.instruction = color.palette.lavender
|
||||||
color.bg.plugin.instructionsearch.table.masked.non.instruction = rgb(255, 242, 214) // tan
|
color.bg.plugin.instructionsearch.table.masked.non.instruction = color.palette.cornsilk
|
||||||
color.bg.plugin.instructionsearch.table.not.masked.instruction = rgb(188, 212, 254) // light blue
|
color.bg.plugin.instructionsearch.table.not.masked.instruction = color.palette.lightsteelblue
|
||||||
color.bg.plugin.instructionsearch.table.not.masked.non.instruction = rgb(203, 186, 150) // dark tan
|
color.bg.plugin.instructionsearch.table.not.masked.non.instruction = color.palette.tan
|
||||||
color.bg.plugin.instructionsearch.table.default = rgb(214, 217, 223)
|
color.bg.plugin.instructionsearch.table.default = color.palette.lightgray
|
||||||
color.bg.plugin.instructionsearch.search.markers = lightgreen
|
color.bg.plugin.instructionsearch.search.markers = color.palette.lightgreen
|
||||||
|
|
||||||
color.fg.plugin.interpreter.renderer.color.standard.1 = rgb(0,0,0) // black
|
color.fg.plugin.interpreter.renderer.color.standard.1 = color.palette.black
|
||||||
color.fg.plugin.interpreter.renderer.color.standard.2 = rgb(194, 54, 33) // red
|
color.fg.plugin.interpreter.renderer.color.standard.2 = color.palette.maroon
|
||||||
color.fg.plugin.interpreter.renderer.color.standard.3 = rgb(37, 188, 36) // green
|
color.fg.plugin.interpreter.renderer.color.standard.3 = color.palette.limegreen
|
||||||
color.fg.plugin.interpreter.renderer.color.standard.4 = rgb(173, 173, 39) // yellow
|
color.fg.plugin.interpreter.renderer.color.standard.4 = color.palette.darkkhaki
|
||||||
color.fg.plugin.interpreter.renderer.color.standard.5 = rgb(73, 46, 225) // blue
|
color.fg.plugin.interpreter.renderer.color.standard.5 = color.palette.blue
|
||||||
color.fg.plugin.interpreter.renderer.color.standard.6 = rgb(211, 56, 211) // magenta
|
color.fg.plugin.interpreter.renderer.color.standard.6 = color.palette.magenta
|
||||||
color.fg.plugin.interpreter.renderer.color.standard.7 = rgb(51, 187, 200) // cyan
|
color.fg.plugin.interpreter.renderer.color.standard.7 = color.palette.cyan
|
||||||
color.fg.plugin.interpreter.renderer.color.standard.8 = rgb(203, 204, 205) // white
|
color.fg.plugin.interpreter.renderer.color.standard.8 = color.palette.lightgray
|
||||||
color.fg.plugin.interpreter.renderer.color.intense.1 = rgb(129, 131, 131) // intense black
|
color.fg.plugin.interpreter.renderer.color.intense.1 = color.palette.darkgray
|
||||||
color.fg.plugin.interpreter.renderer.color.intense.2 = rgb(252, 57, 31) // intense red
|
color.fg.plugin.interpreter.renderer.color.intense.2 = color.palette.red
|
||||||
color.fg.plugin.interpreter.renderer.color.intense.3 = rgb(49, 231, 34) // intense green
|
color.fg.plugin.interpreter.renderer.color.intense.3 = color.palette.lime
|
||||||
color.fg.plugin.interpreter.renderer.color.intense.4 = rgb(234, 236, 35) // intense yellow
|
color.fg.plugin.interpreter.renderer.color.intense.4 = color.palette.yellow
|
||||||
color.fg.plugin.interpreter.renderer.color.intense.5 = rgb(88, 51, 255) // intense blue
|
color.fg.plugin.interpreter.renderer.color.intense.5 = color.palette.blue
|
||||||
color.fg.plugin.interpreter.renderer.color.intense.6 = rgb(249, 53, 248) // intense magenta
|
color.fg.plugin.interpreter.renderer.color.intense.6 = color.palette.magenta
|
||||||
color.fg.plugin.interpreter.renderer.color.intense.7 = rgb(20, 240, 240) // intense cyan
|
color.fg.plugin.interpreter.renderer.color.intense.7 = color.palette.cyan
|
||||||
color.fg.plugin.interpreter.renderer.color.intense.8 = rgb(233, 235, 235) // intense white
|
color.fg.plugin.interpreter.renderer.color.intense.8 = color.palette.white
|
||||||
|
|
||||||
color.bg.plugin.locationreferences.highlight = rgb(168, 202, 242)
|
color.bg.plugin.locationreferences.highlight = color.palette.lightcornflowerblue
|
||||||
|
|
||||||
color.bg.plugin.myprogramchangesdisplay.markers.changes.unsaved = darkgray
|
color.bg.plugin.myprogramchangesdisplay.markers.changes.unsaved = color.palette.darkgray
|
||||||
color.bg.plugin.myprogramchangesdisplay.markers.changes.conflicting = color.fg.error
|
color.bg.plugin.myprogramchangesdisplay.markers.changes.conflicting = color.fg.error
|
||||||
color.bg.plugin.myprogramchangesdisplay.markers.changes.latest.version = blue
|
color.bg.plugin.myprogramchangesdisplay.markers.changes.latest.version = color.palette.blue
|
||||||
color.bg.plugin.myprogramchangesdisplay.markers.changes.not.checked.in = green
|
color.bg.plugin.myprogramchangesdisplay.markers.changes.not.checked.in = color.palette.green
|
||||||
|
|
||||||
color.bg.plugin.overview.defalt = gray
|
color.bg.plugin.overview.defalt = color.palette.gray
|
||||||
|
|
||||||
color.bg.plugin.overview.address.data = rgb(128, 255, 128)
|
color.bg.plugin.overview.address.data = color.palette.palegreen
|
||||||
color.bg.plugin.overview.address.function = rgb(204, 150, 255)
|
color.bg.plugin.overview.address.function = color.palette.lightpurple
|
||||||
color.bg.plugin.overview.address.external.ref = rgb(255, 150, 150)
|
color.bg.plugin.overview.address.external.ref = color.palette.lightcoral
|
||||||
color.bg.plugin.overview.address.instruction = rgb(192, 192, 255)
|
color.bg.plugin.overview.address.instruction = color.palette.lightcornflowerblue
|
||||||
color.bg.plugin.overview.address.undefined = rgb(255, 51, 102)
|
color.bg.plugin.overview.address.undefined = color.palette.red
|
||||||
color.bg.plugin.overview.address.uninitialized = black
|
color.bg.plugin.overview.address.uninitialized = color.palette.black
|
||||||
|
|
||||||
color.bg.plugin.overview.entropy.knot.1 = red
|
color.bg.plugin.overview.entropy.knot.1 = color.palette.red
|
||||||
color.bg.plugin.overview.entropy.knot.2 = blue
|
color.bg.plugin.overview.entropy.knot.2 = color.palette.blue
|
||||||
color.bg.plugin.overview.entropy.knot.3 = green
|
color.bg.plugin.overview.entropy.knot.3 = color.palette.green
|
||||||
color.bg.plugin.overview.entropy.knot.4 = yellow
|
color.bg.plugin.overview.entropy.knot.4 = color.palette.yellow
|
||||||
color.bg.plugin.overview.entropy.knot.5 = blue
|
color.bg.plugin.overview.entropy.knot.5 = color.palette.blue
|
||||||
color.bg.plugin.overview.entropy.uninitialized = blue
|
color.bg.plugin.overview.entropy.uninitialized = color.palette.blue
|
||||||
color.bg.plugin.overview.entropy.palette.base.low = black
|
color.bg.plugin.overview.entropy.palette.base.low = color.palette.black
|
||||||
color.bg.plugin.overview.entropy.palette.base.high = white
|
color.bg.plugin.overview.entropy.palette.base.high = color.palette.white
|
||||||
|
|
||||||
|
|
||||||
color.bg.plugin.references.table.active.operand = rgb(205, 205, 205)
|
color.bg.plugin.references.table.active.operand = color.palette.lightgray
|
||||||
|
|
||||||
color.bg.plugin.register.marker = rgb(0, 153, 153)
|
color.bg.plugin.register.marker = color.palette.darkcyan
|
||||||
|
|
||||||
color.bg.plugin.windowlocation = black
|
color.bg.plugin.windowlocation = color.palette.black
|
||||||
color.bg.plugin.windowlocation.bounds.virtual = red
|
color.bg.plugin.windowlocation.bounds.virtual = color.palette.red
|
||||||
color.bg.plugin.windowlocation.bounds.visible = green
|
color.bg.plugin.windowlocation.bounds.visible = color.palette.green
|
||||||
color.bg.plugin.windowlocation.screens = orange
|
color.bg.plugin.windowlocation.screens = color.palette.orange
|
||||||
color.bg.plugin.windowlocation.window.selected = rgba(0, 255, 0, 200)
|
color.bg.plugin.windowlocation.window.selected = color.palette.lime
|
||||||
color.fg.plugin.windowlocation.window.text = gray
|
color.fg.plugin.windowlocation.window.text = color.palette.gray
|
||||||
|
|
||||||
font.print = SansSerif-PLAIN-10
|
font.print = SansSerif-PLAIN-10
|
||||||
font.plugin.console = font.monospaced
|
font.plugin.console = font.monospaced
|
||||||
|
@ -170,43 +167,14 @@ font.plugin.tips.label = font.plugin.tips[BOLD]
|
||||||
|
|
||||||
[Dark Defaults]
|
[Dark Defaults]
|
||||||
|
|
||||||
color.bg.undefined = #5C4D68
|
// custom; if changed, check: decompiler
|
||||||
|
color.bg.undefined = #3A2A48
|
||||||
|
|
||||||
color.flowtype.fall.through = rgb(164, 66, 66)
|
// non-palette colors; these are currently ugly, but bright enough for easy scanning
|
||||||
color.flowtype.jump.conditional = rgb(95, 129, 157)
|
color.bg.listing.highlighter.default = yellow
|
||||||
color.flowtype.jump.unconditional = rgb(140, 148, 64)
|
color.bg.listing.highlighter.scoped.read = darkorange
|
||||||
|
color.bg.listing.highlighter.scoped.write = lime
|
||||||
|
|
||||||
color.fg.table.bundle.disabled = lightGray
|
color.fg.analysis.options.prototype.selected = color.palette.crimson
|
||||||
color.fg.table.bundle.busy = gray
|
|
||||||
color.fg.table.bundle.inactive = lightGray
|
|
||||||
color.fg.table.bundle.active = limeGreen
|
|
||||||
|
|
||||||
|
|
||||||
color.fg.table.ghidratable.equate.bad = indianRed
|
|
||||||
color.fg.table.ghidratable.equate = royalBlue
|
|
||||||
color.fg.table.ghidratable.suggestion = darkGray
|
|
||||||
|
|
||||||
color.bg.search.highlight = rgb(189,183,107)
|
|
||||||
color.bg.search.current.line.highlight = gold
|
|
||||||
|
|
||||||
color.bg.listing.highlighter.default = #ffff00 // blinding yellow
|
|
||||||
color.bg.listing.highlighter.scoped.read = #ff8000 // blinding orange
|
|
||||||
color.bg.listing.highlighter.scoped.write = #00ff00 // blinding green
|
|
||||||
|
|
||||||
|
|
||||||
color.bg.analysis.options.not.default.enablement = #707063
|
|
||||||
color.bg.analysis.options.not.default.enablement.selected = #536C85
|
|
||||||
color.fg.analysis.options.prototype = lightcoral
|
|
||||||
color.fg.analysis.options.prototype.selected = #FFDDDD
|
|
||||||
|
|
||||||
color.bg.plugin.datamgr.edge.default = deepskyblue
|
|
||||||
color.bg.plugin.datamgr.edge.composite = plum
|
|
||||||
color.bg.plugin.datamgr.edge.reference = deepskyblue
|
|
||||||
|
|
||||||
color.bg.plugin.editors.compositeeditor.byte.header = [color]system.color.bg.view
|
|
||||||
|
|
||||||
color.fg.plugin.equate.enum = deepskyblue
|
|
||||||
|
|
||||||
color.bg.plugin.references.table.active.operand = #5A5E60
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -263,8 +263,8 @@ public class AutoAnalysisPlugin extends Plugin implements AutoAnalysisManagerLis
|
||||||
|
|
||||||
private void programActivated(Program program) {
|
private void programActivated(Program program) {
|
||||||
program.getOptions(StoredAnalyzerTimes.OPTIONS_LIST)
|
program.getOptions(StoredAnalyzerTimes.OPTIONS_LIST)
|
||||||
.registerOption(StoredAnalyzerTimes.OPTION_NAME, OptionType.CUSTOM_TYPE, null, null,
|
.registerOption(StoredAnalyzerTimes.OPTION_NAME, OptionType.CUSTOM_TYPE, null, null,
|
||||||
"Cumulative analysis task times", new StoredAnalyzerTimesPropertyEditor());
|
"Cumulative analysis task times", new StoredAnalyzerTimesPropertyEditor());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -282,6 +282,7 @@ public class AutoAnalysisPlugin extends Plugin implements AutoAnalysisManagerLis
|
||||||
tool.clearStatusInfo();
|
tool.clearStatusInfo();
|
||||||
Options options = tool.getOptions(GhidraOptions.CATEGORY_AUTO_ANALYSIS);
|
Options options = tool.getOptions(GhidraOptions.CATEGORY_AUTO_ANALYSIS);
|
||||||
boolean showDialog = options.getBoolean(SHOW_ANALYSIS_OPTIONS, true);
|
boolean showDialog = options.getBoolean(SHOW_ANALYSIS_OPTIONS, true);
|
||||||
|
|
||||||
if (!showDialog) {
|
if (!showDialog) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -653,6 +653,11 @@ public class BitFieldPlacementComponent extends JPanel implements Scrollable {
|
||||||
y += CELL_HEIGHT + BYTE_SEPARATOR_THICKNESS;
|
y += CELL_HEIGHT + BYTE_SEPARATOR_THICKNESS;
|
||||||
g.fillRect(0, y, width, BYTE_SEPARATOR_THICKNESS); // bottom line
|
g.fillRect(0, y, width, BYTE_SEPARATOR_THICKNESS); // bottom line
|
||||||
|
|
||||||
|
if (g instanceof Graphics2D g2d) {
|
||||||
|
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
|
||||||
|
RenderingHints.VALUE_ANTIALIAS_ON);
|
||||||
|
}
|
||||||
|
|
||||||
paintByteHeader(g, BYTE_SEPARATOR_THICKNESS, allocationByteOffset);
|
paintByteHeader(g, BYTE_SEPARATOR_THICKNESS, allocationByteOffset);
|
||||||
paintBits((Graphics2D) g, (2 * BYTE_SEPARATOR_THICKNESS) + CELL_HEIGHT);
|
paintBits((Graphics2D) g, (2 * BYTE_SEPARATOR_THICKNESS) + CELL_HEIGHT);
|
||||||
}
|
}
|
||||||
|
|
|
@ -336,8 +336,7 @@ public class DataTypeArchiveGTree extends GTree {
|
||||||
isSelected ? getBackgroundSelectionColor() : getBackgroundNonSelectionColor());
|
isSelected ? getBackgroundSelectionColor() : getBackgroundNonSelectionColor());
|
||||||
}
|
}
|
||||||
|
|
||||||
MultiIcon multiIcon = new MultiIcon(
|
MultiIcon multiIcon = new MultiIcon(new DtBackgroundIcon());
|
||||||
new BackgroundIcon(ICON_WIDTH, ICON_HEIGHT, false));
|
|
||||||
Icon icon = getIcon();
|
Icon icon = getIcon();
|
||||||
multiIcon.addIcon(new CenterVerticalIcon(icon, ICON_HEIGHT));
|
multiIcon.addIcon(new CenterVerticalIcon(icon, ICON_HEIGHT));
|
||||||
|
|
||||||
|
|
|
@ -115,7 +115,7 @@ public class DomainFileArchiveNode extends ArchiveNode {
|
||||||
public Icon getIcon(boolean expanded) {
|
public Icon getIcon(boolean expanded) {
|
||||||
|
|
||||||
Icon baseIcon = archive.getIcon(expanded);
|
Icon baseIcon = archive.getIcon(expanded);
|
||||||
BackgroundIcon bgIcon = new BackgroundIcon(24, 16, isVersioned);
|
DtBackgroundIcon bgIcon = new DtBackgroundIcon(isVersioned);
|
||||||
MultiIcon multiIcon = new MultiIcon(bgIcon);
|
MultiIcon multiIcon = new MultiIcon(bgIcon);
|
||||||
multiIcon.addIcon(baseIcon);
|
multiIcon.addIcon(baseIcon);
|
||||||
|
|
||||||
|
|
|
@ -22,21 +22,27 @@ import javax.swing.Icon;
|
||||||
import generic.theme.GColor;
|
import generic.theme.GColor;
|
||||||
import generic.theme.GThemeDefaults.Colors.Palette;
|
import generic.theme.GThemeDefaults.Colors.Palette;
|
||||||
|
|
||||||
class BackgroundIcon implements Icon {
|
/**
|
||||||
|
* An icon used by the data types tree to uniformly space all icons. Clients of versioned objects
|
||||||
|
* can signal that this icon can paint a custom background.
|
||||||
|
*/
|
||||||
|
public class DtBackgroundIcon implements Icon {
|
||||||
|
|
||||||
private static Color VERSION_ICON_COLOR_LINE = new GColor("color.bg.tree.renderer.icon.line");
|
private static Color VERSION_ICON_COLOR = new GColor("color.bg.icon.versioned");
|
||||||
private static Color VERSION_ICON_COLOR_LIGHT = new GColor("color.bg.tree.renderer.icon.fill");
|
|
||||||
|
|
||||||
private static Color ALPHA = Palette.NO_COLOR;
|
private static Color ALPHA = Palette.NO_COLOR;
|
||||||
|
|
||||||
private int width;
|
private Color bgColor = Palette.NO_COLOR;
|
||||||
private int height;
|
|
||||||
private boolean isVersioned;
|
|
||||||
|
|
||||||
BackgroundIcon(int width, int height, boolean isVersioned) {
|
private int width = 24;
|
||||||
this.width = width;
|
private int height = 16;
|
||||||
this.height = height;
|
|
||||||
this.isVersioned = isVersioned;
|
DtBackgroundIcon() {
|
||||||
|
this(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
DtBackgroundIcon(boolean isVersioned) {
|
||||||
|
this.bgColor = isVersioned ? VERSION_ICON_COLOR : ALPHA;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -51,18 +57,11 @@ class BackgroundIcon implements Icon {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void paintIcon(Component c, Graphics g, int x, int y) {
|
public void paintIcon(Component c, Graphics g, int x, int y) {
|
||||||
if (isVersioned) {
|
g.setColor(bgColor);
|
||||||
g.setColor(VERSION_ICON_COLOR_LIGHT);
|
g.fillRect(x + 1, y + 1, width - 2, height - 2);
|
||||||
g.fillRect(x + 1, y + 1, width - 2, height - 2);
|
g.drawLine(x + 1, y, x + width - 2, y);
|
||||||
g.setColor(VERSION_ICON_COLOR_LINE);
|
g.drawLine(x + width - 1, y + 1, x + width - 1, y + height - 2);
|
||||||
g.drawLine(x + 1, y, x + width - 2, y);
|
g.drawLine(x + 1, y + height - 1, x + width - 2, y + height - 1);
|
||||||
g.drawLine(x + width - 1, y + 1, x + width - 1, y + height - 2);
|
g.drawLine(x, y + 1, x, y + height - 2);
|
||||||
g.drawLine(x + 1, y + height - 1, x + width - 2, y + height - 1);
|
|
||||||
g.drawLine(x, y + 1, x, y + height - 2);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
g.setColor(ALPHA);
|
|
||||||
g.fillRect(x, y, width, height);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -38,7 +38,7 @@ public class FileArchiveNode extends ArchiveNode {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Icon getIcon(boolean expanded) {
|
public Icon getIcon(boolean expanded) {
|
||||||
BackgroundIcon bgIcon = new BackgroundIcon(24, 16, false);
|
DtBackgroundIcon bgIcon = new DtBackgroundIcon();
|
||||||
MultiIcon multiIcon = new MultiIcon(bgIcon);
|
MultiIcon multiIcon = new MultiIcon(bgIcon);
|
||||||
boolean hasWriteLock = fileArchive.hasWriteLock();
|
boolean hasWriteLock = fileArchive.hasWriteLock();
|
||||||
Icon baseIcon = fileArchive.getIcon(expanded);
|
Icon baseIcon = fileArchive.getIcon(expanded);
|
||||||
|
|
|
@ -43,7 +43,7 @@ import util.CollectionUtils;
|
||||||
|
|
||||||
class EquateTableModel extends GDynamicColumnTableModel<Equate, Object> {
|
class EquateTableModel extends GDynamicColumnTableModel<Equate, Object> {
|
||||||
|
|
||||||
private static final Color FG_ENUM_BASED = new GColor("color.fg.plugin.equate.enum");
|
private static final Color FG_USER_DEFINED = new GColor("color.fg.plugin.equate.user.defined");
|
||||||
|
|
||||||
private EquateTablePlugin plugin;
|
private EquateTablePlugin plugin;
|
||||||
private List<Equate> equateList = new ArrayList<>();
|
private List<Equate> equateList = new ArrayList<>();
|
||||||
|
@ -161,7 +161,7 @@ class EquateTableModel extends GDynamicColumnTableModel<Equate, Object> {
|
||||||
}
|
}
|
||||||
else if (!eq.isEnumBased()) { // User label
|
else if (!eq.isEnumBased()) { // User label
|
||||||
label.setForeground(
|
label.setForeground(
|
||||||
(isSelected) ? table.getSelectionForeground() : FG_ENUM_BASED);
|
(isSelected) ? table.getSelectionForeground() : FG_USER_DEFINED);
|
||||||
}
|
}
|
||||||
|
|
||||||
String tooltip = getEquateToolTip(eq);
|
String tooltip = getEquateToolTip(eq);
|
||||||
|
|
|
@ -24,8 +24,8 @@ import javax.swing.JToolTip;
|
||||||
|
|
||||||
import docking.widgets.fieldpanel.field.Field;
|
import docking.widgets.fieldpanel.field.Field;
|
||||||
import docking.widgets.fieldpanel.support.FieldLocation;
|
import docking.widgets.fieldpanel.support.FieldLocation;
|
||||||
import generic.theme.GColor;
|
|
||||||
import generic.theme.GThemeDefaults.Colors;
|
import generic.theme.GThemeDefaults.Colors;
|
||||||
|
import generic.theme.GThemeDefaults.Colors.Messages;
|
||||||
import ghidra.app.plugin.core.gotoquery.GoToHelper;
|
import ghidra.app.plugin.core.gotoquery.GoToHelper;
|
||||||
import ghidra.app.services.CodeFormatService;
|
import ghidra.app.services.CodeFormatService;
|
||||||
import ghidra.app.util.*;
|
import ghidra.app.util.*;
|
||||||
|
@ -47,7 +47,7 @@ public abstract class AbstractReferenceHover extends AbstractConfigurableHover {
|
||||||
|
|
||||||
private static final int WINDOW_OFFSET = 50;
|
private static final int WINDOW_OFFSET = 50;
|
||||||
private static final Color BACKGROUND_COLOR = Colors.BG_TOOLTIP;
|
private static final Color BACKGROUND_COLOR = Colors.BG_TOOLTIP;
|
||||||
private static final Color FG_COLOR_NOT_IN_MEMORY = new GColor("color.fg.hint");
|
private static final Color FG_COLOR_NOT_IN_MEMORY = Messages.HINT;
|
||||||
|
|
||||||
private CodeFormatService codeFormatService;
|
private CodeFormatService codeFormatService;
|
||||||
private ListingPanel panel;
|
private ListingPanel panel;
|
||||||
|
|
|
@ -30,6 +30,7 @@ import org.osgi.framework.Bundle;
|
||||||
import docking.widgets.table.*;
|
import docking.widgets.table.*;
|
||||||
import generic.jar.ResourceFile;
|
import generic.jar.ResourceFile;
|
||||||
import generic.theme.GColor;
|
import generic.theme.GColor;
|
||||||
|
import generic.theme.GThemeDefaults.Colors;
|
||||||
import generic.util.Path;
|
import generic.util.Path;
|
||||||
import ghidra.docking.settings.Settings;
|
import ghidra.docking.settings.Settings;
|
||||||
import ghidra.framework.plugintool.ServiceProvider;
|
import ghidra.framework.plugintool.ServiceProvider;
|
||||||
|
@ -45,7 +46,7 @@ public class BundleStatusTableModel
|
||||||
extends GDynamicColumnTableModel<BundleStatus, List<BundleStatus>> {
|
extends GDynamicColumnTableModel<BundleStatus, List<BundleStatus>> {
|
||||||
|
|
||||||
//@formatter:off
|
//@formatter:off
|
||||||
private static final Color COLOR_BUNDLE_ERROR = new GColor("color.fg.error");
|
private static final Color COLOR_BUNDLE_ERROR = Colors.ERROR;
|
||||||
private static final Color COLOR_BUNDLE_DISABLED = new GColor("color.fg.table.bundle.disabled");
|
private static final Color COLOR_BUNDLE_DISABLED = new GColor("color.fg.table.bundle.disabled");
|
||||||
private static final Color COLOR_BUNDLE_BUSY = new GColor("color.fg.table.bundle.busy");
|
private static final Color COLOR_BUNDLE_BUSY = new GColor("color.fg.table.bundle.busy");
|
||||||
private static final Color COLOR_BUNDLE_INACTIVE = new GColor("color.fg.table.bundle.inactive");
|
private static final Color COLOR_BUNDLE_INACTIVE = new GColor("color.fg.table.bundle.inactive");
|
||||||
|
|
|
@ -115,8 +115,13 @@ class ProgramListPanel extends JPanel {
|
||||||
listModel = new DefaultListModel<>();
|
listModel = new DefaultListModel<>();
|
||||||
initListModel();
|
initListModel();
|
||||||
programList = new JList<>(listModel);
|
programList = new JList<>(listModel);
|
||||||
programList.setBackground(BACKGROUND_COLOR);
|
|
||||||
programList.setForeground(FOREGROUND_COLOR);
|
// Some LaFs use different selection colors depending on whether the list has focus. This
|
||||||
|
// list does not get focus, so the selection color does not look correct when interacting
|
||||||
|
// with the list. Setting the color here updates the list to always use the focused
|
||||||
|
// selected color.
|
||||||
|
programList.setSelectionBackground(new GColor("system.color.bg.selected.view"));
|
||||||
|
|
||||||
programList.setBorder(BorderFactory.createEmptyBorder(5, 0, 0, 0));
|
programList.setBorder(BorderFactory.createEmptyBorder(5, 0, 0, 0));
|
||||||
programList.addMouseMotionListener(new MouseMotionAdapter() {
|
programList.addMouseMotionListener(new MouseMotionAdapter() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -259,5 +264,6 @@ class ProgramListPanel extends JPanel {
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
package ghidra.app.plugin.core.programtree;
|
package ghidra.app.plugin.core.programtree;
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.image.BufferedImage;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
import javax.swing.Icon;
|
import javax.swing.Icon;
|
||||||
|
@ -26,7 +25,6 @@ import javax.swing.tree.DefaultTreeCellRenderer;
|
||||||
import docking.widgets.GComponent;
|
import docking.widgets.GComponent;
|
||||||
import generic.theme.GColor;
|
import generic.theme.GColor;
|
||||||
import generic.theme.GIcon;
|
import generic.theme.GIcon;
|
||||||
import generic.theme.GThemeDefaults.Colors;
|
|
||||||
import ghidra.program.model.listing.Group;
|
import ghidra.program.model.listing.Group;
|
||||||
import resources.ResourceManager;
|
import resources.ResourceManager;
|
||||||
|
|
||||||
|
@ -331,7 +329,7 @@ class DnDTreeCellRenderer extends DefaultTreeCellRenderer {
|
||||||
for (int i = 0; i < iconIds.length; i++) {
|
for (int i = 0; i < iconIds.length; i++) {
|
||||||
GIcon icon = new GIcon(iconIds[i]);
|
GIcon icon = new GIcon(iconIds[i]);
|
||||||
iconMap.put(iconIds[i], icon);
|
iconMap.put(iconIds[i], icon);
|
||||||
Icon disabledIcon = getDisabledIcon(iconIds[i], icon);
|
Icon disabledIcon = ResourceManager.getDisabledIcon(icon);
|
||||||
iconMap.put(disabledNames[i], disabledIcon);
|
iconMap.put(disabledNames[i], disabledIcon);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -344,15 +342,4 @@ class DnDTreeCellRenderer extends DefaultTreeCellRenderer {
|
||||||
}
|
}
|
||||||
return dim;
|
return dim;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Icon getDisabledIcon(String imageName, GIcon icon) {
|
|
||||||
Image cutImage = icon.getImageIcon().getImage();
|
|
||||||
BufferedImage bufferedImage = new BufferedImage(cutImage.getWidth(null),
|
|
||||||
cutImage.getHeight(null), BufferedImage.TYPE_INT_ARGB);
|
|
||||||
Graphics2D g2d = bufferedImage.createGraphics();
|
|
||||||
g2d.drawImage(cutImage, 0, 0, null);
|
|
||||||
g2d.setColor(Colors.DISABLED);
|
|
||||||
g2d.fillRect(0, 0, bufferedImage.getWidth(), bufferedImage.getHeight());
|
|
||||||
return ResourceManager.getImageIconFromImage(imageName, bufferedImage);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,8 +39,7 @@ import generic.theme.GThemeDefaults.Colors;
|
||||||
*/
|
*/
|
||||||
public abstract class DragNDropTree extends JTree implements Draggable, Droppable, Autoscroll {
|
public abstract class DragNDropTree extends JTree implements Draggable, Droppable, Autoscroll {
|
||||||
|
|
||||||
private static final Color BG_COLOR_DRAG_NO_SELECTION =
|
private static final Color BG_COLOR_DRAG_NO_SELECTION = new GColor("color.bg.tree.drag");
|
||||||
new GColor("color.bg.tree.drag.no.selection");
|
|
||||||
|
|
||||||
private AutoscrollAdapter autoscroller;
|
private AutoscrollAdapter autoscroller;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
/* ###
|
/* ###
|
||||||
* IP: GHIDRA
|
* IP: GHIDRA
|
||||||
* REVIEWED: YES
|
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -25,23 +24,21 @@ import ghidra.util.task.Task;
|
||||||
import ghidra.util.task.TaskMonitor;
|
import ghidra.util.task.TaskMonitor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Task to do a single search..
|
* Task to do a single search.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
class SearchTask extends Task {
|
class SearchTask extends Task {
|
||||||
|
|
||||||
private Searcher textSearcher;
|
private Searcher textSearcher;
|
||||||
private Navigatable navigatable;
|
private Navigatable navigatable;
|
||||||
private ProgramLocation loc = null;
|
private ProgramLocation loc;
|
||||||
private boolean isCanceled;
|
private boolean isCanceled;
|
||||||
private TaskMonitor taskMonitor;
|
|
||||||
private Program program;
|
private Program program;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor for SearchTask.
|
* Constructor for SearchTask.
|
||||||
|
* @param navigatable the navigatable
|
||||||
|
* @param program the program
|
||||||
* @param textSearcher existing search to use
|
* @param textSearcher existing search to use
|
||||||
* @param listener listener that will be called when the search
|
|
||||||
* completes
|
|
||||||
*/
|
*/
|
||||||
SearchTask(Navigatable navigatable, Program program, Searcher textSearcher) {
|
SearchTask(Navigatable navigatable, Program program, Searcher textSearcher) {
|
||||||
super("Searching Program Text", true, true, false);
|
super("Searching Program Text", true, true, false);
|
||||||
|
@ -50,21 +47,19 @@ class SearchTask extends Task {
|
||||||
this.program = program;
|
this.program = program;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @see ghidra.util.task.Task#run(TaskMonitor)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void run(TaskMonitor monitor) {
|
public void run(TaskMonitor monitor) {
|
||||||
|
|
||||||
|
monitor.setMessage("Searching...");
|
||||||
|
if (isCanceled) {
|
||||||
|
monitor.cancel();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
monitor.setMessage("Searching...");
|
||||||
|
textSearcher.setMonitor(monitor);
|
||||||
try {
|
try {
|
||||||
monitor.setMessage("Searching...");
|
loc = textSearcher.search();
|
||||||
textSearcher.setMonitor(monitor);
|
|
||||||
this.taskMonitor = monitor;
|
|
||||||
if (isCanceled) {
|
|
||||||
monitor.cancel();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
loc = textSearcher.search();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
if (!(e instanceof DomainObjectException)) {
|
if (!(e instanceof DomainObjectException)) {
|
||||||
|
@ -73,16 +68,10 @@ class SearchTask extends Task {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the text searcher that this task used.
|
|
||||||
*/
|
|
||||||
Searcher getTextSearcher() {
|
Searcher getTextSearcher() {
|
||||||
return textSearcher;
|
return textSearcher;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the program for this search task.
|
|
||||||
*/
|
|
||||||
Navigatable getNavigatable() {
|
Navigatable getNavigatable() {
|
||||||
return navigatable;
|
return navigatable;
|
||||||
}
|
}
|
||||||
|
@ -95,6 +84,7 @@ class SearchTask extends Task {
|
||||||
* Called when program is deactivated but the task hasn't started to
|
* Called when program is deactivated but the task hasn't started to
|
||||||
* run yet. Cancel it when it does run.
|
* run yet. Cancel it when it does run.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void cancel() {
|
public void cancel() {
|
||||||
super.cancel();
|
super.cancel();
|
||||||
isCanceled = true;
|
isCanceled = true;
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
/* ###
|
/* ###
|
||||||
* IP: GHIDRA
|
* IP: GHIDRA
|
||||||
* REVIEWED: YES
|
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -20,27 +19,25 @@ import ghidra.program.util.ProgramLocation;
|
||||||
import ghidra.util.task.TaskMonitor;
|
import ghidra.util.task.TaskMonitor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Search the program text.
|
* Search the program text
|
||||||
*
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public interface Searcher {
|
public interface Searcher {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the next program location.
|
* Get the next program location.
|
||||||
* @return null if there is no next program location.
|
* @return null if there is no next program location.
|
||||||
*/
|
*/
|
||||||
public ProgramLocation search();
|
public ProgramLocation search();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the task monitor.
|
* Set the task monitor.
|
||||||
* @param monitor monitor that allows the search to be canceled
|
* @param monitor monitor that allows the search to be canceled
|
||||||
*/
|
*/
|
||||||
public void setMonitor(TaskMonitor monitor);
|
public void setMonitor(TaskMonitor monitor);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the search options associated with this Searcher.
|
* Return the search options associated with this Searcher.
|
||||||
*/
|
* @return the search option
|
||||||
public SearchOptions getSearchOptions();
|
*/
|
||||||
|
public SearchOptions getSearchOptions();
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,6 +35,7 @@ import docking.widgets.filter.FilterListener;
|
||||||
import docking.widgets.label.GDLabel;
|
import docking.widgets.label.GDLabel;
|
||||||
import docking.widgets.label.GLabel;
|
import docking.widgets.label.GLabel;
|
||||||
import docking.widgets.table.GTableCellRenderingData;
|
import docking.widgets.table.GTableCellRenderingData;
|
||||||
|
import generic.theme.GColor;
|
||||||
import ghidra.app.context.ListingActionContext;
|
import ghidra.app.context.ListingActionContext;
|
||||||
/**
|
/**
|
||||||
* Dialog for Equate Plugin.
|
* Dialog for Equate Plugin.
|
||||||
|
@ -65,6 +66,13 @@ import ghidra.util.table.*;
|
||||||
import utility.function.Callback;
|
import utility.function.Callback;
|
||||||
|
|
||||||
public class SetEquateDialog extends DialogComponentProvider {
|
public class SetEquateDialog extends DialogComponentProvider {
|
||||||
|
|
||||||
|
private Color FG_EQUATE_SELECED_COLOR =
|
||||||
|
new GColor("color.fg.dialog.equates.equate.selected");
|
||||||
|
private Color FG_BAD_EQUATE_COLOR = new GColor("color.fg.dialog.equates.equate.bad");
|
||||||
|
private Color FG_EQUATE_COLOR = new GColor("color.fg.dialog.equates.equate");
|
||||||
|
private Color FG_SUGGESTION_COLOR = new GColor("color.fg.dialog.equates.suggestion");
|
||||||
|
|
||||||
public static final int CANCELED = 0;
|
public static final int CANCELED = 0;
|
||||||
public static final int OK = 1;
|
public static final int OK = 1;
|
||||||
|
|
||||||
|
@ -153,18 +161,18 @@ public class SetEquateDialog extends DialogComponentProvider {
|
||||||
if (refCount > 0) {
|
if (refCount > 0) {
|
||||||
if (eqRowObject.getEntryName().contains(EquateManager.ERROR_TAG)) {
|
if (eqRowObject.getEntryName().contains(EquateManager.ERROR_TAG)) {
|
||||||
c.setForeground(
|
c.setForeground(
|
||||||
isSelected ? this.SELECTED_CELL_COLOR : this.BAD_EQUATE_COLOR);
|
isSelected ? FG_EQUATE_SELECED_COLOR : FG_BAD_EQUATE_COLOR);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Equate e = eqRowObject.getEquate();
|
Equate e = eqRowObject.getEquate();
|
||||||
if (e != null && !e.isEnumBased()) {
|
if (e != null && !e.isEnumBased()) {
|
||||||
c.setForeground(
|
c.setForeground(
|
||||||
isSelected ? this.SELECTED_CELL_COLOR : this.EQUATE_COLOR);
|
isSelected ? FG_EQUATE_SELECED_COLOR : FG_EQUATE_COLOR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
c.setForeground(isSelected ? this.SELECTED_CELL_COLOR : this.SUGGESTION_COLOR);
|
c.setForeground(isSelected ? FG_EQUATE_SELECED_COLOR : FG_SUGGESTION_COLOR);
|
||||||
}
|
}
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,8 @@
|
||||||
*/
|
*/
|
||||||
package ghidra.app.util.viewer.format;
|
package ghidra.app.util.viewer.format;
|
||||||
|
|
||||||
|
import java.awt.Color;
|
||||||
|
|
||||||
import docking.widgets.fieldpanel.field.*;
|
import docking.widgets.fieldpanel.field.*;
|
||||||
import docking.widgets.fieldpanel.support.*;
|
import docking.widgets.fieldpanel.support.*;
|
||||||
import generic.theme.GColor;
|
import generic.theme.GColor;
|
||||||
|
@ -25,11 +27,13 @@ import ghidra.app.util.viewer.proxy.ProxyObj;
|
||||||
|
|
||||||
public class ErrorListingField extends ListingTextField {
|
public class ErrorListingField extends ListingTextField {
|
||||||
|
|
||||||
|
private static Color BG_ERROR_COLOR = new GColor("color.bg.listing.error");
|
||||||
|
|
||||||
private Throwable t;
|
private Throwable t;
|
||||||
|
|
||||||
private static HighlightProvider myProvider =
|
private static HighlightProvider myProvider =
|
||||||
(text, obj, fieldFactoryClass, cursorTextOffset) -> new Highlight[] {
|
(text, obj, fieldFactoryClass, cursorTextOffset) -> new Highlight[] {
|
||||||
new Highlight(0, text.length() - 1, new GColor("color.bg.error")) };
|
new Highlight(0, text.length() - 1, BG_ERROR_COLOR) };
|
||||||
|
|
||||||
public ErrorListingField(FieldFactory ff, ProxyObj<?> proxy, int varWidth, Throwable t) {
|
public ErrorListingField(FieldFactory ff, ProxyObj<?> proxy, int varWidth, Throwable t) {
|
||||||
super(ff, proxy, createField(ff, proxy, varWidth, t));
|
super(ff, proxy, createField(ff, proxy, varWidth, t));
|
||||||
|
|
|
@ -37,7 +37,6 @@ import docking.widgets.indexedscrollpane.IndexedScrollPane;
|
||||||
import docking.widgets.label.GDLabel;
|
import docking.widgets.label.GDLabel;
|
||||||
import generic.theme.GThemeDefaults.Colors;
|
import generic.theme.GThemeDefaults.Colors;
|
||||||
import generic.theme.GThemeDefaults.Colors.Palette;
|
import generic.theme.GThemeDefaults.Colors.Palette;
|
||||||
import generic.theme.GThemeDefaults.Colors.Tables;
|
|
||||||
import ghidra.GhidraOptions;
|
import ghidra.GhidraOptions;
|
||||||
import ghidra.app.util.viewer.field.ListingColors;
|
import ghidra.app.util.viewer.field.ListingColors;
|
||||||
import ghidra.app.util.viewer.field.ListingColors.*;
|
import ghidra.app.util.viewer.field.ListingColors.*;
|
||||||
|
@ -341,7 +340,7 @@ public class OptionsGui extends JPanel {
|
||||||
//Displays the font field with the actual fonts for easier selection
|
//Displays the font field with the actual fonts for easier selection
|
||||||
class FontRenderer extends GDLabel implements ListCellRenderer<String> {
|
class FontRenderer extends GDLabel implements ListCellRenderer<String> {
|
||||||
|
|
||||||
private final Color SELECTED_COLOR = Palette.getColor("darkslategray");
|
private final Color SELECTED_BG_COLOR = Palette.getColor("darkslategray");
|
||||||
|
|
||||||
public FontRenderer() {
|
public FontRenderer() {
|
||||||
setOpaque(true);
|
setOpaque(true);
|
||||||
|
@ -354,8 +353,8 @@ public class OptionsGui extends JPanel {
|
||||||
Font origFont = fontNameField.getFont();
|
Font origFont = fontNameField.getFont();
|
||||||
setFont(new Font(value.toString(), origFont.getStyle(), origFont.getSize()));
|
setFont(new Font(value.toString(), origFont.getStyle(), origFont.getSize()));
|
||||||
|
|
||||||
setBackground(isSelected ? SELECTED_COLOR : Colors.BACKGROUND);
|
setBackground(isSelected ? SELECTED_BG_COLOR : Colors.BACKGROUND);
|
||||||
setForeground(isSelected ? Tables.FG_SELECTED : Tables.FG_UNSELECTED);
|
setForeground(isSelected ? list.getSelectionForeground() : list.getForeground());
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,11 +45,11 @@ public class ProgramDiffDetails {
|
||||||
private static final String STANDARD_NEW_LINE = "\n";
|
private static final String STANDARD_NEW_LINE = "\n";
|
||||||
|
|
||||||
//@formatter:off
|
//@formatter:off
|
||||||
private static Color FG_COLOR_ADDRESS = new GColor("color.bg.plugin.programdiff.details.address");
|
private static Color FG_COLOR_ADDRESS = new GColor("color.fg.plugin.programdiff.details.address");
|
||||||
private static Color FG_COLOR_COMMENT = new GColor("color.bg.plugin.programdiff.details.comment");
|
private static Color FG_COLOR_COMMENT = new GColor("color.fg.plugin.programdiff.details.comment");
|
||||||
private static Color FG_COLOR_DANGER = new GColor("color.bg.plugin.programdiff.details.danger");
|
private static Color FG_COLOR_DANGER = new GColor("color.fg.plugin.programdiff.details.danger");
|
||||||
private static Color FG_COLOR_EMPHASIZE = new GColor("color.bg.plugin.programdiff.details.emphasize");
|
private static Color FG_COLOR_EMPHASIZE = new GColor("color.fg.plugin.programdiff.details.emphasize");
|
||||||
private static Color FG_COLOR_PROGRAM = new GColor("color.bg.plugin.programdiff.details.emphasize");
|
private static Color FG_COLOR_PROGRAM = new GColor("color.fg.plugin.programdiff.details.program");
|
||||||
//@formatter:on
|
//@formatter:on
|
||||||
|
|
||||||
private static final Color EMPHASIZE_COLOR = FG_COLOR_EMPHASIZE;
|
private static final Color EMPHASIZE_COLOR = FG_COLOR_EMPHASIZE;
|
||||||
|
|
|
@ -15,14 +15,12 @@
|
||||||
*/
|
*/
|
||||||
package ghidra.util.table;
|
package ghidra.util.table;
|
||||||
|
|
||||||
import java.awt.Color;
|
|
||||||
import java.awt.Font;
|
import java.awt.Font;
|
||||||
|
|
||||||
import javax.swing.JTable;
|
import javax.swing.JTable;
|
||||||
import javax.swing.table.TableModel;
|
import javax.swing.table.TableModel;
|
||||||
|
|
||||||
import docking.widgets.table.GTableCellRenderer;
|
import docking.widgets.table.GTableCellRenderer;
|
||||||
import generic.theme.GColor;
|
|
||||||
import ghidra.app.util.viewer.field.ListingColors;
|
import ghidra.app.util.viewer.field.ListingColors;
|
||||||
import ghidra.program.model.address.Address;
|
import ghidra.program.model.address.Address;
|
||||||
import ghidra.program.model.listing.Program;
|
import ghidra.program.model.listing.Program;
|
||||||
|
@ -32,11 +30,6 @@ import ghidra.program.model.symbol.Symbol;
|
||||||
|
|
||||||
public class GhidraTableCellRenderer extends GTableCellRenderer {
|
public class GhidraTableCellRenderer extends GTableCellRenderer {
|
||||||
|
|
||||||
public Color SELECTED_CELL_COLOR = new GColor("color.bg.table.selected.ghidratable");
|
|
||||||
public Color BAD_EQUATE_COLOR = new GColor("color.fg.table.ghidratable.equate.bad");
|
|
||||||
public Color EQUATE_COLOR = new GColor("color.fg.table.ghidratable.equate");
|
|
||||||
public Color SUGGESTION_COLOR = new GColor("color.fg.table.ghidratable.suggestion");
|
|
||||||
|
|
||||||
public GhidraTableCellRenderer() {
|
public GhidraTableCellRenderer() {
|
||||||
// default constructor
|
// default constructor
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@ import javax.swing.JLabel;
|
||||||
|
|
||||||
import docking.widgets.table.GTableCellRenderingData;
|
import docking.widgets.table.GTableCellRenderingData;
|
||||||
import generic.theme.GIcon;
|
import generic.theme.GIcon;
|
||||||
import generic.theme.GThemeDefaults.Colors;
|
import generic.theme.GThemeDefaults.Colors.Palette;
|
||||||
import ghidra.docking.settings.Settings;
|
import ghidra.docking.settings.Settings;
|
||||||
import ghidra.framework.plugintool.ServiceProvider;
|
import ghidra.framework.plugintool.ServiceProvider;
|
||||||
import ghidra.program.model.listing.Program;
|
import ghidra.program.model.listing.Program;
|
||||||
|
@ -76,7 +76,7 @@ public class MemoryTypeProgramLocationBasedTableColumn
|
||||||
|
|
||||||
private class MemoryTypeRenderer extends AbstractGhidraColumnRenderer<MemoryBlock> {
|
private class MemoryTypeRenderer extends AbstractGhidraColumnRenderer<MemoryBlock> {
|
||||||
|
|
||||||
private Color disabledColor = Colors.DISABLED;
|
private Color disabledColor = Palette.LIGHT_GRAY;
|
||||||
private GIcon offIcon = (GIcon) Icons.EMPTY_ICON;
|
private GIcon offIcon = (GIcon) Icons.EMPTY_ICON;
|
||||||
private GIcon onIcon = new GIcon("icon.check");
|
private GIcon onIcon = new GIcon("icon.check");
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
color.bg.byteviewer = color.bg
|
color.bg.byteviewer = color.bg
|
||||||
color.bg.byteviewer.highlight = yellow
|
color.bg.byteviewer.highlight = yellow
|
||||||
|
|
||||||
color.fg.byteviewer.separator = blue
|
color.fg.byteviewer.separator = color.palette.blue
|
||||||
color.fg.byteviewer.changed = red
|
color.fg.byteviewer.changed = red
|
||||||
color.cursor.byteviewer.focused.active = color.cursor.focused
|
color.cursor.byteviewer.focused.active = color.cursor.focused
|
||||||
color.cursor.byteviewer.focused.not.active = black
|
color.cursor.byteviewer.focused.not.active = black
|
||||||
|
@ -19,6 +19,5 @@ font.byteviewer.status = SansSerif-PLAIN-11
|
||||||
|
|
||||||
color.bg.byteviewer.highlight = rgb(191, 191, 64) // olive
|
color.bg.byteviewer.highlight = rgb(191, 191, 64) // olive
|
||||||
color.fg.byteviewer.changed = indianRed
|
color.fg.byteviewer.changed = indianRed
|
||||||
color.fg.byteviewer.separator = darkBlue
|
|
||||||
color.cursor.byteviewer.focused.not.active = gray
|
color.cursor.byteviewer.focused.not.active = gray
|
||||||
|
|
||||||
|
|
|
@ -225,8 +225,8 @@ public abstract class ByteViewerComponentProvider extends ComponentProviderAdapt
|
||||||
opt.registerOption(OPTION_HIGHLIGHT_CURSOR_LINE, true, help,
|
opt.registerOption(OPTION_HIGHLIGHT_CURSOR_LINE, true, help,
|
||||||
"Toggles highlighting background color of line containing the cursor");
|
"Toggles highlighting background color of line containing the cursor");
|
||||||
|
|
||||||
Color missingValueColor = opt.getColor(SEPARATOR_COLOR_OPTION_NAME, SEPARATOR_COLOR);
|
Color separatorColor = opt.getColor(SEPARATOR_COLOR_OPTION_NAME, SEPARATOR_COLOR);
|
||||||
panel.setSeparatorColor(missingValueColor);
|
panel.setSeparatorColor(separatorColor);
|
||||||
|
|
||||||
panel.setCurrentCursorColor(CURSOR_ACTIVE_COLOR);
|
panel.setCurrentCursorColor(CURSOR_ACTIVE_COLOR);
|
||||||
panel.setNonFocusCursorColor(CURSOR_NOT_FOCUSED_COLOR);
|
panel.setNonFocusCursorColor(CURSOR_NOT_FOCUSED_COLOR);
|
||||||
|
|
|
@ -3,54 +3,45 @@
|
||||||
color.bg.decompiler = color.bg
|
color.bg.decompiler = color.bg
|
||||||
color.fg.decompiler = color.fg
|
color.fg.decompiler = color.fg
|
||||||
|
|
||||||
color.fg.decompiler.keyword = #0001e6
|
color.fg.decompiler.keyword = color.palette.blue
|
||||||
color.fg.decompiler.function.name = blue
|
color.fg.decompiler.function.name = color.palette.blue
|
||||||
color.fg.decompiler.comment = blueViolet
|
color.fg.decompiler.comment = color.palette.blueviolet
|
||||||
color.fg.decompiler.error = crimson
|
color.fg.decompiler.error = color.palette.crimson
|
||||||
color.fg.decompiler.variable = #999900 // close to oliveDrab
|
color.fg.decompiler.variable = color.palette.olive
|
||||||
color.fg.decompiler.constant = forestGreen
|
color.fg.decompiler.constant = color.palette.green
|
||||||
color.fg.decompiler.type = mediumBlue
|
color.fg.decompiler.type = color.palette.blue
|
||||||
color.fg.decompiler.parameter = darkMagenta
|
color.fg.decompiler.parameter = color.palette.purple
|
||||||
color.fg.decompiler.global = darkCyan
|
color.fg.decompiler.global = color.palette.darkcyan
|
||||||
color.fg.decompiler.special = #cc0033
|
color.fg.decompiler.special = color.palette.crimson
|
||||||
|
|
||||||
color.bg.decompiler.current.variable = rgba(255,255,0,0.5)
|
color.bg.decompiler.current.variable = color.palette.highlight.transparent.yellow
|
||||||
|
|
||||||
color.bg.decompiler.highlights.default = rgba(255, 255, 0, .5)
|
color.bg.decompiler.highlights.default = color.palette.highlight.transparent.yellow
|
||||||
color.bg.decompiler.highlights.special = sandybrown
|
color.bg.decompiler.highlights.special = color.palette.crimson
|
||||||
color.bg.decompiler.highlights.search = mediumslateblue
|
color.bg.decompiler.highlights.search = color.palette.slateblue
|
||||||
|
|
||||||
color.bg.decompiler.pcode.dfg.vertex.default = red
|
color.bg.decompiler.pcode.dfg.vertex.default = color.palette.red
|
||||||
color.bg.decompiler.pcode.dfg.vertex.selected = deeppink
|
color.bg.decompiler.pcode.dfg.vertex.selected = color.palette.lightcoral
|
||||||
color.bg.decompiler.pcode.dfg.vertex.constant = darkgreen
|
color.bg.decompiler.pcode.dfg.vertex.constant = color.palette.darkgreen
|
||||||
color.bg.decompiler.pcode.dfg.vertex.register = navy
|
color.bg.decompiler.pcode.dfg.vertex.register = color.palette.navy
|
||||||
color.bg.decompiler.pcode.dfg.vertex.unique = black
|
color.bg.decompiler.pcode.dfg.vertex.unique = color.palette.black
|
||||||
color.bg.decompiler.pcode.dfg.vertex.persistent = darkorange
|
color.bg.decompiler.pcode.dfg.vertex.persistent = color.palette.darkorange
|
||||||
color.bg.decompiler.pcode.dfg.vertex.address.tied = orange
|
color.bg.decompiler.pcode.dfg.vertex.address.tied = color.palette.orange
|
||||||
color.bg.decompiler.pcode.dfg.vertex.op = red
|
color.bg.decompiler.pcode.dfg.vertex.op = color.palette.red
|
||||||
color.bg.decompiler.pcode.dfg.edge.default = navy
|
color.bg.decompiler.pcode.dfg.edge.default = color.palette.navy
|
||||||
color.bg.decompiler.pcode.dfg.edge.selected = deeppink
|
color.bg.decompiler.pcode.dfg.edge.selected = color.palette.lightcoral
|
||||||
color.bg.decompiler.pcode.dfg.edge.within.block = black
|
color.bg.decompiler.pcode.dfg.edge.within.block = color.palette.black
|
||||||
color.bg.decompiler.pcode.dfg.edge.between.blocks = red
|
color.bg.decompiler.pcode.dfg.edge.between.blocks = color.palette.red
|
||||||
font.decompiler.pcode.dfg = font.graphdisplay.default
|
|
||||||
|
|
||||||
icon.decompiler.action.provider = decompileFunction.gif
|
icon.decompiler.action.provider = decompileFunction.gif
|
||||||
icon.decompiler.action.provider.clone = icon.provider.clone
|
icon.decompiler.action.provider.clone = icon.provider.clone
|
||||||
icon.decompiler.action.export = page_edit.png
|
icon.decompiler.action.export = page_edit.png
|
||||||
|
|
||||||
font.decompiler = font.monospaced
|
font.decompiler = font.monospaced
|
||||||
|
font.decompiler.pcode.dfg = font.graphdisplay.default
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[Dark Defaults]
|
[Dark Defaults]
|
||||||
|
|
||||||
color.fg.decompiler.keyword = color.palette.cyan
|
|
||||||
color.fg.decompiler.function.name = color.palette.blue
|
|
||||||
color.fg.decompiler.comment = color.palette.indigo
|
|
||||||
color.fg.decompiler.error = color.palette.red
|
|
||||||
color.fg.decompiler.variable = color.palette.olive
|
|
||||||
color.fg.decompiler.constant = color.palette.green
|
|
||||||
color.fg.decompiler.type = color.palette.cyan
|
|
||||||
color.fg.decompiler.parameter = #ff7090
|
|
||||||
color.fg.decompiler.global = color.palette.teal
|
|
||||||
color.fg.decompiler.special = color.palette.red
|
|
||||||
|
|
||||||
color.bg.decompiler.current.variable = rgb(55, 59, 65)
|
|
||||||
|
|
|
@ -1,24 +1,23 @@
|
||||||
[Defaults]
|
[Defaults]
|
||||||
|
|
||||||
|
|
||||||
color.bg.plugin.functiongraph = color.bg
|
color.bg.plugin.functiongraph = color.bg
|
||||||
|
|
||||||
color.fg.plugin.functiongraph.label.picked = color.fg
|
color.fg.plugin.functiongraph.label.picked = color.fg
|
||||||
color.fg.plugin.functiongraph.label.non.picked = color.fg.disabled
|
color.fg.plugin.functiongraph.label.non.picked = color.fg.disabled
|
||||||
|
|
||||||
color.bg.plugin.functiongraph.vertex.group = rgb(226, 255, 155)
|
color.bg.plugin.functiongraph.vertex.group = color.palette.greenyellow
|
||||||
color.bg.plugin.functiongraph.vertex.entry = color.palette.lightgreen
|
color.bg.plugin.functiongraph.vertex.entry = color.palette.lightgreen
|
||||||
color.bg.plugin.functiongraph.vertex.exit = color.palette.lightred
|
color.bg.plugin.functiongraph.vertex.exit = color.palette.lightred
|
||||||
color.bg.plugin.functiongraph.vertex.picked = color.palette.yellow
|
color.bg.plugin.functiongraph.vertex.picked = color.palette.yellow
|
||||||
|
|
||||||
color.bg.plugin.functiongraph.edge.fall.through = color.flowtype.fall.through
|
color.bg.plugin.functiongraph.edge.fall.through = color.flowtype.fall.through
|
||||||
color.bg.plugin.functiongraph.edge.fall.through.highlight = rgb(255, 127, 127)
|
color.bg.plugin.functiongraph.edge.fall.through.highlight = color.palette.lightcoral
|
||||||
color.bg.plugin.functiongraph.edge.jump.conditional = color.flowtype.jump.conditional
|
color.bg.plugin.functiongraph.edge.jump.conditional = color.flowtype.jump.conditional
|
||||||
color.bg.plugin.functiongraph.edge.jump.conditional.highlight = lime
|
color.bg.plugin.functiongraph.edge.jump.conditional.highlight = color.palette.lime
|
||||||
color.bg.plugin.functiongraph.edge.jump.unconditional = color.flowtype.jump.unconditional
|
color.bg.plugin.functiongraph.edge.jump.unconditional = color.flowtype.jump.unconditional
|
||||||
color.bg.plugin.functiongraph.edge.jump.unconditional.highlight = rgb(127, 127, 255)
|
color.bg.plugin.functiongraph.edge.jump.unconditional.highlight = color.palette.cornflowerblue
|
||||||
|
|
||||||
color.bg.plugin.functiongraph.paint.icon = rgb(189, 221, 252) // gentle pale blue
|
color.bg.plugin.functiongraph.paint.icon = color.palette.lightcornflowerblue
|
||||||
|
|
||||||
|
|
||||||
icon.plugin.functiongraph.layout.experimental = package_development.png
|
icon.plugin.functiongraph.layout.experimental = package_development.png
|
||||||
|
@ -54,12 +53,6 @@ icon.plugin.functiongraph.action.provider = function_graph.png
|
||||||
icon.plugin.functiongraph.action.provider.satellite = network-wireless-16.png
|
icon.plugin.functiongraph.action.provider.satellite = network-wireless-16.png
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[Dark Defaults]
|
[Dark Defaults]
|
||||||
|
|
||||||
|
|
||||||
color.bg.plugin.functiongraph.vertex.group = rgb(226, 222, 179) // TODO confirm value
|
|
||||||
|
|
||||||
color.bg.plugin.functiongraph.edge.fall.through.highlight = rgb(165, 76, 80)
|
|
||||||
color.bg.plugin.functiongraph.edge.jump.conditional.highlight = rgb(95, 160, 196)
|
|
||||||
color.bg.plugin.functiongraph.edge.jump.unconditional.highlight = rgb(140, 162, 88)
|
|
||||||
|
|
||||||
|
|
|
@ -1,21 +1,18 @@
|
||||||
[Defaults]
|
[Defaults]
|
||||||
|
|
||||||
color.bg.plugin.fcg.vertex.default = rgb(110, 197, 174) // chill green
|
color.bg.plugin.fcg.vertex.default = MediumAquamarine // TODO
|
||||||
color.bg.plugin.fcg.vertex.toobig = color.palette.lightgray
|
color.bg.plugin.fcg.vertex.toobig = color.palette.lightgray
|
||||||
|
|
||||||
color.bg.plugin.fcg.edge.primary.direct = rgb(143, 197, 143) // light pale green
|
color.bg.plugin.fcg.edge.primary.direct = darkseagreen // TODO
|
||||||
color.bg.plugin.fcg.edge.primary.direct.selected = rgb(68, 171, 96) // lighter green
|
color.bg.plugin.fcg.edge.primary.direct.selected = color.palette.lightgreen
|
||||||
color.bg.plugin.fcg.edge.primary.indirect = rgb(233, 233, 233) // lightGray
|
color.bg.plugin.fcg.edge.primary.indirect = color.palette.lavender
|
||||||
color.bg.plugin.fcg.edge.primary.indirect.selected = rgb(201, 195, 195)
|
color.bg.plugin.fcg.edge.primary.indirect.selected = color.palette.silver
|
||||||
|
|
||||||
// the satellite gets too cluttered, so wash out the edges
|
// the satellite gets too cluttered, so wash out the edges
|
||||||
color.bg.plugin.fcg.edge.satellite.direct = rgba(0,0,0,0.1) // 'washed out black'
|
color.bg.plugin.fcg.edge.satellite.direct = color.palette.lightgray
|
||||||
color.bg.plugin.fcg.edge.satellite.indirect = rgba(125, 125, 125, 25) // 'washed out gray'
|
color.bg.plugin.fcg.edge.satellite.indirect = color.palette.lightpurple
|
||||||
|
|
||||||
icon.plugin.fcg.layout.bow.tie = color_swatch.png
|
icon.plugin.fcg.layout.bow.tie = color_swatch.png
|
||||||
|
|
||||||
|
|
||||||
[Dark Defaults]
|
[Dark Defaults]
|
||||||
|
|
||||||
color.bg.plugin.fcg.edge.satellite.direct = rgba(143, 197, 143, 100) // light pale green
|
|
||||||
color.bg.plugin.fcg.edge.satellite.indirect = rgba(233, 233, 233, 100) // lightGray
|
|
|
@ -1,13 +1,12 @@
|
||||||
[Defaults]
|
[Defaults]
|
||||||
|
|
||||||
|
color.bg.plugin.programdiff.highlight = color.bg.highlight.listing.diff
|
||||||
|
|
||||||
|
color.fg.plugin.programdiff.details.address = color.palette.teal
|
||||||
color.bg.plugin.programdiff.highlight = moccasin
|
color.fg.plugin.programdiff.details.comment = color.palette.green
|
||||||
|
color.fg.plugin.programdiff.details.danger = color.fg.error
|
||||||
color.bg.plugin.programdiff.details.address = #009999
|
color.fg.plugin.programdiff.details.emphasize = color.palette.green
|
||||||
color.bg.plugin.programdiff.details.comment = #009900
|
color.fg.plugin.programdiff.details.program = color.palette.purple
|
||||||
color.bg.plugin.programdiff.details.danger = #FF0000
|
|
||||||
color.bg.plugin.programdiff.details.emphasize = #009900
|
|
||||||
|
|
||||||
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
|
||||||
|
@ -22,4 +21,3 @@ icon.plugin.programdiff.cursor.location = cursor_arrow.gif
|
||||||
|
|
||||||
[Dark Defaults]
|
[Dark Defaults]
|
||||||
|
|
||||||
color.bg.plugin.programdiff.highlight = #4D4D2A
|
|
|
@ -1,17 +1,17 @@
|
||||||
|
|
||||||
[Defaults]
|
[Defaults]
|
||||||
|
|
||||||
color.fg.plugin.python.syntax.class = blue
|
color.fg.plugin.python.syntax.class = color.palette.blue
|
||||||
color.fg.plugin.python.syntax.code = darkgreen
|
color.fg.plugin.python.syntax.code = color.palette.darkgreen
|
||||||
color.fg.plugin.python.syntax.function = green
|
color.fg.plugin.python.syntax.function = color.palette.green
|
||||||
color.fg.plugin.python.syntax.instance = purple
|
color.fg.plugin.python.syntax.instance = color.palette.purple
|
||||||
color.fg.plugin.python.syntax.map = steelblue
|
color.fg.plugin.python.syntax.map = color.palette.steelblue
|
||||||
color.fg.plugin.python.syntax.method = teal
|
color.fg.plugin.python.syntax.method = color.palette.teal
|
||||||
color.fg.plugin.python.syntax.null = red
|
color.fg.plugin.python.syntax.null = color.palette.red
|
||||||
color.fg.plugin.python.syntax.number = darkgray
|
color.fg.plugin.python.syntax.number = color.palette.darkgray
|
||||||
color.fg.plugin.python.syntax.package = darkred
|
color.fg.plugin.python.syntax.package = color.palette.darkred
|
||||||
color.fg.plugin.python.syntax.sequence = rgb(128, 96, 64)
|
color.fg.plugin.python.syntax.sequence = color.palette.saddlebrown
|
||||||
color.fg.plugin.python.syntax.special = darkgreen
|
color.fg.plugin.python.syntax.special = color.palette.darkgreen
|
||||||
|
|
||||||
icon.plugin.python = python.png
|
icon.plugin.python = python.png
|
||||||
|
|
||||||
|
|
|
@ -1,34 +1,34 @@
|
||||||
[Defaults]
|
[Defaults]
|
||||||
|
|
||||||
color.fg.version.tracking.tooltip = gray
|
color.fg.version.tracking.tooltip = color.palette.gray
|
||||||
|
|
||||||
color.bg.version.tracking.dual.listing.highlight.markup.applied = rgb(150, 220, 150) // green
|
color.bg.version.tracking.dual.listing.highlight.markup.applied = color.palette.lightgreen
|
||||||
color.bg.version.tracking.dual.listing.highlight.markup.unapplied = rgb(255, 170, 85) // orange
|
color.bg.version.tracking.dual.listing.highlight.markup.unapplied = color.palette.orange
|
||||||
color.bg.version.tracking.dual.listing.highlight.markup.ignored = gainsboro // gray
|
color.bg.version.tracking.dual.listing.highlight.markup.ignored = color.palette.lightgray
|
||||||
color.bg.version.tracking.dual.listing.highlight.markup.rejected = rgb(250, 200, 200) // pink
|
color.bg.version.tracking.dual.listing.highlight.markup.rejected = color.palette.pink
|
||||||
color.bg.version.tracking.dual.listing.highlight.markup.failed = rgb(255, 80, 80) // red
|
color.bg.version.tracking.dual.listing.highlight.markup.failed = color.palette.red
|
||||||
color.bg.version.tracking.dual.listing.highlight.markup.no.address = rgb(205, 185, 220) // purple
|
color.bg.version.tracking.dual.listing.highlight.markup.no.address = color.palette.lavender
|
||||||
color.bg.version.tracking.dual.listing.highlight.markup.same = rgb(175, 225, 255) // light blue
|
color.bg.version.tracking.dual.listing.highlight.markup.same = color.palette.lightskyblue
|
||||||
color.bg.version.tracking.dual.listing.highlight.markup.conflict = rgb(255, 225, 105) // gold
|
color.bg.version.tracking.dual.listing.highlight.markup.conflict = color.palette.gold
|
||||||
|
|
||||||
color.bg.version.tracking.filter.formatted.field.error = rgb(218, 217, 206) // grayish
|
color.bg.version.tracking.filter.formatted.field.error = color.palette.lightgray
|
||||||
color.bg.version.tracking.filter.formatted.field.editing = rgb(243, 242, 131) // yellowish
|
color.bg.version.tracking.filter.formatted.field.editing = color.palette.khaki
|
||||||
|
|
||||||
color.bg.version.tracking.match.table.locked.out = whitesmoke
|
color.bg.version.tracking.match.table.locked.out = color.palette.aliceblue
|
||||||
color.bg.version.tracking.match.table.markup.status.applied = rgb(0, 180, 0) // green
|
color.bg.version.tracking.match.table.markup.status.applied = color.palette.limegreen
|
||||||
color.bg.version.tracking.match.table.markup.status.rejected = red
|
color.bg.version.tracking.match.table.markup.status.rejected = color.palette.red
|
||||||
color.bg.version.tracking.match.table.markup.status.dont.care = royalblue
|
color.bg.version.tracking.match.table.markup.status.dont.care = color.palette.cornflowerblue
|
||||||
color.bg.version.tracking.match.table.markup.status.dont.know = orange
|
color.bg.version.tracking.match.table.markup.status.dont.know = color.palette.orange
|
||||||
color.bg.version.tracking.match.table.markup.status.tooltip.unexamined = black
|
color.bg.version.tracking.match.table.markup.status.tooltip.unexamined = color.palette.black
|
||||||
color.fg.version.tracking.match.table.error = color.fg.error
|
color.fg.version.tracking.match.table.error = color.fg.error
|
||||||
|
|
||||||
color.fg.version.tracking.markup.items.table.error = color.fg.error
|
color.fg.version.tracking.markup.items.table.error = color.fg.error
|
||||||
color.fg.version.tracking.markup.items.table.user.defined.address = cyan
|
color.fg.version.tracking.markup.items.table.user.defined.address = color.palette.cyan
|
||||||
color.fg.version.tracking.markup.items.table.user.defined.address.selected = lightseagreen
|
color.fg.version.tracking.markup.items.table.user.defined.address.selected = color.palette.darkcyan
|
||||||
|
|
||||||
color.bg.version.tracking.related.matches.table.good = green
|
color.bg.version.tracking.related.matches.table.good = color.palette.green
|
||||||
color.bg.version.tracking.related.matches.table.medium = yellow
|
color.bg.version.tracking.related.matches.table.medium = color.palette.yellow
|
||||||
color.bg.version.tracking.related.matches.table.bad = red
|
color.bg.version.tracking.related.matches.table.bad = color.palette.red
|
||||||
|
|
||||||
color.fg.version.tracking.function.match.local.info = green
|
color.fg.version.tracking.function.match.local.info = green
|
||||||
|
|
||||||
|
@ -50,7 +50,6 @@ icon.version.tracking.add = Plus.png
|
||||||
icon.version.tracking.subtract = 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
|
||||||
|
|
||||||
|
|
||||||
icon.version.tracking.action.match.apply.blocked = icon.lock{icon.checkmark.green[size(12,12)][move(4,0)]}
|
icon.version.tracking.action.match.apply.blocked = icon.lock{icon.checkmark.green[size(12,12)][move(4,0)]}
|
||||||
icon.version.tracking.action.function.filter.not.accepted = icon.flag{dialog-cancel.png[size(10,10)][move(6,6)]}
|
icon.version.tracking.action.function.filter.not.accepted = icon.flag{dialog-cancel.png[size(10,10)][move(6,6)]}
|
||||||
|
@ -100,7 +99,6 @@ icon.version.tracking.empty = EmptyIcon16.gif
|
||||||
icon.version.tracking.function.filter.all = function.png
|
icon.version.tracking.function.filter.all = function.png
|
||||||
icon.version.tracking.function.filter.unmatched = filter_matched.png
|
icon.version.tracking.function.filter.unmatched = filter_matched.png
|
||||||
|
|
||||||
|
|
||||||
icon.version.tracking.match.table.status.accepted.some.unexamined = flag.png {bullet_error.png[move(10,8)]}
|
icon.version.tracking.match.table.status.accepted.some.unexamined = flag.png {bullet_error.png[move(10,8)]}
|
||||||
icon.version.tracking.match.table.status.accepted.error = flag.png {edit-delete.png[size(8,8)][move(10,8)]}
|
icon.version.tracking.match.table.status.accepted.error = flag.png {edit-delete.png[size(8,8)][move(10,8)]}
|
||||||
icon.version.tracking.match.table.status.accepted.fully.applied = flag.png {checkmark_green.gif[size(8,8)][move(10,8)]}
|
icon.version.tracking.match.table.status.accepted.fully.applied = flag.png {checkmark_green.gif[size(8,8)][move(10,8)]}
|
||||||
|
@ -134,34 +132,6 @@ icon.version.tracking.new.session.info = information.png
|
||||||
icon.version.tracking.correlator.status.already.run = flag-green.png
|
icon.version.tracking.correlator.status.already.run = flag-green.png
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[Dark Defaults]
|
[Dark Defaults]
|
||||||
|
|
||||||
|
|
||||||
color.bg.version.tracking.dual.listing.highlight.markup.applied = rgb(150, 220, 150) // green
|
|
||||||
color.bg.version.tracking.dual.listing.highlight.markup.unapplied = rgb(255, 170, 85) // orange
|
|
||||||
color.bg.version.tracking.dual.listing.highlight.markup.ignored = rgb(220, 220, 220) // gray
|
|
||||||
color.bg.version.tracking.dual.listing.highlight.markup.rejected = rgb(250, 200, 200) // pink
|
|
||||||
color.bg.version.tracking.dual.listing.highlight.markup.failed = rgb(255, 80, 80) // red
|
|
||||||
color.bg.version.tracking.dual.listing.highlight.markup.no.address = rgb(205, 185, 220) // purple
|
|
||||||
color.bg.version.tracking.dual.listing.highlight.markup.same = rgb(175, 225, 255) // light blue
|
|
||||||
color.bg.version.tracking.dual.listing.highlight.markup.conflict = rgb(255, 225, 105) // gold
|
|
||||||
|
|
||||||
color.bg.version.tracking.filter.formatted.field.error = rgb(218, 217, 206) // grayish
|
|
||||||
color.bg.version.tracking.filter.formatted.field.editing = rgb(243, 242, 131) // yellowish
|
|
||||||
|
|
||||||
color.bg.version.tracking.match.table.locked.out = whitesmoke
|
|
||||||
color.bg.version.tracking.match.table.markup.status.applied = rgb(0, 180, 0) // green
|
|
||||||
color.bg.version.tracking.match.table.markup.status.rejected = red
|
|
||||||
color.bg.version.tracking.match.table.markup.status.dont.care = royalblue
|
|
||||||
color.bg.version.tracking.match.table.markup.status.dont.know = orange
|
|
||||||
color.fg.version.tracking.match.table.error = color.fg.error
|
|
||||||
|
|
||||||
color.fg.version.tracking.markup.items.table.error = color.fg.error
|
|
||||||
color.fg.version.tracking.markup.items.table.user.defined.address = cyan
|
|
||||||
color.fg.version.tracking.markup.items.table.user.defined.address.selected = lightseagreen
|
|
||||||
|
|
||||||
color.bg.version.tracking.related.matches.table.good = green
|
|
||||||
color.bg.version.tracking.related.matches.table.medium = yellow
|
|
||||||
color.bg.version.tracking.related.matches.table.bad = red
|
|
||||||
|
|
||||||
color.fg.version.tracking.function.match.local.info = green
|
|
|
@ -37,8 +37,8 @@ import docking.widgets.EventTrigger;
|
||||||
import docking.widgets.fieldpanel.FieldPanel;
|
import docking.widgets.fieldpanel.FieldPanel;
|
||||||
import docking.widgets.label.GDLabel;
|
import docking.widgets.label.GDLabel;
|
||||||
import docking.widgets.table.threaded.ThreadedTableModel;
|
import docking.widgets.table.threaded.ThreadedTableModel;
|
||||||
import generic.theme.GColor;
|
|
||||||
import generic.theme.GIcon;
|
import generic.theme.GIcon;
|
||||||
|
import generic.theme.GThemeDefaults.Colors;
|
||||||
import ghidra.app.plugin.core.functioncompare.FunctionComparisonPanel;
|
import ghidra.app.plugin.core.functioncompare.FunctionComparisonPanel;
|
||||||
import ghidra.app.services.GoToService;
|
import ghidra.app.services.GoToService;
|
||||||
import ghidra.app.util.viewer.listingpanel.ListingCodeComparisonPanel;
|
import ghidra.app.util.viewer.listingpanel.ListingCodeComparisonPanel;
|
||||||
|
@ -80,8 +80,6 @@ public class VTFunctionAssociationProvider extends ComponentProviderAdapter
|
||||||
new GIcon("icon.version.tracking.action.function.filter.not.accepted");
|
new GIcon("icon.version.tracking.action.function.filter.not.accepted");
|
||||||
private static final String SHOW_COMPARE_ACTION_GROUP = "A9_ShowCompare"; // "A9_" forces to right of other dual view actions in toolbar.
|
private static final String SHOW_COMPARE_ACTION_GROUP = "A9_ShowCompare"; // "A9_" forces to right of other dual view actions in toolbar.
|
||||||
|
|
||||||
private static final Color FG_ERROR = new GColor("color.fg.error");
|
|
||||||
|
|
||||||
private GhidraTable sourceFunctionsTable;
|
private GhidraTable sourceFunctionsTable;
|
||||||
private GhidraTable destinationFunctionsTable;
|
private GhidraTable destinationFunctionsTable;
|
||||||
private VTFunctionAssociationTableModel sourceFunctionsModel;
|
private VTFunctionAssociationTableModel sourceFunctionsModel;
|
||||||
|
@ -361,7 +359,7 @@ public class VTFunctionAssociationProvider extends ComponentProviderAdapter
|
||||||
JPanel statusPanel = new JPanel(new BorderLayout());
|
JPanel statusPanel = new JPanel(new BorderLayout());
|
||||||
statusLabel = new GDLabel(NO_ERROR_MESSAGE);
|
statusLabel = new GDLabel(NO_ERROR_MESSAGE);
|
||||||
statusLabel.setHorizontalAlignment(SwingConstants.CENTER);
|
statusLabel.setHorizontalAlignment(SwingConstants.CENTER);
|
||||||
statusLabel.setForeground(FG_ERROR);
|
statusLabel.setForeground(Colors.ERROR);
|
||||||
statusLabel.addComponentListener(new ComponentAdapter() {
|
statusLabel.addComponentListener(new ComponentAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void componentResized(ComponentEvent e) {
|
public void componentResized(ComponentEvent e) {
|
||||||
|
|
|
@ -1,51 +1,47 @@
|
||||||
[Defaults]
|
[Defaults]
|
||||||
|
|
||||||
|
|
||||||
color.bg.splashscreen = black
|
color.bg.splashscreen = black // always black; no palette
|
||||||
color.fg.splashscreen = gray
|
color.fg.splashscreen = gray // always gray; no palette
|
||||||
|
|
||||||
color.bg.header.active = [color]system.color.bg.selected.view
|
color.bg.header.active = [color]system.color.bg.selected.view
|
||||||
color.bg.header.inactive = #A1A1A1
|
color.bg.header.inactive = color.palette.darkgray
|
||||||
color.fg.header.active = [color]system.color.fg.selected.view
|
color.fg.header.active = [color]system.color.fg.selected.view
|
||||||
color.fg.header.inactive = black
|
color.fg.header.inactive = color.palette.black
|
||||||
color.header.drag.cursor = black
|
color.header.drag.cursor = color.palette.black
|
||||||
|
|
||||||
color.fg.dialog.status.alert = color.fg.messages.alert
|
color.fg.dialog.status.alert = color.fg.messages.alert
|
||||||
color.fg.dialog.status.error = color.fg.messages.error
|
color.fg.dialog.status.error = color.fg.messages.error
|
||||||
color.fg.dialog.status.normal = color.fg.messages.normal
|
color.fg.dialog.status.normal = color.fg.messages.normal
|
||||||
color.fg.dialog.status.warning = color.fg.messages.warning
|
color.fg.dialog.status.warning = color.fg.messages.warning
|
||||||
|
|
||||||
color.bg.selection = rgb(180, 240, 180) // pale green
|
color.bg.selection = color.palette.palegreen
|
||||||
color.bg.highlight = rgb(240,240,150) // pale yellow
|
color.bg.highlight = color.palette.lemonchiffon
|
||||||
|
|
||||||
color.bg.currentline = rgb(232,242,254)
|
color.bg.currentline = color.palette.aliceblue
|
||||||
|
|
||||||
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 = color.palette.mistyrose
|
||||||
color.fg.textfield.hint = color.fg.hint
|
color.fg.textfield.hint = color.fg.messages.hint
|
||||||
|
|
||||||
color.bg.tree.drag = color.palette.lavender
|
color.bg.filterfield = color.palette.yellow
|
||||||
color.bg.tree.drag.no.selection = rgb(204, 204, 255)
|
color.fg.filterfield = color.palette.black
|
||||||
|
|
||||||
color.bg.filterfield = color.bg.filtered
|
|
||||||
color.fg.filterfield = black
|
|
||||||
|
|
||||||
// generic component items
|
// generic component items
|
||||||
color.border.bevel.highlight = lightGray
|
color.border.bevel.highlight = color.palette.lightgray
|
||||||
color.border.bevel.shadow = gray
|
color.border.bevel.shadow = color.palette.gray
|
||||||
color.border.provider.disconnected = orange
|
color.border.provider.disconnected = color.palette.orange
|
||||||
|
color.fg.button = color.palette.black
|
||||||
|
|
||||||
color.bg.filechooser = color.bg
|
color.bg.filechooser = color.bg
|
||||||
color.fg.filechooser = color.fg
|
color.fg.filechooser = color.fg
|
||||||
color.bg.filechooser.shortcut = lightGray
|
color.bg.filechooser.shortcut = color.palette.lightgray
|
||||||
|
|
||||||
color.bg.fieldpanel = color.bg
|
color.bg.fieldpanel = color.bg
|
||||||
color.fg.fieldpanel = color.fg
|
color.fg.fieldpanel = color.fg
|
||||||
color.bg.fieldpanel.selection = color.bg.selection
|
color.bg.fieldpanel.selection = color.bg.selection
|
||||||
color.bg.fieldpanel.highlight = color.bg.highlight
|
color.bg.fieldpanel.highlight = color.bg.highlight
|
||||||
|
|
||||||
// docking buttons
|
|
||||||
color.fg.button = black
|
|
||||||
|
|
||||||
icon.folder.new = folder_add.png
|
icon.folder.new = folder_add.png
|
||||||
icon.toggle.expand = expand.gif
|
icon.toggle.expand = expand.gif
|
||||||
|
@ -56,7 +52,6 @@ icon.toggle.collapse = collapse.gif
|
||||||
icon.undo = EMPTY_ICON{oxygen-edit-redo.png[mirror][move(0,3)]}
|
icon.undo = EMPTY_ICON{oxygen-edit-redo.png[mirror][move(0,3)]}
|
||||||
icon.redo = EMPTY_ICON{oxygen-edit-redo.png[move(0,3)]}
|
icon.redo = EMPTY_ICON{oxygen-edit-redo.png[move(0,3)]}
|
||||||
|
|
||||||
|
|
||||||
icon.font = text_lowercase.png
|
icon.font = text_lowercase.png
|
||||||
icon.rename = textfield_rename.png
|
icon.rename = textfield_rename.png
|
||||||
icon.check = check.png
|
icon.check = check.png
|
||||||
|
@ -145,32 +140,13 @@ font.input.hint = monospaced-PLAIN-10
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[Dark Defaults]
|
[Dark Defaults]
|
||||||
|
|
||||||
|
|
||||||
color.bg.header.inactive = #6A6A6A
|
|
||||||
color.header.drag.cursor = lightGray
|
|
||||||
|
|
||||||
color.fg.dialog.status.alert = orange
|
color.fg.filterfield = color.palette.darkslategray
|
||||||
color.fg.dialog.status.error = color.fg.error
|
|
||||||
color.fg.dialog.status.warning = orange
|
|
||||||
color.fg.dialog.status.normal = lightBlue
|
|
||||||
|
|
||||||
color.bg.currentline = #003366
|
color.bg.highlight = #703401 // orangish
|
||||||
|
|
||||||
color.bg.textfield.hint.invalid = maroon
|
|
||||||
|
|
||||||
color.bg.filterfield = color.bg.filtered
|
|
||||||
color.fg.filterfield = darkSlateGray
|
|
||||||
|
|
||||||
color.bg.selection = #14564f // greenish
|
|
||||||
color.bg.highlight = #703401 // orangish
|
|
||||||
|
|
||||||
|
|
||||||
// docking buttons
|
|
||||||
color.fg.button = darkGray
|
|
||||||
|
|
||||||
color.bg.filechooser.shortcut = [color]system.color.bg.view
|
color.bg.filechooser.shortcut = [color]system.color.bg.view
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,9 @@ package docking.options.editor;
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.awt.Component;
|
import java.awt.Component;
|
||||||
import java.beans.PropertyEditorSupport;
|
import java.beans.PropertyEditorSupport;
|
||||||
import java.util.Objects;
|
import java.util.*;
|
||||||
|
|
||||||
|
import javax.swing.event.ChangeListener;
|
||||||
|
|
||||||
import ghidra.util.Swing;
|
import ghidra.util.Swing;
|
||||||
|
|
||||||
|
@ -28,6 +30,7 @@ import ghidra.util.Swing;
|
||||||
public class ColorPropertyEditor extends PropertyEditorSupport {
|
public class ColorPropertyEditor extends PropertyEditorSupport {
|
||||||
|
|
||||||
private GhidraColorChooser colorChooser;
|
private GhidraColorChooser colorChooser;
|
||||||
|
private ChangeListener listener = e -> colorChanged();
|
||||||
|
|
||||||
private void colorChanged() {
|
private void colorChanged() {
|
||||||
// run later - allows debugging without hanging the UI in some environments
|
// run later - allows debugging without hanging the UI in some environments
|
||||||
|
@ -36,10 +39,22 @@ public class ColorPropertyEditor extends PropertyEditorSupport {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Component getCustomEditor() {
|
public Component getCustomEditor() {
|
||||||
// always create a new one. Holding on to closed dialogs causes issues if the
|
|
||||||
// theme changes
|
// always create a new one. Holding on to closed dialogs causes issues if the theme changes
|
||||||
|
List<Color> recent = new ArrayList<>();
|
||||||
|
List<Color> history = new ArrayList<>();
|
||||||
|
String activeTab = null;
|
||||||
|
if (colorChooser != null) {
|
||||||
|
history.addAll(colorChooser.getColorHistory());
|
||||||
|
recent.addAll(colorChooser.getRecentColors());
|
||||||
|
activeTab = colorChooser.getActiveTab();
|
||||||
|
colorChooser.getSelectionModel().removeChangeListener(listener);
|
||||||
|
}
|
||||||
colorChooser = new GhidraColorChooser();
|
colorChooser = new GhidraColorChooser();
|
||||||
colorChooser.getSelectionModel().addChangeListener(e -> colorChanged());
|
colorChooser.setColorHistory(history);
|
||||||
|
colorChooser.setRecentColors(recent);
|
||||||
|
colorChooser.setActiveTab(activeTab);
|
||||||
|
colorChooser.getSelectionModel().addChangeListener(listener);
|
||||||
return colorChooser;
|
return colorChooser;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,21 +23,54 @@ import java.util.List;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import javax.swing.colorchooser.AbstractColorChooserPanel;
|
import javax.swing.colorchooser.AbstractColorChooserPanel;
|
||||||
|
import javax.swing.plaf.ColorChooserUI;
|
||||||
|
|
||||||
public class GhidraColorChooser extends JColorChooser {
|
public class GhidraColorChooser extends JColorChooser {
|
||||||
|
|
||||||
private static final String DEFAULT_TITLE = "Please Choose a Color";
|
private static final String DEFAULT_TITLE = "Please Choose a Color";
|
||||||
|
|
||||||
private String title = DEFAULT_TITLE;
|
private String title = DEFAULT_TITLE;
|
||||||
private RecentColorCache recentColorCache = new RecentColorCache();
|
private RecentColorCache historyColorCache = new RecentColorCache();
|
||||||
|
private List<Color> recentColors = new ArrayList<>();
|
||||||
private String activeTabName;
|
private String activeTabName;
|
||||||
|
|
||||||
public GhidraColorChooser() {
|
public GhidraColorChooser() {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
|
init();
|
||||||
}
|
}
|
||||||
|
|
||||||
public GhidraColorChooser(Color initialColor) {
|
public GhidraColorChooser(Color initialColor) {
|
||||||
super(initialColor);
|
super(initialColor);
|
||||||
|
|
||||||
|
init();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setUI(ColorChooserUI ui) {
|
||||||
|
List<Color> history = getColorHistory();
|
||||||
|
List<Color> recents = getRecentColors();
|
||||||
|
|
||||||
|
super.setUI(ui);
|
||||||
|
SettableColorSwatchChooserPanel swatchPanel = installSettableColorSwatchChooserPanel();
|
||||||
|
|
||||||
|
swatchPanel.setRecentColors(recents);
|
||||||
|
swatchPanel.setHistoryColors(history);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void init() {
|
||||||
|
JTabbedPane tabbedPane = findTabbedPane(this);
|
||||||
|
tabbedPane.addChangeListener(e -> {
|
||||||
|
|
||||||
|
if (!tabbedPane.isShowing()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
int n = tabbedPane.getSelectedIndex();
|
||||||
|
if (n != -1) {
|
||||||
|
activeTabName = tabbedPane.getTitleAt(n);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTitle(String title) {
|
public void setTitle(String title) {
|
||||||
|
@ -45,19 +78,58 @@ public class GhidraColorChooser extends JColorChooser {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addColorToHistory(Color c) {
|
public void addColorToHistory(Color c) {
|
||||||
recentColorCache.addColor(c);
|
historyColorCache.addColor(c);
|
||||||
maybeInstallSettableColorSwatchChooserPanel();
|
installHistoryColors();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setColorHistory(List<Color> colors) {
|
public void setColorHistory(List<Color> colors) {
|
||||||
for (Color color : colors) {
|
for (Color color : colors) {
|
||||||
recentColorCache.addColor(color);
|
historyColorCache.addColor(color);
|
||||||
}
|
}
|
||||||
maybeInstallSettableColorSwatchChooserPanel();
|
|
||||||
|
installHistoryColors();
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Color> getColorHistory() {
|
public List<Color> getColorHistory() {
|
||||||
return recentColorCache.getMRUColorList();
|
SettableColorSwatchChooserPanel swatchPanel = getCustomSwatchPanel();
|
||||||
|
if (swatchPanel != null) {
|
||||||
|
return swatchPanel.getHistoryColors();
|
||||||
|
}
|
||||||
|
if (historyColorCache != null) { // null during init
|
||||||
|
return historyColorCache.getMRUColorList();
|
||||||
|
}
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRecentColors(List<Color> colors) {
|
||||||
|
recentColors.clear();
|
||||||
|
if (colors != null) {
|
||||||
|
recentColors.addAll(colors);
|
||||||
|
}
|
||||||
|
|
||||||
|
installRecentColors();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void installHistoryColors() {
|
||||||
|
SettableColorSwatchChooserPanel swatchPanel = installSettableColorSwatchChooserPanel();
|
||||||
|
swatchPanel.setHistoryColors(historyColorCache.getMRUColorList());
|
||||||
|
}
|
||||||
|
|
||||||
|
private void installRecentColors() {
|
||||||
|
SettableColorSwatchChooserPanel swatchPanel = installSettableColorSwatchChooserPanel();
|
||||||
|
swatchPanel.setRecentColors(recentColors);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Color> getRecentColors() {
|
||||||
|
|
||||||
|
List<Color> results = new ArrayList<>();
|
||||||
|
SettableColorSwatchChooserPanel swatchPanel = getCustomSwatchPanel();
|
||||||
|
if (swatchPanel == null) {
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
results.addAll(swatchPanel.getRecentColors());
|
||||||
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -68,28 +140,32 @@ public class GhidraColorChooser extends JColorChooser {
|
||||||
*/
|
*/
|
||||||
public void setActiveTab(String tabName) {
|
public void setActiveTab(String tabName) {
|
||||||
activeTabName = tabName;
|
activeTabName = tabName;
|
||||||
|
doSetActiveTab();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getActiveTab() {
|
||||||
|
return activeTabName;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
public Color showDialog(Component centerOverComponent) {
|
public Color showDialog(Component centerOverComponent) {
|
||||||
OKListener okListener = new OKListener();
|
OKListener okListener = new OKListener();
|
||||||
JDialog dialog = createDialog(centerOverComponent, title, true, this, okListener, null);
|
JDialog dialog = createDialog(centerOverComponent, title, true, this, okListener, null);
|
||||||
doSetActiveTab(dialog);
|
|
||||||
|
|
||||||
dialog.show(); // blocks until user brings dialog down...
|
dialog.show(); // blocks until user brings dialog down...
|
||||||
|
|
||||||
Color color = okListener.getColor();
|
Color color = okListener.getColor();
|
||||||
if (color != null) {
|
if (color != null) {
|
||||||
recentColorCache.addColor(color);
|
historyColorCache.addColor(color);
|
||||||
}
|
}
|
||||||
return color; // null if the user cancels
|
return color; // null if the user cancels
|
||||||
}
|
}
|
||||||
|
|
||||||
private void doSetActiveTab(JDialog dialog) {
|
private void doSetActiveTab() {
|
||||||
if (activeTabName == null) {
|
if (activeTabName == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
JTabbedPane pane = findTabbedPane(dialog);
|
JTabbedPane pane = findTabbedPane(this);
|
||||||
if (pane == null) {
|
if (pane == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -126,24 +202,28 @@ public class GhidraColorChooser extends JColorChooser {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void maybeInstallSettableColorSwatchChooserPanel() {
|
private SettableColorSwatchChooserPanel getCustomSwatchPanel() {
|
||||||
if (recentColorCache.isEmpty()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
List<Color> mruColorList = recentColorCache.getMRUColorList();
|
|
||||||
AbstractColorChooserPanel[] chooserPanels = getChooserPanels();
|
AbstractColorChooserPanel[] chooserPanels = getChooserPanels();
|
||||||
if (chooserPanels != null & chooserPanels.length > 1) {
|
if (chooserPanels != null & chooserPanels.length > 1) {
|
||||||
AbstractColorChooserPanel panel = chooserPanels[0];
|
AbstractColorChooserPanel panel = chooserPanels[0];
|
||||||
if (panel instanceof SettableColorSwatchChooserPanel) {
|
if (panel instanceof SettableColorSwatchChooserPanel) {
|
||||||
// we've already added our panel--reuse
|
return (SettableColorSwatchChooserPanel) panel;
|
||||||
((SettableColorSwatchChooserPanel) panel).setRecentColors(mruColorList);
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private SettableColorSwatchChooserPanel installSettableColorSwatchChooserPanel() {
|
||||||
|
|
||||||
|
SettableColorSwatchChooserPanel swatchPanel = getCustomSwatchPanel();
|
||||||
|
if (swatchPanel != null) {
|
||||||
|
return swatchPanel; // already installed
|
||||||
|
}
|
||||||
|
|
||||||
|
AbstractColorChooserPanel[] chooserPanels = getChooserPanels();
|
||||||
SettableColorSwatchChooserPanel newSwatchPanel =
|
SettableColorSwatchChooserPanel newSwatchPanel =
|
||||||
new SettableColorSwatchChooserPanel(mruColorList);
|
new SettableColorSwatchChooserPanel();
|
||||||
AbstractColorChooserPanel[] newChooserPanels =
|
AbstractColorChooserPanel[] newChooserPanels =
|
||||||
new AbstractColorChooserPanel[chooserPanels.length];
|
new AbstractColorChooserPanel[chooserPanels.length];
|
||||||
newChooserPanels[0] = newSwatchPanel;
|
newChooserPanels[0] = newSwatchPanel;
|
||||||
|
@ -153,6 +233,7 @@ public class GhidraColorChooser extends JColorChooser {
|
||||||
}
|
}
|
||||||
|
|
||||||
setChooserPanels(newChooserPanels);
|
setChooserPanels(newChooserPanels);
|
||||||
|
return newSwatchPanel;
|
||||||
}
|
}
|
||||||
|
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
|
@ -173,7 +254,7 @@ public class GhidraColorChooser extends JColorChooser {
|
||||||
}
|
}
|
||||||
|
|
||||||
private class RecentColorCache extends LinkedHashMap<Color, Color> implements Iterable<Color> {
|
private class RecentColorCache extends LinkedHashMap<Color, Color> implements Iterable<Color> {
|
||||||
private static final int MAX_SIZE = 15;
|
private static final int MAX_SIZE = 35; // the number of squares in the UI
|
||||||
|
|
||||||
public RecentColorCache() {
|
public RecentColorCache() {
|
||||||
super(16, 0.75f, true);
|
super(16, 0.75f, true);
|
||||||
|
|
|
@ -16,43 +16,72 @@
|
||||||
package docking.options.editor;
|
package docking.options.editor;
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
import java.awt.datatransfer.Clipboard;
|
||||||
import java.awt.event.*;
|
import java.awt.event.*;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import javax.swing.border.LineBorder;
|
import javax.swing.border.LineBorder;
|
||||||
import javax.swing.colorchooser.AbstractColorChooserPanel;
|
import javax.swing.colorchooser.AbstractColorChooserPanel;
|
||||||
|
import javax.swing.colorchooser.ColorSelectionModel;
|
||||||
|
import javax.swing.event.*;
|
||||||
|
import javax.swing.text.Document;
|
||||||
|
|
||||||
import docking.widgets.label.GHtmlLabel;
|
import docking.dnd.GClipboard;
|
||||||
|
import docking.dnd.StringTransferable;
|
||||||
|
import docking.widgets.label.GDLabel;
|
||||||
import docking.widgets.label.GLabel;
|
import docking.widgets.label.GLabel;
|
||||||
import generic.theme.GThemeDefaults.Colors;
|
import generic.theme.GThemeDefaults.Colors;
|
||||||
import generic.theme.GThemeDefaults.Colors.Java;
|
import generic.theme.GThemeDefaults.Colors.Java;
|
||||||
|
import generic.theme.GThemeDefaults.Colors.Messages;
|
||||||
import ghidra.util.ColorUtils;
|
import ghidra.util.ColorUtils;
|
||||||
import ghidra.util.layout.VerticalLayout;
|
import ghidra.util.WebColors;
|
||||||
|
import ghidra.util.layout.HorizontalLayout;
|
||||||
|
|
||||||
public class SettableColorSwatchChooserPanel extends AbstractColorChooserPanel {
|
public class SettableColorSwatchChooserPanel extends AbstractColorChooserPanel {
|
||||||
SwatchPanel swatchPanel;
|
|
||||||
RecentSwatchPanel recentSwatchPanel;
|
|
||||||
HistorySwatchPanel historySwatchPanel;
|
|
||||||
MainSwatchListener mainSwatchListener;
|
|
||||||
MouseListener recentSwatchListener;
|
|
||||||
MouseListener historySwatchListener;
|
|
||||||
|
|
||||||
private String recentStr = UIManager.getString("ColorChooser.swatchesRecentText");
|
private SwatchPanel swatchPanel;
|
||||||
private List<Color> recentColors;
|
private RecentSwatchPanel recentSwatchPanel;
|
||||||
|
private HistorySwatchPanel historySwatchPanel;
|
||||||
|
private JTextField colorNameField;
|
||||||
|
private GDLabel colorValueLabel;
|
||||||
|
|
||||||
public SettableColorSwatchChooserPanel(List<Color> recentColors) {
|
private MainSwatchListener mainSwatchListener;
|
||||||
setRecentColors(recentColors);
|
private MouseListener recentSwatchListener;
|
||||||
|
private MouseListener historySwatchListener;
|
||||||
|
private DocumentListener colorNameListener;
|
||||||
|
private ChangeListener colorValueUpdateListener;
|
||||||
|
|
||||||
|
private String recentText = UIManager.getString("ColorChooser.swatchesRecentText");
|
||||||
|
private List<Color> historyColors;
|
||||||
|
|
||||||
|
public void setHistoryColors(List<Color> historyColors) {
|
||||||
|
this.historyColors = historyColors;
|
||||||
|
if (historySwatchPanel != null) {
|
||||||
|
historySwatchPanel.setHistoryColors(historyColors);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Color> getHistoryColors() {
|
||||||
|
return historyColors;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setRecentColors(List<Color> recentColors) {
|
public void setRecentColors(List<Color> recentColors) {
|
||||||
this.recentColors = recentColors;
|
if (recentSwatchPanel != null) {
|
||||||
if (historySwatchPanel != null) {
|
recentSwatchPanel.setRecentColors(recentColors);
|
||||||
historySwatchPanel.setRecentColors(recentColors);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<Color> getRecentColors() {
|
||||||
|
if (recentSwatchPanel != null) {
|
||||||
|
return recentSwatchPanel.getRecentColors();
|
||||||
|
}
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getDisplayName() {
|
public String getDisplayName() {
|
||||||
return UIManager.getString("ColorChooser.swatchesNameText");
|
return UIManager.getString("ColorChooser.swatchesNameText");
|
||||||
|
@ -115,7 +144,7 @@ public class SettableColorSwatchChooserPanel extends AbstractColorChooserPanel {
|
||||||
swatchPanel.getAccessibleContext().setAccessibleName(getDisplayName());
|
swatchPanel.getAccessibleContext().setAccessibleName(getDisplayName());
|
||||||
|
|
||||||
recentSwatchPanel = new RecentSwatchPanel();
|
recentSwatchPanel = new RecentSwatchPanel();
|
||||||
recentSwatchPanel.getAccessibleContext().setAccessibleName(recentStr);
|
recentSwatchPanel.getAccessibleContext().setAccessibleName(recentText);
|
||||||
|
|
||||||
mainSwatchListener = new MainSwatchListener();
|
mainSwatchListener = new MainSwatchListener();
|
||||||
swatchPanel.addMouseListener(mainSwatchListener);
|
swatchPanel.addMouseListener(mainSwatchListener);
|
||||||
|
@ -124,62 +153,169 @@ public class SettableColorSwatchChooserPanel extends AbstractColorChooserPanel {
|
||||||
|
|
||||||
LineBorder border = new LineBorder(Java.BORDER);
|
LineBorder border = new LineBorder(Java.BORDER);
|
||||||
swatchPanel.setBorder(border);
|
swatchPanel.setBorder(border);
|
||||||
|
gbc.gridx = 0;
|
||||||
|
gbc.gridy = 0;
|
||||||
gbc.weightx = 1.0;
|
gbc.weightx = 1.0;
|
||||||
gbc.gridwidth = 2;
|
gbc.gridwidth = 2;
|
||||||
gbc.gridheight = 2;
|
gbc.gridheight = 2;
|
||||||
gbc.weighty = 1.0;
|
gbc.weighty = 1.0;
|
||||||
|
gbc.anchor = GridBagConstraints.PAGE_START;
|
||||||
superHolder.add(swatchPanel, gbc);
|
superHolder.add(swatchPanel, gbc);
|
||||||
|
|
||||||
recentSwatchPanel.addMouseListener(recentSwatchListener);
|
|
||||||
recentSwatchPanel.setBorder(border);
|
recentSwatchPanel.setBorder(border);
|
||||||
JPanel recentLabelHolder = new JPanel(new BorderLayout());
|
|
||||||
JLabel l = new GHtmlLabel(recentStr);
|
|
||||||
l.setLabelFor(recentSwatchPanel);
|
|
||||||
recentLabelHolder.add(l, BorderLayout.NORTH);
|
|
||||||
gbc.weighty = 0.0;
|
|
||||||
gbc.gridwidth = GridBagConstraints.REMAINDER;
|
|
||||||
gbc.gridheight = 1;
|
|
||||||
//superHolder.add( recentLabelHolder, gbc );
|
|
||||||
//superHolder.add( recentSwatchPanel, gbc );
|
|
||||||
|
|
||||||
// GHIDRA
|
JLabel recentLabel = new GLabel(recentText);
|
||||||
historySwatchPanel = new HistorySwatchPanel(recentColors);
|
recentLabel.setLabelFor(recentSwatchPanel);
|
||||||
historySwatchListener = new HistorySwatchListener();
|
|
||||||
|
JPanel recentPanel = new JPanel(new BorderLayout());
|
||||||
|
recentPanel.add(recentLabel, BorderLayout.NORTH);
|
||||||
|
recentPanel.add(recentSwatchPanel, BorderLayout.CENTER);
|
||||||
|
|
||||||
|
historySwatchPanel = new HistorySwatchPanel(historyColors);
|
||||||
historySwatchPanel.addMouseListener(historySwatchListener);
|
historySwatchPanel.addMouseListener(historySwatchListener);
|
||||||
|
historySwatchListener = new HistorySwatchListener();
|
||||||
historySwatchPanel.setBorder(border);
|
historySwatchPanel.setBorder(border);
|
||||||
JPanel historyLabelHolder = new JPanel(new BorderLayout());
|
|
||||||
|
JPanel historyPanel = new JPanel(new BorderLayout());
|
||||||
JLabel historyLabel = new GLabel("History:");
|
JLabel historyLabel = new GLabel("History:");
|
||||||
historyLabel.setLabelFor(historySwatchPanel);
|
historyLabel.setLabelFor(historySwatchPanel);
|
||||||
historyLabelHolder.add(historyLabel, BorderLayout.NORTH);
|
historyPanel.add(historyLabel, BorderLayout.NORTH);
|
||||||
gbc.weighty = 0.0;
|
historyPanel.add(historySwatchPanel, BorderLayout.CENTER);
|
||||||
gbc.gridwidth = GridBagConstraints.REMAINDER;
|
|
||||||
gbc.gridheight = 1;
|
|
||||||
//superHolder.add( historyLabelHolder, gbc );
|
|
||||||
//superHolder.add( historySwatchPanel, gbc );
|
|
||||||
|
|
||||||
JPanel recentAndHistoryPanel = new JPanel(new VerticalLayout(1));
|
JPanel recentAndHistoryPanel = new JPanel(new HorizontalLayout(10));
|
||||||
recentAndHistoryPanel.add(recentLabelHolder);
|
recentAndHistoryPanel.add(recentPanel);
|
||||||
recentAndHistoryPanel.add(recentSwatchPanel);
|
recentAndHistoryPanel.add(historyPanel);
|
||||||
recentAndHistoryPanel.add(Box.createVerticalStrut(2));
|
|
||||||
recentAndHistoryPanel.add(historyLabelHolder);
|
gbc.gridx = 2;
|
||||||
recentAndHistoryPanel.add(historySwatchPanel);
|
gbc.gridy = 0;
|
||||||
superHolder.add(Box.createHorizontalStrut(5));
|
gbc.weighty = 0.0;
|
||||||
superHolder.add(recentAndHistoryPanel);
|
superHolder.add(Box.createHorizontalStrut(10));
|
||||||
|
|
||||||
|
gbc.gridx = 3;
|
||||||
|
gbc.gridy = 0;
|
||||||
|
superHolder.add(recentAndHistoryPanel, gbc);
|
||||||
|
|
||||||
|
JPanel colorValuePanel = createColorValuePanel();
|
||||||
|
|
||||||
|
gbc.gridx = 0;
|
||||||
|
gbc.gridy = 2;
|
||||||
|
gbc.gridwidth = 4; // take all space on the bottom, below the swatch
|
||||||
|
superHolder.add(colorValuePanel, gbc);
|
||||||
|
|
||||||
add(superHolder);
|
add(superHolder);
|
||||||
|
}
|
||||||
|
|
||||||
|
private JPanel createColorValuePanel() {
|
||||||
|
|
||||||
|
//
|
||||||
|
// The Color Value Panel shows allows the user to enter colors by name, hex or rgb. It
|
||||||
|
// also displays the current chooser color value in a label that can be double-clicked to
|
||||||
|
// copy the color info.
|
||||||
|
//
|
||||||
|
// The layout:
|
||||||
|
// - Box of 2 items from left to right
|
||||||
|
// Label
|
||||||
|
// Text Field + Description
|
||||||
|
//
|
||||||
|
// - The second box is laid out from top to bottom
|
||||||
|
// Text Field on top
|
||||||
|
// Description label on bottom
|
||||||
|
//
|
||||||
|
JPanel colorValuePanel = new JPanel();
|
||||||
|
colorValuePanel.setLayout(new BoxLayout(colorValuePanel, BoxLayout.LINE_AXIS));
|
||||||
|
JPanel colorTextPanel = new JPanel();
|
||||||
|
colorTextPanel.setLayout(new BoxLayout(colorTextPanel, BoxLayout.PAGE_AXIS));
|
||||||
|
|
||||||
|
colorNameField = new JTextField(20);
|
||||||
|
colorNameField.addKeyListener(new KeyAdapter() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void keyPressed(KeyEvent e) {
|
||||||
|
if (e.getKeyCode() == KeyEvent.VK_ENTER) {
|
||||||
|
updateColorFromColorNameField();
|
||||||
|
e.consume();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
Document document = colorNameField.getDocument();
|
||||||
|
colorNameListener = new ColorNameListener();
|
||||||
|
document.addDocumentListener(colorNameListener);
|
||||||
|
|
||||||
|
GLabel colorNameLabel = new GLabel("Color Name: ");
|
||||||
|
String colorNameTip = "Enter a Web Color name or a color value";
|
||||||
|
|
||||||
|
colorValueLabel = new GDLabel();
|
||||||
|
colorValueLabel.setForeground(Messages.HINT);
|
||||||
|
colorValueLabel.setToolTipText("Double-click to copy color info");
|
||||||
|
colorValueLabel.addMouseListener(new MouseAdapter() {
|
||||||
|
@Override
|
||||||
|
public void mouseClicked(MouseEvent e) {
|
||||||
|
if (e.getClickCount() == 2) {
|
||||||
|
Color color = getColorFromModel();
|
||||||
|
String text =
|
||||||
|
WebColors.toHexString(color).toUpperCase() + " " +
|
||||||
|
WebColors.toRgbString(color);
|
||||||
|
String colorName = WebColors.toColorName(color);
|
||||||
|
if (colorName != null) {
|
||||||
|
text += " " + colorName;
|
||||||
|
}
|
||||||
|
Clipboard systemClipboard = GClipboard.getSystemClipboard();
|
||||||
|
StringTransferable transferable = new StringTransferable(text);
|
||||||
|
systemClipboard.setContents(transferable, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
colorValueLabel.setText(" "); // this creates the correct vertical spacing when empty
|
||||||
|
|
||||||
|
ColorSelectionModel model = getColorSelectionModel();
|
||||||
|
colorValueUpdateListener = e -> {
|
||||||
|
|
||||||
|
Color color = getColorFromModel();
|
||||||
|
recentSwatchPanel.setMostRecentColor(color);
|
||||||
|
|
||||||
|
String text = WebColors.toHexString(color) + " " + WebColors.toRgbString(color);
|
||||||
|
String colorName = WebColors.toColorName(color);
|
||||||
|
colorValueLabel.setToolTipText(colorName);
|
||||||
|
colorValueLabel.setText(text);
|
||||||
|
};
|
||||||
|
model.addChangeListener(colorValueUpdateListener);
|
||||||
|
|
||||||
|
colorNameLabel.setToolTipText(colorNameTip);
|
||||||
|
colorNameField.setToolTipText(colorNameTip);
|
||||||
|
|
||||||
|
JPanel colorTextParentPanel = new JPanel(); // flow layout to center on x-axis
|
||||||
|
colorTextParentPanel.add(colorValueLabel);
|
||||||
|
|
||||||
|
colorTextPanel.add(colorNameField);
|
||||||
|
colorTextPanel.add(colorTextParentPanel);
|
||||||
|
|
||||||
|
// add space between the text field and this label
|
||||||
|
colorNameLabel.setBorder(BorderFactory.createEmptyBorder(5, 0, 0, 5));
|
||||||
|
|
||||||
|
// align both left-to-right items at the top of the container
|
||||||
|
colorNameLabel.setAlignmentY(0);
|
||||||
|
colorTextPanel.setAlignmentY(0);
|
||||||
|
|
||||||
|
colorValuePanel.add(colorNameLabel);
|
||||||
|
colorValuePanel.add(colorTextPanel);
|
||||||
|
|
||||||
|
// add space between swatch and this panel
|
||||||
|
colorValuePanel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
|
||||||
|
return colorValuePanel;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uninstallChooserPanel(JColorChooser enclosingChooser) {
|
public void uninstallChooserPanel(JColorChooser enclosingChooser) {
|
||||||
|
ColorSelectionModel model = getColorSelectionModel();
|
||||||
|
model.removeChangeListener(colorValueUpdateListener);
|
||||||
|
|
||||||
super.uninstallChooserPanel(enclosingChooser);
|
super.uninstallChooserPanel(enclosingChooser);
|
||||||
swatchPanel.removeMouseListener(mainSwatchListener);
|
swatchPanel.removeMouseListener(mainSwatchListener);
|
||||||
recentSwatchPanel.removeMouseListener(recentSwatchListener);
|
recentSwatchPanel.removeMouseListener(recentSwatchListener);
|
||||||
historySwatchPanel.removeMouseListener(historySwatchListener);
|
historySwatchPanel.removeMouseListener(historySwatchListener);
|
||||||
swatchPanel = null;
|
colorNameField.getDocument().removeDocumentListener(colorNameListener);
|
||||||
recentSwatchPanel = null;
|
|
||||||
recentSwatchListener = null;
|
|
||||||
mainSwatchListener = null;
|
|
||||||
removeAll(); // strip out all the sub-components
|
removeAll(); // strip out all the sub-components
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -188,7 +324,7 @@ public class SettableColorSwatchChooserPanel extends AbstractColorChooserPanel {
|
||||||
// stub
|
// stub
|
||||||
}
|
}
|
||||||
|
|
||||||
class HistorySwatchListener extends MouseAdapter {
|
private class HistorySwatchListener extends MouseAdapter {
|
||||||
@Override
|
@Override
|
||||||
public void mousePressed(MouseEvent e) {
|
public void mousePressed(MouseEvent e) {
|
||||||
Color color = historySwatchPanel.getColorForLocation(e.getX(), e.getY());
|
Color color = historySwatchPanel.getColorForLocation(e.getX(), e.getY());
|
||||||
|
@ -196,7 +332,7 @@ public class SettableColorSwatchChooserPanel extends AbstractColorChooserPanel {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class RecentSwatchListener extends MouseAdapter {
|
private class RecentSwatchListener extends MouseAdapter {
|
||||||
@Override
|
@Override
|
||||||
public void mousePressed(MouseEvent e) {
|
public void mousePressed(MouseEvent e) {
|
||||||
Color color = recentSwatchPanel.getColorForLocation(e.getX(), e.getY());
|
Color color = recentSwatchPanel.getColorForLocation(e.getX(), e.getY());
|
||||||
|
@ -204,12 +340,44 @@ public class SettableColorSwatchChooserPanel extends AbstractColorChooserPanel {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class MainSwatchListener extends MouseAdapter implements Serializable {
|
private class MainSwatchListener extends MouseAdapter implements Serializable {
|
||||||
@Override
|
@Override
|
||||||
public void mousePressed(MouseEvent e) {
|
public void mousePressed(MouseEvent e) {
|
||||||
Color color = swatchPanel.getColorForLocation(e.getX(), e.getY());
|
Color color = swatchPanel.getColorForLocation(e.getX(), e.getY());
|
||||||
getColorSelectionModel().setSelectedColor(color);
|
getColorSelectionModel().setSelectedColor(color);
|
||||||
recentSwatchPanel.setMostRecentColor(color);
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateColorFromColorNameField() {
|
||||||
|
|
||||||
|
String text = colorNameField.getText();
|
||||||
|
String colorText = text.replaceAll("\s", "");
|
||||||
|
Color color = WebColors.getColor(colorText);
|
||||||
|
|
||||||
|
if (color == null) {
|
||||||
|
color = WebColors.getColor('#' + colorText);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (color != null) {
|
||||||
|
getColorSelectionModel().setSelectedColor(color);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private class ColorNameListener implements DocumentListener {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void changedUpdate(DocumentEvent e) {
|
||||||
|
updateColorFromColorNameField();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void insertUpdate(DocumentEvent e) {
|
||||||
|
updateColorFromColorNameField();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void removeUpdate(DocumentEvent e) {
|
||||||
|
updateColorFromColorNameField();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -302,47 +470,14 @@ class SwatchPanel extends JPanel {
|
||||||
|
|
||||||
class RecentSwatchPanel extends SwatchPanel {
|
class RecentSwatchPanel extends SwatchPanel {
|
||||||
|
|
||||||
|
private List<Color> recentColors;
|
||||||
|
|
||||||
RecentSwatchPanel() {
|
RecentSwatchPanel() {
|
||||||
initColors();
|
initColors();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
List<Color> getRecentColors() {
|
||||||
protected void initValues() {
|
return List.of(colors);
|
||||||
swatchSize = UIManager.getDimension("ColorChooser.swatchesRecentSwatchSize");
|
|
||||||
numSwatches = new Dimension(5, 7);
|
|
||||||
gap = new Dimension(1, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void initColors() {
|
|
||||||
Color defaultRecentColor = UIManager.getColor("ColorChooser.swatchesDefaultRecentColor");
|
|
||||||
int numColors = numSwatches.width * numSwatches.height;
|
|
||||||
|
|
||||||
colors = new Color[numColors];
|
|
||||||
for (int i = 0; i < numColors; i++) {
|
|
||||||
colors[i] = defaultRecentColor;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMostRecentColor(Color c) {
|
|
||||||
|
|
||||||
System.arraycopy(colors, 0, colors, 1, colors.length - 1);
|
|
||||||
colors[0] = c;
|
|
||||||
repaint();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
class HistorySwatchPanel extends SwatchPanel {
|
|
||||||
private List<Color> recentColors;
|
|
||||||
|
|
||||||
HistorySwatchPanel(List<Color> recentColors) {
|
|
||||||
setRecentColors(recentColors);
|
|
||||||
}
|
|
||||||
|
|
||||||
void setRecentColors(List<Color> recentColors) {
|
|
||||||
this.recentColors = recentColors;
|
|
||||||
initColors();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -367,8 +502,64 @@ class HistorySwatchPanel extends SwatchPanel {
|
||||||
for (int i = 0; i < recentColorCount; i++) {
|
for (int i = 0; i < recentColorCount; i++) {
|
||||||
colors[i] = recentColors.get(i);
|
colors[i] = recentColors.get(i);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void setMostRecentColor(Color c) {
|
||||||
|
|
||||||
|
// Do not add duplicates next to each other; duplicates are ok if separated by other colors,
|
||||||
|
// as this shows color choices over time and provides the user some context.
|
||||||
|
Color lastColor = colors[0];
|
||||||
|
if (Objects.equals(lastColor, c)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
System.arraycopy(colors, 0, colors, 1, colors.length - 1);
|
||||||
|
colors[0] = c;
|
||||||
|
repaint();
|
||||||
|
}
|
||||||
|
|
||||||
|
void setRecentColors(List<Color> recentColors) {
|
||||||
|
this.recentColors = recentColors;
|
||||||
|
initColors();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class HistorySwatchPanel extends SwatchPanel {
|
||||||
|
private List<Color> historyColors;
|
||||||
|
|
||||||
|
HistorySwatchPanel(List<Color> recentColors) {
|
||||||
|
setHistoryColors(recentColors);
|
||||||
|
}
|
||||||
|
|
||||||
|
void setHistoryColors(List<Color> recentColors) {
|
||||||
|
this.historyColors = recentColors;
|
||||||
|
initColors();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void initValues() {
|
||||||
|
swatchSize = UIManager.getDimension("ColorChooser.swatchesRecentSwatchSize");
|
||||||
|
numSwatches = new Dimension(5, 7);
|
||||||
|
gap = new Dimension(1, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void initColors() {
|
||||||
|
Color defaultRecentColor = UIManager.getColor("ColorChooser.swatchesDefaultRecentColor");
|
||||||
|
int numColors = numSwatches.width * numSwatches.height;
|
||||||
|
|
||||||
|
colors = new Color[numColors];
|
||||||
|
for (int i = 0; i < numColors; i++) {
|
||||||
|
colors[i] = defaultRecentColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (historyColors != null && historyColors.size() > 0) {
|
||||||
|
int recentColorCount = historyColors.size();
|
||||||
|
for (int i = 0; i < recentColorCount; i++) {
|
||||||
|
colors[i] = historyColors.get(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,4 +48,4 @@ public class ColorValueEditor extends ThemeValueEditor<Color> {
|
||||||
protected void storeState() {
|
protected void storeState() {
|
||||||
((ColorPropertyEditor) editor).saveState();
|
((ColorPropertyEditor) editor).saveState();
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -0,0 +1,49 @@
|
||||||
|
/* ###
|
||||||
|
* IP: GHIDRA
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
package docking.theme.gui;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import generic.theme.ColorValue;
|
||||||
|
import generic.theme.ThemeManager;
|
||||||
|
|
||||||
|
public class ThemeColorPaletteTable extends ThemeColorTable {
|
||||||
|
|
||||||
|
public ThemeColorPaletteTable(ThemeManager themeManager, GThemeValuesCache valuesProvider) {
|
||||||
|
super(themeManager, valuesProvider);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
ThemeColorTableModel createModel(GThemeValuesCache valuesProvider) {
|
||||||
|
return new ThemeColorTableModel(valuesProvider) {
|
||||||
|
@Override
|
||||||
|
protected void filter() {
|
||||||
|
|
||||||
|
List<ColorValue> filtered = new ArrayList<>();
|
||||||
|
|
||||||
|
for (ColorValue colorValue : colors) {
|
||||||
|
String id = colorValue.getId();
|
||||||
|
if (id.startsWith("color.palette")) {
|
||||||
|
filtered.add(colorValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
colors = filtered;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
|
@ -16,7 +16,6 @@
|
||||||
package docking.theme.gui;
|
package docking.theme.gui;
|
||||||
|
|
||||||
import java.awt.BorderLayout;
|
import java.awt.BorderLayout;
|
||||||
import java.awt.Color;
|
|
||||||
import java.awt.event.*;
|
import java.awt.event.*;
|
||||||
import java.beans.PropertyChangeEvent;
|
import java.beans.PropertyChangeEvent;
|
||||||
|
|
||||||
|
@ -46,7 +45,7 @@ public class ThemeColorTable extends JPanel implements ActionContextProvider {
|
||||||
public ThemeColorTable(ThemeManager themeManager, GThemeValuesCache valuesProvider) {
|
public ThemeColorTable(ThemeManager themeManager, GThemeValuesCache valuesProvider) {
|
||||||
super(new BorderLayout());
|
super(new BorderLayout());
|
||||||
this.themeManager = themeManager;
|
this.themeManager = themeManager;
|
||||||
colorTableModel = new ThemeColorTableModel(valuesProvider);
|
colorTableModel = createModel(valuesProvider);
|
||||||
|
|
||||||
filterTable = new GFilterTable<>(colorTableModel);
|
filterTable = new GFilterTable<>(colorTableModel);
|
||||||
table = filterTable.getTable();
|
table = filterTable.getTable();
|
||||||
|
@ -82,7 +81,10 @@ public class ThemeColorTable extends JPanel implements ActionContextProvider {
|
||||||
});
|
});
|
||||||
|
|
||||||
add(filterTable, BorderLayout.CENTER);
|
add(filterTable, BorderLayout.CENTER);
|
||||||
|
}
|
||||||
|
|
||||||
|
ThemeColorTableModel createModel(GThemeValuesCache valuesProvider) {
|
||||||
|
return new ThemeColorTableModel(valuesProvider);
|
||||||
}
|
}
|
||||||
|
|
||||||
void colorValueChanged(PropertyChangeEvent event) {
|
void colorValueChanged(PropertyChangeEvent event) {
|
||||||
|
@ -116,7 +118,7 @@ public class ThemeColorTable extends JPanel implements ActionContextProvider {
|
||||||
}
|
}
|
||||||
String id = currentValue.getId();
|
String id = currentValue.getId();
|
||||||
ColorValue themeValue = colorTableModel.getThemeValue(id);
|
ColorValue themeValue = colorTableModel.getThemeValue(id);
|
||||||
return new ThemeTableContext<Color>(currentValue, themeValue);
|
return new ThemeTableContext<>(currentValue, themeValue);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@ import ghidra.util.table.column.GColumnRenderer;
|
||||||
* Table model for theme colors
|
* Table model for theme colors
|
||||||
*/
|
*/
|
||||||
public class ThemeColorTableModel extends GDynamicColumnTableModel<ColorValue, Object> {
|
public class ThemeColorTableModel extends GDynamicColumnTableModel<ColorValue, Object> {
|
||||||
private List<ColorValue> colors;
|
protected List<ColorValue> colors;
|
||||||
private GThemeValueMap currentValues;
|
private GThemeValueMap currentValues;
|
||||||
private GThemeValueMap themeValues;
|
private GThemeValueMap themeValues;
|
||||||
private GThemeValueMap defaultValues;
|
private GThemeValueMap defaultValues;
|
||||||
|
@ -57,6 +57,7 @@ public class ThemeColorTableModel extends GDynamicColumnTableModel<ColorValue, O
|
||||||
public void reloadCurrent() {
|
public void reloadCurrent() {
|
||||||
currentValues = valuesCache.getCurrentValues();
|
currentValues = valuesCache.getCurrentValues();
|
||||||
colors = currentValues.getColors();
|
colors = currentValues.getColors();
|
||||||
|
filter();
|
||||||
fireTableDataChanged();
|
fireTableDataChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,6 +82,11 @@ public class ThemeColorTableModel extends GDynamicColumnTableModel<ColorValue, O
|
||||||
lightDefaultValues = valuesCache.getLightValues();
|
lightDefaultValues = valuesCache.getLightValues();
|
||||||
darkDefaultValues = valuesCache.getDarkValues();
|
darkDefaultValues = valuesCache.getDarkValues();
|
||||||
|
|
||||||
|
filter();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void filter() {
|
||||||
|
// for subclasses
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -266,5 +272,6 @@ public class ThemeColorTableModel extends GDynamicColumnTableModel<ColorValue, O
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private record ResolvedColor(String id, String refId, Color color) { /**/ }
|
private record ResolvedColor(String id, String refId, Color color) {
|
||||||
|
/**/ }
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,7 +67,7 @@ public class ThemeColorTree extends JPanel implements ActionContextProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
private Component buildBinCombo() {
|
private Component buildBinCombo() {
|
||||||
groupingCombo = new JComboBox<GroupingStrategy>(GroupingStrategy.values());
|
groupingCombo = new JComboBox<>(GroupingStrategy.values());
|
||||||
groupingCombo.setSelectedItem(GroupingStrategy.BIN_64);
|
groupingCombo.setSelectedItem(GroupingStrategy.BIN_64);
|
||||||
groupingCombo.addItemListener(this::comboChanged);
|
groupingCombo.addItemListener(this::comboChanged);
|
||||||
return groupingCombo;
|
return groupingCombo;
|
||||||
|
@ -79,7 +79,7 @@ public class ThemeColorTree extends JPanel implements ActionContextProvider {
|
||||||
|
|
||||||
private Component buildSortCombo() {
|
private Component buildSortCombo() {
|
||||||
ColorSorter[] sorters = { RGB, RBG, GRB, GBR, BRG, BGR };
|
ColorSorter[] sorters = { RGB, RBG, GRB, GBR, BRG, BGR };
|
||||||
colorSortCombo = new JComboBox<ColorSorter>(sorters);
|
colorSortCombo = new JComboBox<>(sorters);
|
||||||
colorSortCombo.addItemListener(this::comboChanged);
|
colorSortCombo.addItemListener(this::comboChanged);
|
||||||
return colorSortCombo;
|
return colorSortCombo;
|
||||||
}
|
}
|
||||||
|
@ -326,25 +326,25 @@ public class ThemeColorTree extends JPanel implements ActionContextProvider {
|
||||||
GroupingStrategy grouping = (GroupingStrategy) groupingCombo.getSelectedItem();
|
GroupingStrategy grouping = (GroupingStrategy) groupingCombo.getSelectedItem();
|
||||||
switch (grouping) {
|
switch (grouping) {
|
||||||
case REF:
|
case REF:
|
||||||
return new ArrayList<GTreeNode>(nodes);
|
return new ArrayList<>(nodes);
|
||||||
case SAME_COLORS:
|
case SAME_COLORS:
|
||||||
List<ColorNode> grouped = groupSameColors(nodes);
|
List<ColorNode> grouped = groupSameColors(nodes);
|
||||||
return new ArrayList<GTreeNode>(grouped);
|
return new ArrayList<>(grouped);
|
||||||
case BIN_8:
|
case BIN_8:
|
||||||
bins = 8;
|
bins = 8;
|
||||||
grouped = groupSameColors(nodes);
|
grouped = groupSameColors(nodes);
|
||||||
List<ColorNode> binned = binColors(grouped, bins);
|
List<ColorNode> binned = binColors(grouped, bins);
|
||||||
return new ArrayList<GTreeNode>(binned);
|
return new ArrayList<>(binned);
|
||||||
case BIN_64:
|
case BIN_64:
|
||||||
bins = 64;
|
bins = 64;
|
||||||
grouped = groupSameColors(nodes);
|
grouped = groupSameColors(nodes);
|
||||||
binned = binColors(grouped, bins);
|
binned = binColors(grouped, bins);
|
||||||
return new ArrayList<GTreeNode>(binned);
|
return new ArrayList<>(binned);
|
||||||
case BIN_512:
|
case BIN_512:
|
||||||
bins = 512;
|
bins = 512;
|
||||||
grouped = groupSameColors(nodes);
|
grouped = groupSameColors(nodes);
|
||||||
binned = binColors(grouped, bins);
|
binned = binColors(grouped, bins);
|
||||||
return new ArrayList<GTreeNode>(binned);
|
return new ArrayList<>(binned);
|
||||||
default:
|
default:
|
||||||
return new ArrayList<>();
|
return new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
@ -361,6 +361,10 @@ public class ThemeColorTree extends JPanel implements ActionContextProvider {
|
||||||
if (colorNode.isIndirect()) {
|
if (colorNode.isIndirect()) {
|
||||||
String refId = colorNode.getReferenceId();
|
String refId = colorNode.getReferenceId();
|
||||||
ColorValueNode parent = idMap.get(refId);
|
ColorValueNode parent = idMap.get(refId);
|
||||||
|
if (parent == null) {
|
||||||
|
// this implies the user has changed id names and refreshed the tool
|
||||||
|
continue;
|
||||||
|
}
|
||||||
parent.addNode(colorNode);
|
parent.addNode(colorNode);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -47,6 +47,7 @@ public class ThemeEditorDialog extends DialogComponentProvider {
|
||||||
private ThemeFontTable fontTable;
|
private ThemeFontTable fontTable;
|
||||||
private ThemeIconTable iconTable;
|
private ThemeIconTable iconTable;
|
||||||
private ThemeColorTree colorTree;
|
private ThemeColorTree colorTree;
|
||||||
|
private ThemeColorTable paletteTable;
|
||||||
|
|
||||||
private ThemeManager themeManager;
|
private ThemeManager themeManager;
|
||||||
|
|
||||||
|
@ -90,7 +91,8 @@ public class ThemeEditorDialog extends DialogComponentProvider {
|
||||||
DockingAction reloadDefaultsAction = new ActionBuilder("Restore Theme Values", getTitle())
|
DockingAction reloadDefaultsAction = new ActionBuilder("Restore Theme Values", getTitle())
|
||||||
.toolBarIcon(new GIcon("icon.refresh"))
|
.toolBarIcon(new GIcon("icon.refresh"))
|
||||||
.toolBarGroup("B")
|
.toolBarGroup("B")
|
||||||
.description("Reloads default values and restores theme to its original values.")
|
.description("Reloads default values from the filesystem and restores the " +
|
||||||
|
"original theme values.")
|
||||||
.helpLocation(new HelpLocation("Theming", "Reload_Theme"))
|
.helpLocation(new HelpLocation("Theming", "Reload_Theme"))
|
||||||
.onAction(e -> restoreCallback())
|
.onAction(e -> restoreCallback())
|
||||||
.build();
|
.build();
|
||||||
|
@ -151,6 +153,7 @@ public class ThemeEditorDialog extends DialogComponentProvider {
|
||||||
private void reset() {
|
private void reset() {
|
||||||
colorTree.rebuild();
|
colorTree.rebuild();
|
||||||
colorTable.reloadAll();
|
colorTable.reloadAll();
|
||||||
|
paletteTable.reloadAll();
|
||||||
fontTable.reloadAll();
|
fontTable.reloadAll();
|
||||||
iconTable.reloadAll();
|
iconTable.reloadAll();
|
||||||
updateButtons();
|
updateButtons();
|
||||||
|
@ -177,6 +180,7 @@ public class ThemeEditorDialog extends DialogComponentProvider {
|
||||||
}
|
}
|
||||||
colorTree.rebuild();
|
colorTree.rebuild();
|
||||||
colorTable.reloadAll();
|
colorTable.reloadAll();
|
||||||
|
paletteTable.reloadAll();
|
||||||
fontTable.reloadAll();
|
fontTable.reloadAll();
|
||||||
iconTable.reloadAll();
|
iconTable.reloadAll();
|
||||||
});
|
});
|
||||||
|
@ -233,11 +237,13 @@ public class ThemeEditorDialog extends DialogComponentProvider {
|
||||||
iconTable = new ThemeIconTable(themeManager, valuesCache);
|
iconTable = new ThemeIconTable(themeManager, valuesCache);
|
||||||
fontTable = new ThemeFontTable(themeManager, valuesCache);
|
fontTable = new ThemeFontTable(themeManager, valuesCache);
|
||||||
colorTree = new ThemeColorTree(themeManager);
|
colorTree = new ThemeColorTree(themeManager);
|
||||||
|
paletteTable = new ThemeColorPaletteTable(themeManager, valuesCache);
|
||||||
|
|
||||||
tabbedPane.add("Colors", colorTable);
|
tabbedPane.add("Colors", colorTable);
|
||||||
tabbedPane.add("Fonts", fontTable);
|
tabbedPane.add("Fonts", fontTable);
|
||||||
tabbedPane.add("Icons", iconTable);
|
tabbedPane.add("Icons", iconTable);
|
||||||
tabbedPane.add("Color Tree", colorTree);
|
tabbedPane.add("Color Tree", colorTree);
|
||||||
|
tabbedPane.add("Palette", paletteTable);
|
||||||
|
|
||||||
return tabbedPane;
|
return tabbedPane;
|
||||||
}
|
}
|
||||||
|
@ -293,6 +299,7 @@ public class ThemeEditorDialog extends DialogComponentProvider {
|
||||||
if (event.hasAnyColorChanged()) {
|
if (event.hasAnyColorChanged()) {
|
||||||
colorTable.reloadCurrent();
|
colorTable.reloadCurrent();
|
||||||
colorTree.rebuild();
|
colorTree.rebuild();
|
||||||
|
paletteTable.reloadCurrent();
|
||||||
}
|
}
|
||||||
if (event.hasAnyFontChanged()) {
|
if (event.hasAnyFontChanged()) {
|
||||||
fontTable.reloadCurrent();
|
fontTable.reloadCurrent();
|
||||||
|
@ -300,6 +307,7 @@ public class ThemeEditorDialog extends DialogComponentProvider {
|
||||||
if (event.hasAnyIconChanged()) {
|
if (event.hasAnyIconChanged()) {
|
||||||
iconTable.reloadCurrent();
|
iconTable.reloadCurrent();
|
||||||
}
|
}
|
||||||
|
|
||||||
updateButtons();
|
updateButtons();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -130,6 +130,8 @@ public abstract class ThemeValueEditor<T> {
|
||||||
panel.add(editor.getCustomEditor(), BorderLayout.CENTER);
|
panel.add(editor.getCustomEditor(), BorderLayout.CENTER);
|
||||||
|
|
||||||
editor.setValue(initialValue);
|
editor.setValue(initialValue);
|
||||||
|
storeState(); // save the initial value to the history
|
||||||
|
|
||||||
editor.addPropertyChangeListener(internalListener);
|
editor.addPropertyChangeListener(internalListener);
|
||||||
return panel;
|
return panel;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,6 +23,8 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
import docking.widgets.EmptyBorderButton;
|
import docking.widgets.EmptyBorderButton;
|
||||||
import docking.widgets.OptionDialog;
|
import docking.widgets.OptionDialog;
|
||||||
import docking.widgets.label.GDHtmlLabel;
|
import docking.widgets.label.GDHtmlLabel;
|
||||||
|
@ -106,8 +108,13 @@ public class TaskMonitorComponent extends JPanel implements TaskMonitor {
|
||||||
shouldCancelRunnable = () -> {
|
shouldCancelRunnable = () -> {
|
||||||
int currentTaskID = taskID.get();
|
int currentTaskID = taskID.get();
|
||||||
|
|
||||||
|
String trailingText = "?";
|
||||||
|
String name = getTaskName();
|
||||||
|
if (!StringUtils.isBlank(name)) {
|
||||||
|
trailingText = " " + name + "?";
|
||||||
|
}
|
||||||
boolean userSaysYes = OptionDialog.showYesNoDialog(null, "Cancel?",
|
boolean userSaysYes = OptionDialog.showYesNoDialog(null, "Cancel?",
|
||||||
"Do you really want to cancel " + getTaskName() + "?") == OptionDialog.OPTION_ONE;
|
"Do you really want to cancel" + trailingText) == OptionDialog.OPTION_ONE;
|
||||||
|
|
||||||
if (userSaysYes && currentTaskID == taskID.get()) {
|
if (userSaysYes && currentTaskID == taskID.get()) {
|
||||||
cancel();
|
cancel();
|
||||||
|
|
|
@ -2,17 +2,17 @@
|
||||||
|
|
||||||
# visual graph
|
# visual graph
|
||||||
color.bg.visualgraph = color.bg
|
color.bg.visualgraph = color.bg
|
||||||
color.bg.highlight.visualgraph = rgba(255,255,0,155) // somewhat transparent yellow
|
color.bg.highlight.visualgraph = color.palette.highlight.transparent.yellow
|
||||||
color.bg.visualgraph.message = rgb(138, 185, 241) // jordy blue
|
color.bg.visualgraph.message = color.palette.lightcornflowerblue
|
||||||
|
|
||||||
color.bg.visualgraph.drop.shadow.dark = black
|
color.bg.visualgraph.drop.shadow.dark = color.palette.black
|
||||||
color.bg.visualgraph.drop.shadow.light = gray
|
color.bg.visualgraph.drop.shadow.light = color.palette.gray
|
||||||
|
|
||||||
color.bg.visualgraph.satellite.vertex = #018786
|
color.bg.visualgraph.satellite.vertex = color.palette.darkcyan
|
||||||
|
|
||||||
color.bg.visualgraph.dockingvertex = #03DAC6
|
color.bg.visualgraph.dockingvertex = color.palette.darkcyan
|
||||||
color.fg.visualgraph.dockingvertex = black
|
color.fg.visualgraph.dockingvertex = color.palette.black
|
||||||
color.visualgraph.dockingvertex.cursor = red
|
color.visualgraph.dockingvertex.cursor = color.palette.red
|
||||||
|
|
||||||
color.visualgraph.view.primary.edge.draw = color.palette.green // draw and emphasized
|
color.visualgraph.view.primary.edge.draw = color.palette.green // draw and emphasized
|
||||||
color.visualgraph.view.primary.edge.focused = color.palette.green // when an edge is in a focused path
|
color.visualgraph.view.primary.edge.focused = color.palette.green // when an edge is in a focused path
|
||||||
|
@ -24,12 +24,10 @@ color.visualgraph.view.satellite.edge.selected = color.palette.lime
|
||||||
color.visualgraph.view.satellite.edge.hovered = color.palette.lime
|
color.visualgraph.view.satellite.edge.hovered = color.palette.lime
|
||||||
|
|
||||||
|
|
||||||
|
color.graphdisplay.vertex.default = color.palette.green
|
||||||
# graph display
|
color.graphdisplay.edge.default = color.palette.green
|
||||||
color.graphdisplay.vertex.default = green
|
color.graphdisplay.vertex.selected = color.palette.blue
|
||||||
color.graphdisplay.edge.default = green
|
color.graphdisplay.edge.selected = color.palette.blue
|
||||||
color.graphdisplay.vertex.selected = blue
|
|
||||||
color.graphdisplay.edge.selected = blue
|
|
||||||
|
|
||||||
icon.graph.satellite = network-wireless-16.png
|
icon.graph.satellite = network-wireless-16.png
|
||||||
icon.graph.satellite.large = network-wireless.png
|
icon.graph.satellite.large = network-wireless.png
|
||||||
|
@ -42,30 +40,12 @@ icon.graph.default.display.layout.algorithm = katomic.png
|
||||||
icon.graph.default.display.lasso = Lasso.png
|
icon.graph.default.display.lasso = Lasso.png
|
||||||
icon.graph.default.display.fit.to.window = view-fullscreen.png
|
icon.graph.default.display.fit.to.window = view-fullscreen.png
|
||||||
|
|
||||||
|
|
||||||
font.graphdisplay.default = dialog-bold-18
|
font.graphdisplay.default = dialog-bold-18
|
||||||
font.graph.component.message = SansSerif-BOLDITALIC-18
|
font.graph.component.message = SansSerif-BOLDITALIC-18
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[Dark Defaults]
|
[Dark Defaults]
|
||||||
|
|
||||||
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.drop.shadow.dark = black
|
|
||||||
color.bg.visualgraph.drop.shadow.light = gray
|
|
||||||
|
|
||||||
color.bg.visualgraph.satellite.vertex = #018786
|
|
||||||
|
|
||||||
color.bg.visualgraph.dockingvertex = #018786
|
|
||||||
color.fg.visualgraph.dockingvertex = black // unchanged
|
|
||||||
color.visualgraph.dockingvertex.cursor = pink // arbitrary
|
|
||||||
|
|
||||||
color.visualgraph.view.primary.edge.draw = #75CCB9 // color.palette.green // draw and emphasized
|
|
||||||
color.visualgraph.view.primary.edge.focused = #75CCB9 // color.palette.green // when an edge is in a focused path
|
|
||||||
color.visualgraph.view.primary.edge.selected = #BBFFCC // when an edge is selected
|
|
||||||
color.visualgraph.view.primary.edge.hovered = #BBFFCC // dashed lines; when an edge is in the hovered path
|
|
||||||
color.visualgraph.view.satellite.edge.draw = #75CCB9
|
|
||||||
color.visualgraph.view.satellite.edge.focused = #75CCB9
|
|
||||||
color.visualgraph.view.satellite.edge.selected = #BBFFCC
|
|
||||||
color.visualgraph.view.satellite.edge.hovered = #BBFFCC
|
|
||||||
|
|
||||||
|
|
|
@ -343,7 +343,7 @@ class ArticulatedEdgeRouter<V extends VisualVertex, E extends VisualEdge<V>>
|
||||||
return Palette.GREEN;
|
return Palette.GREEN;
|
||||||
}
|
}
|
||||||
if (isTrueEdge(edge)) {
|
if (isTrueEdge(edge)) {
|
||||||
return new GColor("color.palette.darkblue");
|
return new GColor("color.palette.navy");
|
||||||
}
|
}
|
||||||
return new GColor("color.palette.dodgerblue");
|
return new GColor("color.palette.dodgerblue");
|
||||||
}
|
}
|
||||||
|
|
|
@ -122,8 +122,7 @@ public class AbstractVisualVertexRenderer<V extends VisualVertex, E extends Visu
|
||||||
|
|
||||||
Paint oldPaint = g.getPaint();
|
Paint oldPaint = g.getPaint();
|
||||||
|
|
||||||
Color yellowWithTransparency = HIGHLIGHT_COLOR;
|
g.setPaint(HIGHLIGHT_COLOR);
|
||||||
g.setPaint(yellowWithTransparency);
|
|
||||||
|
|
||||||
int offset = 10;
|
int offset = 10;
|
||||||
|
|
||||||
|
|
|
@ -1,25 +1,27 @@
|
||||||
[Defaults]
|
[Defaults]
|
||||||
|
|
||||||
color.palette.nocolor = rgba(255,255,255,0)
|
color.palette.nocolor = rgba(255,255,255,0)
|
||||||
color.palette.disabled = rgba(255,255,255,0)
|
|
||||||
|
|
||||||
|
color.palette.error = red
|
||||||
|
color.palette.hint = gray
|
||||||
|
color.palette.highlight.transparent.yellow = rgba(255,255,0,0.5)
|
||||||
|
|
||||||
|
color.palette.aliceblue = aliceblue
|
||||||
color.palette.black = black
|
color.palette.black = black
|
||||||
color.palette.blue = blue
|
color.palette.blue = blue
|
||||||
|
color.palette.blueviolet = blueviolet
|
||||||
color.palette.cornflowerblue = cornflowerblue
|
color.palette.cornflowerblue = cornflowerblue
|
||||||
color.palette.cornsilk = cornsilk
|
color.palette.cornsilk = cornsilk
|
||||||
color.palette.crimson = crimson
|
color.palette.crimson = crimson
|
||||||
color.palette.cyan = cyan
|
color.palette.cyan = cyan
|
||||||
color.palette.darkblue = DarkBlue
|
|
||||||
color.palette.darkcyan = darkcyan
|
color.palette.darkcyan = darkcyan
|
||||||
|
color.palette.darkgray = darkgray
|
||||||
color.palette.darkgray = DarkGray
|
|
||||||
color.palette.darkgreen = darkgreen
|
color.palette.darkgreen = darkgreen
|
||||||
color.palette.darkorange = darkorange
|
color.palette.darkorange = darkorange
|
||||||
color.palette.darkkhaki = DarkKhaki
|
color.palette.darkkhaki = darkkhaki
|
||||||
color.palette.darkred = DarkRed
|
color.palette.darkred = darkred
|
||||||
color.palette.darkslategray = darkslategray
|
color.palette.darkslategray = darkslategray
|
||||||
color.palette.dodgerblue = DodgerBlue
|
color.palette.dodgerblue = dodgerblue
|
||||||
color.palette.fuchsia = fuchsia
|
|
||||||
color.palette.gold = gold
|
color.palette.gold = gold
|
||||||
color.palette.gray = gray
|
color.palette.gray = gray
|
||||||
color.palette.green = green
|
color.palette.green = green
|
||||||
|
@ -27,6 +29,7 @@ color.palette.greenyellow = greenyellow
|
||||||
color.palette.indigo = indigo
|
color.palette.indigo = indigo
|
||||||
color.palette.khaki = khaki
|
color.palette.khaki = khaki
|
||||||
color.palette.lavender = lavender
|
color.palette.lavender = lavender
|
||||||
|
color.palette.lemonchiffon = lemonchiffon
|
||||||
color.palette.lightcoral = lightcoral
|
color.palette.lightcoral = lightcoral
|
||||||
color.palette.lightgray = rgb(192, 192, 192)
|
color.palette.lightgray = rgb(192, 192, 192)
|
||||||
color.palette.lightgreen = rgb(127, 255, 127)
|
color.palette.lightgreen = rgb(127, 255, 127)
|
||||||
|
@ -43,11 +46,10 @@ color.palette.navy = navy
|
||||||
color.palette.olive = olive
|
color.palette.olive = olive
|
||||||
color.palette.orange = orange
|
color.palette.orange = orange
|
||||||
color.palette.palegreen = palegreen
|
color.palette.palegreen = palegreen
|
||||||
color.palette.palevioletred = PaleVioletRed
|
|
||||||
color.palette.peachpuff = peachpuff
|
|
||||||
color.palette.pink = pink
|
color.palette.pink = pink
|
||||||
color.palette.purple = purple
|
color.palette.purple = purple
|
||||||
color.palette.red = red
|
color.palette.red = red
|
||||||
|
color.palette.saddlebrown = saddlebrown
|
||||||
color.palette.silver = silver
|
color.palette.silver = silver
|
||||||
color.palette.slateblue = slateblue
|
color.palette.slateblue = slateblue
|
||||||
color.palette.steelblue = steelblue
|
color.palette.steelblue = steelblue
|
||||||
|
@ -57,25 +59,60 @@ color.palette.white = white
|
||||||
color.palette.yellow = yellow
|
color.palette.yellow = yellow
|
||||||
color.palette.yellowgreen = yellowgreen
|
color.palette.yellowgreen = yellowgreen
|
||||||
|
|
||||||
|
// non-standard
|
||||||
|
color.palette.lightcornflowerblue = #ABC8FF
|
||||||
|
color.palette.lightpurple = #A0A0FF
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[Dark Defaults]
|
[Dark Defaults]
|
||||||
|
|
||||||
color.palette.black = lightgray
|
color.palette.error = indianred
|
||||||
color.palette.blue = #80a0c0
|
color.palette.hint = lightslategray
|
||||||
color.palette.indigo = #c070c0
|
color.palette.highlight.transparent.yellow = rgba(255,250,205,.25)
|
||||||
color.palette.green = #70c070
|
|
||||||
|
color.palette.aliceblue = rgb(45,47,65) // dark blue gray
|
||||||
|
color.palette.black = darkgray
|
||||||
|
color.palette.blue = lightskyblue
|
||||||
|
color.palette.blueviolet = violet
|
||||||
|
color.palette.crimson = lightcoral
|
||||||
|
color.palette.cyan = cadetblue // not sure; can change
|
||||||
|
color.palette.darkgray = dimgray
|
||||||
color.palette.darkgreen = #70a070
|
color.palette.darkgreen = #70a070
|
||||||
color.palette.magenta = #ff80ff
|
color.palette.darkkhaki = olive
|
||||||
color.palette.pink = #ff80a0
|
color.palette.darkorange = orange
|
||||||
color.palette.cyan = #80c0c0
|
color.palette.darkred = salmon // not sure; can change
|
||||||
color.palette.darkcyan = #406060
|
color.palette.gray = lightslategray
|
||||||
color.palette.red = #ff8080
|
color.palette.green = #70c070
|
||||||
color.palette.teal = #80c0c0
|
color.palette.greenyellow = darkolivegreen
|
||||||
color.palette.purple = #c080c0
|
color.palette.indigo = #c070c0
|
||||||
color.palette.yellow = #ffff80
|
color.palette.khaki = tan // not sure; can change
|
||||||
|
color.palette.lavender = darkorchid
|
||||||
|
color.palette.lemonchiffon = khaki // not sure; can change
|
||||||
|
color.palette.lightcoral = #9A4B4B // between firebrick and indianred
|
||||||
|
color.palette.lightgreen = darkgreen
|
||||||
|
color.palette.lightgray = darkgray
|
||||||
|
color.palette.lightpink = indianred // not sure; can change
|
||||||
|
color.palette.lightskyblue = #065475 // not sure; need to be dark when used as a bg color
|
||||||
|
color.palette.lightsteelblue = royalblue
|
||||||
|
color.palette.lime = mediumseagreen
|
||||||
|
color.palette.magenta = plum
|
||||||
|
color.palette.maroon = lightcoral
|
||||||
|
color.palette.mistyrose = pink // not sure; can change
|
||||||
|
color.palette.navy = lightblue
|
||||||
color.palette.olive = #c0c080
|
color.palette.olive = #c0c080
|
||||||
color.palette.orange = #ffa070
|
color.palette.orange = #ffa070
|
||||||
color.palette.darkorange = orange
|
color.palette.palegreen = darkslategray
|
||||||
|
color.palette.pink = #ff80a0
|
||||||
|
color.palette.purple = mediumpurple
|
||||||
|
color.palette.red = indianred
|
||||||
|
color.palette.saddlebrown = burlywood // not sure; can change
|
||||||
|
color.palette.silver = dimgray // not sure; this may need to be darker
|
||||||
|
color.palette.tan = #635542 // less saturated tan
|
||||||
|
color.palette.teal = mediumseagreen
|
||||||
|
color.palette.yellow = mocassin
|
||||||
|
|
||||||
|
// non-standard
|
||||||
|
color.palette.lightcornflowerblue = cornflowerblue
|
||||||
|
color.palette.lightpurple = #805080 // low saturation purple
|
||||||
|
|
||||||
|
|
|
@ -4,46 +4,43 @@
|
||||||
color.bg = [color]system.color.bg.view
|
color.bg = [color]system.color.bg.view
|
||||||
color.fg = [color]system.color.fg.view
|
color.fg = [color]system.color.fg.view
|
||||||
|
|
||||||
// On some LaFs the tables and tree use the bg color we define. Make that consistent for all LaFs.
|
// On some LaFs the tables and trees use the bg color we define. Make that consistent for all LaFs.
|
||||||
[color]Viewport.background = color.bg
|
[color]Viewport.background = color.bg
|
||||||
|
|
||||||
color.cursor.focused = red
|
color.fg.error = color.palette.red
|
||||||
color.cursor.unfocused = pink
|
color.fg.disabled = color.palette.lightgray
|
||||||
|
|
||||||
color.fg.error = red
|
|
||||||
color.bg.error = lightcoral
|
|
||||||
color.fg.disabled = lightGray
|
|
||||||
color.bg.uneditable = [color]system.color.bg.control
|
color.bg.uneditable = [color]system.color.bg.control
|
||||||
color.bg.filtered = yellow
|
|
||||||
color.fg.hint = gray
|
|
||||||
|
|
||||||
color.fg.messages.hint = color.fg.hint
|
color.fg.messages.hint = color.palette.hint
|
||||||
color.fg.messages.alert = orange
|
color.fg.messages.alert = color.palette.orange
|
||||||
color.fg.messages.error = color.fg.error
|
color.fg.messages.error = color.fg.error
|
||||||
color.fg.messages.normal = blue
|
color.fg.messages.normal = color.palette.blue
|
||||||
color.fg.messages.warning = orange
|
color.fg.messages.warning = color.palette.orange
|
||||||
|
|
||||||
color.bg.table.grid = gray
|
color.cursor.focused = color.palette.red
|
||||||
|
color.cursor.unfocused = color.palette.pink
|
||||||
|
|
||||||
|
color.bg.table.grid = color.palette.gray
|
||||||
color.bg.table.row.drag = color.palette.lavender
|
color.bg.table.row.drag = color.palette.lavender
|
||||||
color.bg.table.row = color.bg
|
color.bg.table.row = color.bg
|
||||||
color.bg.table.row.alt = rgb(237,243,254)
|
color.bg.table.row.alt = color.palette.aliceblue
|
||||||
color.fg.table.uneditable.selected = yellow
|
color.fg.table.uneditable.selected = color.palette.yellow
|
||||||
color.fg.table.uneditable.unselected = lightgray
|
color.fg.table.uneditable.unselected = color.palette.lightgray
|
||||||
color.fg.table = color.fg
|
|
||||||
color.fg.table.unselected = white
|
|
||||||
color.fg.error.table.unselected = color.fg.error
|
color.fg.error.table.unselected = color.fg.error
|
||||||
color.fg.error.table.selected = lightpink
|
color.fg.error.table.selected = color.palette.lightpink
|
||||||
|
|
||||||
color.bg.tree = [color]system.color.bg.view
|
color.bg.tree = [color]system.color.bg.view
|
||||||
|
color.bg.tree.drag = color.palette.lavender
|
||||||
color.bg.tree.selected = [color]system.color.bg.selected.view
|
color.bg.tree.selected = [color]system.color.bg.selected.view
|
||||||
color.fg.tree.selected = [color]system.color.fg.selected.view
|
color.fg.tree.selected = [color]system.color.fg.selected.view
|
||||||
|
|
||||||
|
|
||||||
// Fonts
|
// Fonts
|
||||||
font.standard = [font]system.font.control
|
font.standard = [font]system.font.control
|
||||||
font.monospaced = monospaced-PLAIN-12
|
font.monospaced = monospaced-PLAIN-12
|
||||||
|
|
||||||
// Icons files
|
|
||||||
|
|
||||||
|
// Icons files
|
||||||
icon.flag = flag.png
|
icon.flag = flag.png
|
||||||
icon.lock = kgpg.png
|
icon.lock = kgpg.png
|
||||||
icon.checkmark.green = checkmark_green.gif
|
icon.checkmark.green = checkmark_green.gif
|
||||||
|
@ -103,23 +100,9 @@ icon.arrow.up.left = viewmagfit.png[rotate(275)]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[Dark Defaults]
|
[Dark Defaults]
|
||||||
|
|
||||||
color.fg.error = indianRed
|
color.cursor.unfocused = color.palette.darkgray
|
||||||
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]laf.color.Tree.selectionBackground
|
|
||||||
|
|
||||||
// this looks different than the light mode version; good enough until we make a better icon
|
// this looks different than the light mode version; good enough until we make a better icon
|
||||||
icon.make.selection = stack.png
|
icon.make.selection = stack.png
|
||||||
|
|
|
@ -73,9 +73,6 @@ public class ApplicationThemeManager extends ThemeManager {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void restoreThemeValues() {
|
public void restoreThemeValues() {
|
||||||
if (activeLafType != activeTheme.getLookAndFeelType()) {
|
|
||||||
setLookAndFeel(activeTheme.getLookAndFeelType(), activeTheme.useDarkDefaults());
|
|
||||||
}
|
|
||||||
applicationDefaults = getApplicationDefaults();
|
applicationDefaults = getApplicationDefaults();
|
||||||
buildCurrentValues();
|
buildCurrentValues();
|
||||||
lookAndFeelManager.resetAll(javaDefaults);
|
lookAndFeelManager.resetAll(javaDefaults);
|
||||||
|
@ -145,6 +142,7 @@ public class ApplicationThemeManager extends ThemeManager {
|
||||||
Msg.error(this, "Attempted to set unsupported Look and Feel: " + lafType);
|
Msg.error(this, "Attempted to set unsupported Look and Feel: " + lafType);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.activeLafType = lafType;
|
this.activeLafType = lafType;
|
||||||
this.useDarkDefaults = useDarkDefaults;
|
this.useDarkDefaults = useDarkDefaults;
|
||||||
|
|
||||||
|
|
|
@ -98,7 +98,7 @@ public class ColorValue extends ThemeValue<Color> {
|
||||||
@Override
|
@Override
|
||||||
protected Color getUnresolvedReferenceValue(String primaryId, String unresolvedId) {
|
protected Color getUnresolvedReferenceValue(String primaryId, String unresolvedId) {
|
||||||
|
|
||||||
Throwable t = ReflectionUtilities.createThrowableWithStackOlderThan();
|
Throwable t = ReflectionUtilities.createThrowableWithStackOlderThan(getClass());
|
||||||
StackTraceElement[] trace = t.getStackTrace();
|
StackTraceElement[] trace = t.getStackTrace();
|
||||||
StackTraceElement[] filtered =
|
StackTraceElement[] filtered =
|
||||||
ReflectionUtilities.filterStackTrace(trace, "docking.theme", "classfinder",
|
ReflectionUtilities.filterStackTrace(trace, "docking.theme", "classfinder",
|
||||||
|
|
|
@ -55,7 +55,6 @@ public class GThemeDefaults {
|
||||||
// generic color concepts
|
// generic color concepts
|
||||||
public static final GColor BACKGROUND = new GColor("color.bg");
|
public static final GColor BACKGROUND = new GColor("color.bg");
|
||||||
public static final GColor CURSOR = new GColor("color.cursor.focused");
|
public static final GColor CURSOR = new GColor("color.cursor.focused");
|
||||||
public static final GColor DISABLED = new GColor("color.palette.disabled");
|
|
||||||
public static final GColor ERROR = new GColor("color.fg.error");
|
public static final GColor ERROR = new GColor("color.fg.error");
|
||||||
public static final GColor FOREGROUND = new GColor("color.fg");
|
public static final GColor FOREGROUND = new GColor("color.fg");
|
||||||
public static final GColor FOREGROUND_DISABLED = new GColor("color.fg.disabled");
|
public static final GColor FOREGROUND_DISABLED = new GColor("color.fg.disabled");
|
||||||
|
@ -71,8 +70,6 @@ public class GThemeDefaults {
|
||||||
public static final GColor FG_ERROR_UNSELECTED = new GColor("color.fg.error.table.unselected");
|
public static final GColor FG_ERROR_UNSELECTED = new GColor("color.fg.error.table.unselected");
|
||||||
public static final GColor FG_UNEDITABLE_SELECTED = new GColor("color.fg.table.uneditable.selected");
|
public static final GColor FG_UNEDITABLE_SELECTED = new GColor("color.fg.table.uneditable.selected");
|
||||||
public static final GColor FG_UNEDITABLE_UNSELECTED = new GColor("color.fg.table.uneditable.unselected");
|
public static final GColor FG_UNEDITABLE_UNSELECTED = new GColor("color.fg.table.uneditable.unselected");
|
||||||
public static final GColor FG_UNSELECTED = new GColor("color.fg.table");
|
|
||||||
public static final GColor FG_SELECTED = new GColor("color.fg.table.unselected");
|
|
||||||
//@formatter:on
|
//@formatter:on
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -570,7 +570,7 @@ public abstract class ThemeManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void error(String message) {
|
protected void error(String message) {
|
||||||
Throwable t = ReflectionUtilities.createThrowableWithStackOlderThan();
|
Throwable t = ReflectionUtilities.createThrowableWithStackOlderThan(getClass());
|
||||||
StackTraceElement[] trace = t.getStackTrace();
|
StackTraceElement[] trace = t.getStackTrace();
|
||||||
StackTraceElement[] filtered = ReflectionUtilities.filterStackTrace(trace, "java.",
|
StackTraceElement[] filtered = ReflectionUtilities.filterStackTrace(trace, "java.",
|
||||||
"theme.Gui", "theme.ThemeManager", "theme.GColor");
|
"theme.Gui", "theme.ThemeManager", "theme.GColor");
|
||||||
|
|
|
@ -228,13 +228,12 @@ public class UiDefaultsMapper {
|
||||||
protected void assignSystemColorValues() {
|
protected void assignSystemColorValues() {
|
||||||
// Originally, these values were assigned to the corresponding concepts as defined
|
// Originally, these values were assigned to the corresponding concepts as defined
|
||||||
// in the BasicLookAndFeel such as "control", "text", etc. Unfortunately, those
|
// in the BasicLookAndFeel such as "control", "text", etc. Unfortunately, those
|
||||||
// conventions are rarely used by specific
|
// conventions are rarely used by specific look and feels. It was discovered that using a
|
||||||
// look and feels and most look and feels needed to override this method and put in
|
// representative component value worked much better. So each Look and Feel was examined and
|
||||||
// different values. However, it was discovered that using a representative component
|
// those component values chosen here are the ones that seemed to work for the most look and
|
||||||
// value worked much better. So each Look and Feel was examined and those component values
|
// feels. If a specific look and feel needs different values, this class is designed to be
|
||||||
// chosen here are the ones that seemed to work for the most look and feels. If a
|
// subclassed where the values can be overridden. See the NimbusUiDefaultsMapper as an
|
||||||
// specific look and feel needs different values, this class is designed to be subclassed
|
// example.
|
||||||
// where the values can be overridden. See the NimbusUiDefaultsMapper as an example.
|
|
||||||
|
|
||||||
assignSystemColorFromLafId(BG_CONTROL_ID, "Button.background");
|
assignSystemColorFromLafId(BG_CONTROL_ID, "Button.background");
|
||||||
assignSystemColorFromLafId(FG_CONTROL_ID, "Button.foreground");
|
assignSystemColorFromLafId(FG_CONTROL_ID, "Button.foreground");
|
||||||
|
|
|
@ -223,12 +223,12 @@ public class ColorUtils {
|
||||||
|
|
||||||
private static int combineDarker(int primary, int secondary) {
|
private static int combineDarker(int primary, int secondary) {
|
||||||
int nudge = Math.min(MAX_COLOR_VALUE - secondary, MAX_NUDGE);
|
int nudge = Math.min(MAX_COLOR_VALUE - secondary, MAX_NUDGE);
|
||||||
return primary - nudge;
|
return Math.max(primary - nudge, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int combineBrighter(int primary, int secondary) {
|
private static int combineBrighter(int primary, int secondary) {
|
||||||
int nudge = Math.min(secondary, MAX_NUDGE);
|
int nudge = Math.min(secondary, MAX_NUDGE);
|
||||||
return primary + nudge;
|
return Math.max(primary + nudge, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean isBright(Color color) {
|
private static boolean isBright(Color color) {
|
||||||
|
@ -264,7 +264,7 @@ public class ColorUtils {
|
||||||
/**
|
/**
|
||||||
* A color {@link Comparator} for ordering colors.
|
* A color {@link Comparator} for ordering colors.
|
||||||
*/
|
*/
|
||||||
public static Comparator<Color> COMPARATOR = new Comparator<Color>() {
|
public static Comparator<Color> COMPARATOR = new Comparator<>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int compare(Color c1, Color c2) {
|
public int compare(Color c1, Color c2) {
|
||||||
|
|
|
@ -221,6 +221,19 @@ public abstract class WebColors {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return toHexString(color);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String toColorName(Color color) {
|
||||||
|
return colorToNameMap.get(color.getRGB());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the hex value string for the given color
|
||||||
|
* @param color the color
|
||||||
|
* @return the string
|
||||||
|
*/
|
||||||
|
public static String toHexString(Color color) {
|
||||||
int rgb = color.getRGB() & 0xffffff; //mask off any alpha value
|
int rgb = color.getRGB() & 0xffffff; //mask off any alpha value
|
||||||
int alpha = color.getAlpha();
|
int alpha = color.getAlpha();
|
||||||
if (alpha != 0xff) {
|
if (alpha != 0xff) {
|
||||||
|
@ -229,6 +242,25 @@ public abstract class WebColors {
|
||||||
return String.format("#%06x", rgb);
|
return String.format("#%06x", rgb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the rgb value string for the given color
|
||||||
|
* @param color the color
|
||||||
|
* @return the string
|
||||||
|
*/
|
||||||
|
public static String toRgbString(Color color) {
|
||||||
|
int r = color.getRed();
|
||||||
|
int g = color.getGreen();
|
||||||
|
int b = color.getBlue();
|
||||||
|
int a = color.getAlpha();
|
||||||
|
|
||||||
|
String rgb = r + "," + g + "," + b;
|
||||||
|
|
||||||
|
if (a != 0xff) {
|
||||||
|
return "rgba(" + rgb + "," + a + ")";
|
||||||
|
}
|
||||||
|
return "rgb(" + rgb + ")";
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the WebColor name for the given color. Returns null if the color is not a WebColor
|
* Returns the WebColor name for the given color. Returns null if the color is not a WebColor
|
||||||
* @param color the color to lookup a WebColor name.
|
* @param color the color to lookup a WebColor name.
|
||||||
|
@ -279,10 +311,11 @@ public abstract class WebColors {
|
||||||
if (colorString.startsWith("#") || colorString.startsWith("0x")) {
|
if (colorString.startsWith("#") || colorString.startsWith("0x")) {
|
||||||
return parseHexColor(colorString);
|
return parseHexColor(colorString);
|
||||||
}
|
}
|
||||||
if (colorString.startsWith("rgb(")) {
|
|
||||||
return parseRGBColor(colorString);
|
if (colorString.startsWith("rgba(")) {
|
||||||
|
return parseRgbaColor(colorString);
|
||||||
}
|
}
|
||||||
return parseRGBAColor(colorString);
|
return parseRgbColor(colorString);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -343,13 +376,13 @@ public abstract class WebColors {
|
||||||
* @param rgbString the string to parse into a color.
|
* @param rgbString the string to parse into a color.
|
||||||
* @return the parsed Color or null if the input string was invalid.
|
* @return the parsed Color or null if the input string was invalid.
|
||||||
*/
|
*/
|
||||||
private static Color parseRGBColor(String rgbString) {
|
private static Color parseRgbColor(String rgbString) {
|
||||||
String value = rgbString.trim().replaceAll(" ", "");
|
String value = rgbString.trim().replaceAll(" ", "");
|
||||||
if (!(value.startsWith("rgb(") && value.endsWith(")"))) {
|
if (value.startsWith("rgb(") && value.endsWith(")")) {
|
||||||
return null;
|
value = value.substring(4, value.length() - 1);
|
||||||
}
|
}
|
||||||
// strip off to comma separated values
|
|
||||||
value = value.substring(4, value.length() - 1);
|
// strip off to comma separated values
|
||||||
String[] split = value.split(",");
|
String[] split = value.split(",");
|
||||||
if (split.length != 3) {
|
if (split.length != 3) {
|
||||||
return null;
|
return null;
|
||||||
|
@ -365,13 +398,13 @@ public abstract class WebColors {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Color parseRGBAColor(String rgbaString) {
|
private static Color parseRgbaColor(String rgbaString) {
|
||||||
String value = rgbaString.replaceAll(" ", "");
|
String value = rgbaString.replaceAll(" ", "");
|
||||||
if (!(value.startsWith("rgba(") && value.endsWith(")"))) {
|
if (value.startsWith("rgba(") && value.endsWith(")")) {
|
||||||
return null;
|
value = value.substring(5, value.length() - 1);
|
||||||
}
|
}
|
||||||
// strip off to comma separated values
|
|
||||||
value = value.substring(5, value.length() - 1);
|
// strip off to comma separated values
|
||||||
value = value.replaceAll(" ", "");
|
value = value.replaceAll(" ", "");
|
||||||
String[] split = value.split(",");
|
String[] split = value.split(",");
|
||||||
if (split.length != 4) {
|
if (split.length != 4) {
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
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|
|
data/help.theme.properties||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|
|
||||||
src/main/resources/help/shared/note.yellow.png||Oxygen Icons - LGPL 3.0|||Oxygen icon theme (dual license; LGPL or CC-SA-3.0)|END|
|
src/main/resources/help/shared/note.yellow.png||Oxygen Icons - LGPL 3.0|||Oxygen icon theme (dual license; LGPL or CC-SA-3.0)|END|
|
||||||
|
|
|
@ -1,27 +1,18 @@
|
||||||
[Defaults]
|
[Defaults]
|
||||||
|
|
||||||
|
|
||||||
color.bg.help.hint = rgba(100, 100, 255, 100)
|
color.bg.help.hint = color.palette.cornflowerblue
|
||||||
color.fg.help.selector.h1 = #000080
|
color.fg.help.selector.h1 = color.palette.navy
|
||||||
color.fg.help.selector.h2 = #984C4C
|
color.fg.help.selector.h2 = color.palette.darkred
|
||||||
color.fg.help.selector.h3 = #0000FF
|
color.fg.help.selector.h3 = color.palette.blue
|
||||||
color.fg.help.selector.p.provided.by.plugin = #7F7F7F
|
color.fg.help.selector.p.provided.by.plugin = color.palette.gray
|
||||||
color.fg.help.selector.p.related.topic = #800080
|
color.fg.help.selector.p.related.topic = color.palette.purple
|
||||||
color.fg.help.selector.th = #EDF3FE
|
color.fg.help.selector.th = color.palette.aliceblue
|
||||||
color.fg.help.selector.code = black
|
color.fg.help.selector.code = color.palette.black
|
||||||
color.fg.help.selector.code.path = #4682B4
|
color.fg.help.selector.code.path = color.palette.steelblue
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[Dark Defaults]
|
[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 = #9370DB
|
|
||||||
color.fg.help.selector.th = #EDF3FE
|
|
||||||
color.fg.help.selector.code = gray
|
|
||||||
color.fg.help.selector.code.path = #5BA5E3
|
|
|
@ -19,7 +19,6 @@ src/main/java/ghidra/framework/plugintool/package.html||GHIDRA||||END|
|
||||||
src/main/java/ghidra/framework/plugintool/util/package.html||GHIDRA||||END|
|
src/main/java/ghidra/framework/plugintool/util/package.html||GHIDRA||||END|
|
||||||
src/main/java/ghidra/framework/project/package.html||GHIDRA||||END|
|
src/main/java/ghidra/framework/project/package.html||GHIDRA||||END|
|
||||||
src/main/java/ghidra/framework/project/tool/package.html||GHIDRA||||END|
|
src/main/java/ghidra/framework/project/tool/package.html||GHIDRA||||END|
|
||||||
src/main/resources/images/Minus.png||GHIDRA||||END|
|
|
||||||
src/main/resources/images/applications-development-web.png||Oxygen Icons - LGPL 3.0|||Oxygen icon theme (dual license; LGPL or CC-SA-3.0)|END|
|
src/main/resources/images/applications-development-web.png||Oxygen Icons - LGPL 3.0|||Oxygen icon theme (dual license; LGPL or CC-SA-3.0)|END|
|
||||||
src/main/resources/images/applications-science.png||Oxygen Icons - LGPL 3.0||||END|
|
src/main/resources/images/applications-science.png||Oxygen Icons - LGPL 3.0||||END|
|
||||||
src/main/resources/images/checkNotLatest.gif||GHIDRA||reviewed||END|
|
src/main/resources/images/checkNotLatest.gif||GHIDRA||reviewed||END|
|
||||||
|
|
|
@ -1,45 +1,44 @@
|
||||||
[Defaults]
|
[Defaults]
|
||||||
|
|
||||||
color.fg.extensionpanel.details.author = blue
|
color.fg.extensionpanel.details.author = color.palette.blue
|
||||||
color.fg.extensionpanel.details.date = blue
|
color.fg.extensionpanel.details.date = color.palette.blue
|
||||||
color.fg.extensionpanel.details.description = blue
|
color.fg.extensionpanel.details.description = color.palette.blue
|
||||||
color.fg.extensionpanel.details.name = rgb(0, 204, 51)
|
color.fg.extensionpanel.details.name = color.palette.limegreen
|
||||||
color.fg.extensionpanel.path = blue
|
color.fg.extensionpanel.path = color.palette.blue
|
||||||
color.fg.extensionpanel.details.title = rgb(140, 0, 0)
|
color.fg.extensionpanel.details.title = color.palette.maroon
|
||||||
color.fg.extensionpanel.details.version = blue
|
color.fg.extensionpanel.details.version = color.palette.blue
|
||||||
|
|
||||||
color.fg.pluginpanel.name = color.fg
|
color.fg.pluginpanel.name = color.fg
|
||||||
color.fg.pluginpanel.description = gray
|
color.fg.pluginpanel.description = color.palette.gray
|
||||||
|
|
||||||
color.bg.panel.details = color.bg
|
color.bg.panel.details = color.bg
|
||||||
color.fg.pluginpanel.details.title = maroon
|
color.fg.pluginpanel.details.title = color.palette.maroon
|
||||||
color.fg.pluginpanel.details.name.no.dependents = limeGreen
|
color.fg.pluginpanel.details.name.no.dependents = color.palette.limegreen
|
||||||
color.fg.pluginpanel.details.name.has.dependents = red
|
color.fg.pluginpanel.details.name.has.dependents = color.palette.red
|
||||||
color.fg.pluginpanel.details.description = blue
|
color.fg.pluginpanel.details.description = color.palette.blue
|
||||||
color.fg.pluginpanel.details.category = magenta
|
color.fg.pluginpanel.details.category = color.palette.magenta
|
||||||
color.fg.pluginpanel.details.class = black
|
color.fg.pluginpanel.details.class = color.palette.black
|
||||||
color.fg.pluginpanel.details.loc = darkGray
|
color.fg.pluginpanel.details.loc = color.palette.darkgray
|
||||||
color.fg.pluginpanel.details.developer =mediumVioletRed
|
color.fg.pluginpanel.details.developer = color.palette.magenta
|
||||||
color.fg.pluginpanel.details.dependency = green
|
color.fg.pluginpanel.details.dependency = color.palette.green
|
||||||
color.fg.pluginpanel.details.novalue = lightGray
|
color.fg.pluginpanel.details.novalue = color.palette.lightgray
|
||||||
|
|
||||||
color.fg.plugin.installer.table.has.dependents = red
|
color.fg.plugin.installer.table.has.dependents = color.palette.red
|
||||||
color.fg.plugin.installer.table.has.dependents.selected = pink
|
color.fg.plugin.installer.table.has.dependents.selected = color.palette.pink
|
||||||
|
|
||||||
color.bg.ghidra.file.data.version.icon.dark = #8282FF
|
color.bg.icon.versioned = color.palette.lightskyblue
|
||||||
color.bg.ghidra.file.data.version.icon.light = #9F9FFF
|
|
||||||
|
|
||||||
color.bg.logviwer.table.debug = rgb(135, 191, 212)
|
color.bg.logviwer.table.debug = color.palette.lightcornflowerblue
|
||||||
color.bg.logviwer.table.error = red
|
color.bg.logviwer.table.error = color.palette.red
|
||||||
color.bg.logviwer.table.fatal = firebrick
|
color.bg.logviwer.table.fatal = color.palette.darkred
|
||||||
color.bg.logviwer.table.info = rgb(225, 225, 225)
|
color.bg.logviwer.table.info = color.palette.lightgray
|
||||||
color.bg.logviwer.table.trace = white
|
color.bg.logviwer.table.trace = color.palette.white
|
||||||
color.bg.logviwer.table.warn = rgb(255, 236, 50)
|
color.bg.logviwer.table.warn = color.palette.yellow
|
||||||
color.fg.logviewer.table = black
|
color.fg.logviewer.table = color.palette.black
|
||||||
color.fg.logviewer.table.selected = black
|
color.fg.logviewer.table.selected = color.palette.black
|
||||||
|
|
||||||
color.bg.project.access.panel.table.selection = lavender
|
color.bg.project.access.panel.table.selection = color.palette.lavender
|
||||||
color.fg.project.access.panel.table.selection = black
|
color.fg.project.access.panel.table.selection = color.palette.black
|
||||||
|
|
||||||
icon.domain.file.uknown = unknownFile.gif
|
icon.domain.file.uknown = unknownFile.gif
|
||||||
|
|
||||||
|
@ -87,22 +86,11 @@ font.keybindings.status = sansserif-plain-11
|
||||||
font.task.viewer = sansserif-bold-36
|
font.task.viewer = sansserif-bold-36
|
||||||
font.user.agreement = sansserif-plain-16
|
font.user.agreement = sansserif-plain-16
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[Dark Defaults]
|
[Dark Defaults]
|
||||||
|
|
||||||
|
// This is an icon bg color which needs to be light in dark mode in order to be seen on the dark
|
||||||
color.fg.pluginpanel.name = #d3d3d3 // LightGray
|
// background. The palette color 'blue' will be converted to a light color in dark mode.
|
||||||
color.fg.pluginpanel.description = #808080 // Gray
|
color.bg.icon.versioned = color.palette.blue
|
||||||
|
|
||||||
color.fg.pluginpanel.details.category = #d361d3
|
|
||||||
color.fg.pluginpanel.details.class = #808080 // Gray
|
|
||||||
color.fg.pluginpanel.details.dependency = #228b22 // ForestGreen
|
|
||||||
color.fg.pluginpanel.details.description = #aaaaff
|
|
||||||
color.fg.pluginpanel.details.developer = #c71585 // MediumVioletRed
|
|
||||||
color.fg.pluginpanel.details.loc = #a9a9a9 // DarkGray
|
|
||||||
color.fg.pluginpanel.details.name.has.dependents = #cd939f
|
|
||||||
color.fg.pluginpanel.details.name.no.dependents = #66ff66
|
|
||||||
color.fg.pluginpanel.details.novalue = #999900
|
|
||||||
color.fg.pluginpanel.details.title = #cd939f
|
|
||||||
|
|
||||||
color.fg.plugin.installer.table.has.dependents = #FF66FF
|
|
||||||
color.fg.plugin.installer.table.has.dependents.selected = #FF99CC
|
|
|
@ -1888,10 +1888,7 @@ public class GhidraFileData {
|
||||||
|
|
||||||
class VersionIcon implements Icon {
|
class VersionIcon implements Icon {
|
||||||
|
|
||||||
private static Color VERSION_ICON_COLOR_DARK =
|
private static Color VERSION_ICON_COLOR = new GColor("color.bg.icon.versioned");
|
||||||
new GColor("color.bg.ghidra.file.data.version.icon.dark");
|
|
||||||
private static Color VERSION_ICON_COLOR_LIGHT =
|
|
||||||
new GColor("color.bg.ghidra.file.data.version.icon.light");
|
|
||||||
|
|
||||||
private static final int WIDTH = GhidraFileData.ICON_WIDTH;
|
private static final int WIDTH = GhidraFileData.ICON_WIDTH;
|
||||||
private static final int HEIGHT = GhidraFileData.ICON_HEIGHT;
|
private static final int HEIGHT = GhidraFileData.ICON_HEIGHT;
|
||||||
|
@ -1908,9 +1905,8 @@ class VersionIcon implements Icon {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void paintIcon(Component c, Graphics g, int x, int y) {
|
public void paintIcon(Component c, Graphics g, int x, int y) {
|
||||||
g.setColor(VERSION_ICON_COLOR_LIGHT);
|
g.setColor(VERSION_ICON_COLOR);
|
||||||
g.fillRect(x + 1, y + 1, WIDTH - 2, HEIGHT - 2);
|
g.fillRect(x + 1, y + 1, WIDTH - 2, HEIGHT - 2);
|
||||||
g.setColor(VERSION_ICON_COLOR_DARK);
|
|
||||||
g.drawLine(x + 1, y, x + WIDTH - 2, y);
|
g.drawLine(x + 1, y, x + WIDTH - 2, y);
|
||||||
g.drawLine(x + WIDTH - 1, y + 1, x + WIDTH - 1, y + HEIGHT - 2);
|
g.drawLine(x + WIDTH - 1, y + 1, x + WIDTH - 1, y + HEIGHT - 2);
|
||||||
g.drawLine(x + 1, y + HEIGHT - 1, x + WIDTH - 2, y + HEIGHT - 1);
|
g.drawLine(x + 1, y + HEIGHT - 1, x + WIDTH - 2, y + HEIGHT - 1);
|
||||||
|
|
|
@ -415,10 +415,7 @@ class ExtensionTableModel extends ThreadedTableModel<ExtensionDetails, Object> {
|
||||||
Component comp = super.getTableCellRendererComponent(data);
|
Component comp = super.getTableCellRendererComponent(data);
|
||||||
|
|
||||||
ExtensionDetails extension = getSelectedExtension(data.getRowViewIndex());
|
ExtensionDetails extension = getSelectedExtension(data.getRowViewIndex());
|
||||||
if (isValidVersion(extension) || SystemUtilities.isInDevelopmentMode()) {
|
if (!isValidVersion(extension)) {
|
||||||
comp.setForeground(data.isSelected() ? Tables.FG_SELECTED : Tables.FG_UNSELECTED);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
comp.setForeground(
|
comp.setForeground(
|
||||||
data.isSelected() ? Tables.FG_ERROR_SELECTED : Tables.FG_ERROR_UNSELECTED);
|
data.isSelected() ? Tables.FG_ERROR_SELECTED : Tables.FG_ERROR_UNSELECTED);
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@ import generic.theme.GThemeDefaults.Colors.Palette;
|
||||||
|
|
||||||
protected static final Color YELLOW_ORANGE = Palette.getColor("darkkhaki");
|
protected static final Color YELLOW_ORANGE = Palette.getColor("darkkhaki");
|
||||||
protected static final Color BLUE_GREEN = Palette.GREEN;
|
protected static final Color BLUE_GREEN = Palette.GREEN;
|
||||||
protected static final Color DARK_BLUE = Palette.getColor("navy");
|
protected static final Color NAVY = Palette.getColor("navy");
|
||||||
protected static final Color DARK_GREEN = Palette.getColor("darkgreen");
|
protected static final Color DARK_GREEN = Palette.getColor("darkgreen");
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -42,35 +42,35 @@ public class AutoAnalysisPluginScreenShots extends GhidraScreenShotGenerator {
|
||||||
@Test
|
@Test
|
||||||
public void testAutoAnalysis() {
|
public void testAutoAnalysis() {
|
||||||
Color darkGreen = Palette.GREEN;
|
Color darkGreen = Palette.GREEN;
|
||||||
Color darkBlue = Palette.getColor("darkblue");
|
Color navy = Palette.getColor("navy");
|
||||||
image = new BufferedImage(700, 400, BufferedImage.TYPE_INT_ARGB);
|
image = new BufferedImage(700, 400, BufferedImage.TYPE_INT_ARGB);
|
||||||
Graphics g = image.getGraphics();
|
Graphics g = image.getGraphics();
|
||||||
g.setColor(Colors.BACKGROUND);
|
g.setColor(Colors.BACKGROUND);
|
||||||
g.fillRect(0, 0, 700, 400);
|
g.fillRect(0, 0, 700, 400);
|
||||||
|
|
||||||
drawText("(1) User Disassembles Code", Colors.FOREGROUND, new Point(160, 30), 24);
|
drawText("(1) User Disassembles Code", Colors.FOREGROUND, new Point(160, 30), 24);
|
||||||
drawArrow(darkBlue, new Point(325, 35), new Point(325, 70));
|
drawArrow(navy, new Point(325, 35), new Point(325, 70));
|
||||||
drawText("(new code)", darkGreen, new Point(270, 90), 24);
|
drawText("(new code)", darkGreen, new Point(270, 90), 24);
|
||||||
|
|
||||||
drawText("(2) Function Analyzer", Colors.FOREGROUND, new Point(0, 150), 24);
|
drawText("(2) Function Analyzer", Colors.FOREGROUND, new Point(0, 150), 24);
|
||||||
drawArrow(darkBlue, new Point(265, 82), new Point(180, 120));
|
drawArrow(navy, new Point(265, 82), new Point(180, 120));
|
||||||
drawText("(new function)", darkGreen, new Point(100, 190), 24);
|
drawText("(new function)", darkGreen, new Point(100, 190), 24);
|
||||||
|
|
||||||
drawText("(3) Stack Analyzer", Colors.FOREGROUND, new Point(10, 230), 24);
|
drawText("(3) Stack Analyzer", Colors.FOREGROUND, new Point(10, 230), 24);
|
||||||
drawArrow(darkBlue, new Point(50, 155), new Point(50, 205));
|
drawArrow(navy, new Point(50, 155), new Point(50, 205));
|
||||||
|
|
||||||
drawText("(4) Operand Analyzer", Colors.FOREGROUND, new Point(180, 290), 24);
|
drawText("(4) Operand Analyzer", Colors.FOREGROUND, new Point(180, 290), 24);
|
||||||
drawArrow(darkBlue, new Point(300, 94), new Point(300, 260));
|
drawArrow(navy, new Point(300, 94), new Point(300, 260));
|
||||||
drawText("(5) Data Reference Analyzer", Colors.FOREGROUND, new Point(280, 350), 24);
|
drawText("(5) Data Reference Analyzer", Colors.FOREGROUND, new Point(280, 350), 24);
|
||||||
drawArrow(darkBlue, new Point(350, 94), new Point(490, 325));
|
drawArrow(navy, new Point(350, 94), new Point(490, 325));
|
||||||
|
|
||||||
Point p1 = new Point(447, 355);
|
Point p1 = new Point(447, 355);
|
||||||
Point p2 = new Point(447, 395);
|
Point p2 = new Point(447, 395);
|
||||||
Point p3 = new Point(690, 395);
|
Point p3 = new Point(690, 395);
|
||||||
|
|
||||||
drawLine(darkBlue, 3, p1, p2);
|
drawLine(navy, 3, p1, p2);
|
||||||
drawLine(darkBlue, 3, p2, p3);
|
drawLine(navy, 3, p2, p3);
|
||||||
drawArrow(darkBlue, p3, new Point(404, 88));
|
drawArrow(navy, p3, new Point(404, 88));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -30,7 +30,7 @@ import ghidra.app.plugin.core.datamgr.DataTypesProvider;
|
||||||
import ghidra.app.plugin.core.programtree.ViewManagerComponentProvider;
|
import ghidra.app.plugin.core.programtree.ViewManagerComponentProvider;
|
||||||
|
|
||||||
public class DecompilePluginScreenShots extends GhidraScreenShotGenerator {
|
public class DecompilePluginScreenShots extends GhidraScreenShotGenerator {
|
||||||
private static final Color DARK_BLUE = Palette.getColor("navy");
|
private static final Color NAVY = Palette.getColor("navy");
|
||||||
private static final Color DARK_GREEN = Palette.GREEN;
|
private static final Color DARK_GREEN = Palette.GREEN;
|
||||||
private static final Color YELLOW_ORANGE = Palette.getColor("darkkhaki");
|
private static final Color YELLOW_ORANGE = Palette.getColor("darkkhaki");
|
||||||
private static final Color PURPLE = Palette.PURPLE;
|
private static final Color PURPLE = Palette.PURPLE;
|
||||||
|
@ -190,28 +190,28 @@ public class DecompilePluginScreenShots extends GhidraScreenShotGenerator {
|
||||||
|
|
||||||
TextFormatter tf = new TextFormatter(font, 15, 400, 4, 14, 1);
|
TextFormatter tf = new TextFormatter(font, 15, 400, 4, 14, 1);
|
||||||
TextFormatterContext blue = new TextFormatterContext(Palette.BLUE);
|
TextFormatterContext blue = new TextFormatterContext(Palette.BLUE);
|
||||||
TextFormatterContext darkBlue = new TextFormatterContext(DARK_BLUE);
|
TextFormatterContext navyBlue = new TextFormatterContext(NAVY);
|
||||||
TextFormatterContext darkGreen = new TextFormatterContext(DARK_GREEN);
|
TextFormatterContext darkGreen = new TextFormatterContext(DARK_GREEN);
|
||||||
TextFormatterContext orange = new TextFormatterContext(YELLOW_ORANGE);
|
TextFormatterContext orange = new TextFormatterContext(YELLOW_ORANGE);
|
||||||
TextFormatterContext purple = new TextFormatterContext(PURPLE);
|
TextFormatterContext purple = new TextFormatterContext(PURPLE);
|
||||||
tf.colorLines(Palette.getColor("palegreen"), 9, 1);
|
tf.colorLines(Palette.getColor("palegreen"), 9, 1);
|
||||||
|
|
||||||
// @formatter:off
|
// @formatter:off
|
||||||
tf.writeln("|8b 40 0c| |MOV| |EAX|,|Oxc|[|EAX|]", blue, darkBlue, orange, darkGreen, orange );
|
tf.writeln("|8b 40 0c| |MOV| |EAX|,|Oxc|[|EAX|]", blue, navyBlue, orange, darkGreen, orange );
|
||||||
tf.writeln("|3b 45 fc| |CMP| |EAX|,|local_8|[|EBP|]", blue, darkBlue, orange, purple, orange );
|
tf.writeln("|3b 45 fc| |CMP| |EAX|,|local_8|[|EBP|]", blue, navyBlue, orange, purple, orange );
|
||||||
tf.writeln("|79 29| |JLE| |LAB_080483c6|", blue, darkBlue, darkBlue );
|
tf.writeln("|79 29| |JLE| |LAB_080483c6|", blue, navyBlue, navyBlue );
|
||||||
tf.writeln("|8b 55 08| |MOV| |EDX|,|psParm1|[|EBP|]", blue, darkBlue, orange, purple, orange );
|
tf.writeln("|8b 55 08| |MOV| |EDX|,|psParm1|[|EBP|]", blue, navyBlue, orange, purple, orange );
|
||||||
tf.writeln("|8b 45 fc| |MOV| |EAX|,|local_8|[|EBP|]", blue, darkBlue, orange, purple, orange );
|
tf.writeln("|8b 45 fc| |MOV| |EAX|,|local_8|[|EBP|]", blue, navyBlue, orange, purple, orange );
|
||||||
tf.writeln("|89 42 0c| |MOV| |0xC|,|[EDX]||EAX|", blue, darkBlue, orange, purple, orange );
|
tf.writeln("|89 42 0c| |MOV| |0xC|,|[EDX]||EAX|", blue, navyBlue, orange, purple, orange );
|
||||||
tf.writeln("|8b 45 08| |MOV| |EAX|,|psParm1|[|EBP|]", blue, darkBlue, orange, purple, orange );
|
tf.writeln("|8b 45 08| |MOV| |EAX|,|psParm1|[|EBP|]", blue, navyBlue, orange, purple, orange );
|
||||||
tf.writeln("|8b 50 08| |MOV| |EAX|,|0x4|[|EAX|]", blue, darkBlue, orange, purple, orange );
|
tf.writeln("|8b 50 08| |MOV| |EAX|,|0x4|[|EAX|]", blue, navyBlue, orange, purple, orange );
|
||||||
tf.writeln("|8b 45 08| |MOV| |EAX|,|psParm1|[|EBP|]", blue, darkBlue, orange, purple, orange );
|
tf.writeln("|8b 45 08| |MOV| |EAX|,|psParm1|[|EBP|]", blue, navyBlue, orange, purple, orange );
|
||||||
tf.writeln("|8b 40 04| |MOV| |EAX|,|0x4|[|EAX|]", blue, darkBlue, orange, purple, orange );
|
tf.writeln("|8b 40 04| |MOV| |EAX|,|0x4|[|EAX|]", blue, navyBlue, orange, purple, orange );
|
||||||
tf.writeln("|89 42 04| |MOV| |0x4|,|[EDX]||EAX|", blue, darkBlue, orange, purple, orange );
|
tf.writeln("|89 42 04| |MOV| |0x4|,|[EDX]||EAX|", blue, navyBlue, orange, purple, orange );
|
||||||
tf.writeln("|8b 45 08| |MOV| |EAX|,|psParm1|[|EBP|]", blue, darkBlue, orange, purple, orange );
|
tf.writeln("|8b 45 08| |MOV| |EAX|,|psParm1|[|EBP|]", blue, navyBlue, orange, purple, orange );
|
||||||
tf.writeln("|8b 50 04| |MOV| |EDX|,|0x4|[|EAX|]", blue, darkBlue, orange, purple, orange );
|
tf.writeln("|8b 50 04| |MOV| |EDX|,|0x4|[|EAX|]", blue, navyBlue, orange, purple, orange );
|
||||||
tf.writeln("|8b 45 08| |MOV| |EAX|,|psParm1|[|EBP|]", blue, darkBlue, orange, purple, orange );
|
tf.writeln("|8b 45 08| |MOV| |EAX|,|psParm1|[|EBP|]", blue, navyBlue, orange, purple, orange );
|
||||||
tf.writeln("|8b 40 08| |MOV| |EAX|,|0x8|[|EAX|]", blue, darkBlue, orange, purple, orange );
|
tf.writeln("|8b 40 08| |MOV| |EAX|,|0x8|[|EAX|]", blue, navyBlue, orange, purple, orange );
|
||||||
// @formatter:on
|
// @formatter:on
|
||||||
|
|
||||||
return tf.getImage();
|
return tf.getImage();
|
||||||
|
|
|
@ -172,20 +172,20 @@ public class MemorySearchScreenShots extends AbstractSearchScreenShots {
|
||||||
Color selectionColor = Palette.getColor("palegreen");
|
Color selectionColor = Palette.getColor("palegreen");
|
||||||
TextFormatter tf = new TextFormatter(font, 8, 500, 4, 5, 2);
|
TextFormatter tf = new TextFormatter(font, 8, 500, 4, 5, 2);
|
||||||
TextFormatterContext blue = new TextFormatterContext(Palette.BLUE);
|
TextFormatterContext blue = new TextFormatterContext(Palette.BLUE);
|
||||||
TextFormatterContext darkBlue = new TextFormatterContext(DARK_BLUE);
|
TextFormatterContext navyBlue = new TextFormatterContext(NAVY);
|
||||||
TextFormatterContext darkGreen = new TextFormatterContext(DARK_GREEN);
|
TextFormatterContext darkGreen = new TextFormatterContext(DARK_GREEN);
|
||||||
TextFormatterContext orange = new TextFormatterContext(YELLOW_ORANGE);
|
TextFormatterContext orange = new TextFormatterContext(YELLOW_ORANGE);
|
||||||
tf.colorLines(selectionColor, 3, 4);
|
tf.colorLines(selectionColor, 3, 4);
|
||||||
|
|
||||||
// @formatter:off
|
// @formatter:off
|
||||||
tf.writeln(" LAB_00401e8c");
|
tf.writeln(" LAB_00401e8c");
|
||||||
tf.writeln(" 00401e8c |a1 20 0d| |MOV| |EAX|,DAT_00410d20]", blue, darkBlue, orange);
|
tf.writeln(" 00401e8c |a1 20 0d| |MOV| |EAX|,DAT_00410d20]", blue, navyBlue, orange);
|
||||||
tf.writeln(" |41 00| ", blue);
|
tf.writeln(" |41 00| ", blue);
|
||||||
tf.writeln(" 00401e91 |85 c0| |TEST| |EAX|,|EAX|", blue, darkBlue, orange, orange);
|
tf.writeln(" 00401e91 |85 c0| |TEST| |EAX|,|EAX|", blue, navyBlue, orange, orange);
|
||||||
tf.writeln(" 00401e93 |56| |PUSH| |ESI|", blue, darkBlue, orange);
|
tf.writeln(" 00401e93 |56| |PUSH| |ESI|", blue, navyBlue, orange);
|
||||||
tf.writeln(" 00401e94 |6a 14| |PUSH| |0x14|", blue, darkBlue, darkGreen);
|
tf.writeln(" 00401e94 |6a 14| |PUSH| |0x14|", blue, navyBlue, darkGreen);
|
||||||
tf.writeln(" 00401e96 |5e| |POP| |ESI|", blue, darkBlue, orange);
|
tf.writeln(" 00401e96 |5e| |POP| |ESI|", blue, navyBlue, orange);
|
||||||
tf.writeln(" 00401e97 |75 07| |JNZ| LAB_00401ea0", blue, darkBlue);
|
tf.writeln(" 00401e97 |75 07| |JNZ| LAB_00401ea0", blue, navyBlue);
|
||||||
// @formatter:on
|
// @formatter:on
|
||||||
|
|
||||||
image = tf.getImage();
|
image = tf.getImage();
|
||||||
|
@ -196,14 +196,14 @@ public class MemorySearchScreenShots extends AbstractSearchScreenShots {
|
||||||
Font font = new Font("Monospaced", Font.PLAIN, 14);
|
Font font = new Font("Monospaced", Font.PLAIN, 14);
|
||||||
TextFormatter tf = new TextFormatter(font, 4, 300, 4, 5, 2);
|
TextFormatter tf = new TextFormatter(font, 4, 300, 4, 5, 2);
|
||||||
TextFormatterContext blue = new TextFormatterContext(Palette.BLUE);
|
TextFormatterContext blue = new TextFormatterContext(Palette.BLUE);
|
||||||
TextFormatterContext darkBlue = new TextFormatterContext(DARK_BLUE);
|
TextFormatterContext navy = new TextFormatterContext(NAVY);
|
||||||
TextFormatterContext darkGreen = new TextFormatterContext(DARK_GREEN);
|
TextFormatterContext darkGreen = new TextFormatterContext(DARK_GREEN);
|
||||||
TextFormatterContext orange = new TextFormatterContext(YELLOW_ORANGE);
|
TextFormatterContext orange = new TextFormatterContext(YELLOW_ORANGE);
|
||||||
|
|
||||||
tf.writeln(" |85 c0| |TEST| |EAX|,|EAX|", blue, darkBlue, orange, orange);
|
tf.writeln(" |85 c0| |TEST| |EAX|,|EAX|", blue, navy, orange, orange);
|
||||||
tf.writeln(" |56| |PUSH| |ESI| ", blue, darkBlue, orange);
|
tf.writeln(" |56| |PUSH| |ESI| ", blue, navy, orange);
|
||||||
tf.writeln(" |6a 14| |PUSH| |0x14| ", blue, darkBlue, darkGreen);
|
tf.writeln(" |6a 14| |PUSH| |0x14| ", blue, navy, darkGreen);
|
||||||
tf.writeln(" |5e| |POP| |ESI| ", blue, darkBlue, orange);
|
tf.writeln(" |5e| |POP| |ESI| ", blue, navy, orange);
|
||||||
|
|
||||||
image = tf.getImage();
|
image = tf.getImage();
|
||||||
}
|
}
|
||||||
|
@ -212,12 +212,12 @@ public class MemorySearchScreenShots extends AbstractSearchScreenShots {
|
||||||
public void testSearchInstructionsExcludeOperands() {
|
public void testSearchInstructionsExcludeOperands() {
|
||||||
Font font = new Font("Monospaced", Font.PLAIN, 14);
|
Font font = new Font("Monospaced", Font.PLAIN, 14);
|
||||||
TextFormatter tf = new TextFormatter(font, 4, 80, 4, 5, 2);
|
TextFormatter tf = new TextFormatter(font, 4, 80, 4, 5, 2);
|
||||||
TextFormatterContext darkBlue = new TextFormatterContext(DARK_BLUE);
|
TextFormatterContext navy = new TextFormatterContext(NAVY);
|
||||||
|
|
||||||
tf.writeln(" |TEST|", darkBlue);
|
tf.writeln(" |TEST|", navy);
|
||||||
tf.writeln(" |PUSH|", darkBlue);
|
tf.writeln(" |PUSH|", navy);
|
||||||
tf.writeln(" |PUSH|", darkBlue);
|
tf.writeln(" |PUSH|", navy);
|
||||||
tf.writeln(" |POP| ", darkBlue);
|
tf.writeln(" |POP| ", navy);
|
||||||
image = tf.getImage();
|
image = tf.getImage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -225,14 +225,14 @@ public class MemorySearchScreenShots extends AbstractSearchScreenShots {
|
||||||
public void testSearchInstructionsIncludeOperandsNoConsts() {
|
public void testSearchInstructionsIncludeOperandsNoConsts() {
|
||||||
Font font = new Font("Monospaced", Font.PLAIN, 14);
|
Font font = new Font("Monospaced", Font.PLAIN, 14);
|
||||||
TextFormatter tf = new TextFormatter(font, 4, 200, 4, 5, 2);
|
TextFormatter tf = new TextFormatter(font, 4, 200, 4, 5, 2);
|
||||||
TextFormatterContext darkBlue = new TextFormatterContext(DARK_BLUE);
|
TextFormatterContext navy = new TextFormatterContext(NAVY);
|
||||||
TextFormatterContext darkGreen = new TextFormatterContext(DARK_GREEN);
|
TextFormatterContext darkGreen = new TextFormatterContext(DARK_GREEN);
|
||||||
TextFormatterContext orange = new TextFormatterContext(YELLOW_ORANGE);
|
TextFormatterContext orange = new TextFormatterContext(YELLOW_ORANGE);
|
||||||
|
|
||||||
tf.writeln(" |TEST| |EAX|,|EAX|", darkBlue, orange, orange);
|
tf.writeln(" |TEST| |EAX|,|EAX|", navy, orange, orange);
|
||||||
tf.writeln(" |PUSH| |ESI| ", darkBlue, orange);
|
tf.writeln(" |PUSH| |ESI| ", navy, orange);
|
||||||
tf.writeln(" |PUSH| N ", darkBlue, darkGreen);
|
tf.writeln(" |PUSH| N ", navy, darkGreen);
|
||||||
tf.writeln(" |POP| |ESI| ", darkBlue, orange);
|
tf.writeln(" |POP| |ESI| ", navy, orange);
|
||||||
|
|
||||||
image = tf.getImage();
|
image = tf.getImage();
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class RepositoryCustomScreenShots extends GhidraScreenShotGenerator {
|
||||||
@Test
|
@Test
|
||||||
public void testMultiUser() {
|
public void testMultiUser() {
|
||||||
image = createEmptyImage(800, 600);
|
image = createEmptyImage(800, 600);
|
||||||
Color purple = Palette.getColor("fuchsia");
|
Color purple = Palette.getColor("magenta");
|
||||||
Color green = Palette.LIME;
|
Color green = Palette.LIME;
|
||||||
int y = 50;
|
int y = 50;
|
||||||
int x = 450;
|
int x = 450;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue