mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-20 04:44:07 +08:00
Merge remote-tracking branch 'origin/GP-3094-dragonmacher-theme-color-consolidation--SQUASHED'
This commit is contained in:
@@ -1,46 +1,46 @@
|
||||
[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.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.debugger.plugin.plugin.memview.arrow = color.palette.red
|
||||
color.debugger.plugin.memview.box = color.palette.blue
|
||||
color.debugger.plugin.memview.box.type.instructions = color.palette.darkred
|
||||
color.debugger.plugin.memview.box.type.process = color.palette.lightcornflowerblue
|
||||
color.debugger.plugin.memview.box.type.thread = color.palette.lightskyblue
|
||||
color.debugger.plugin.memview.box.type.module = color.palette.lime
|
||||
color.debugger.plugin.memview.box.type.region = color.palette.yellow
|
||||
color.debugger.plugin.memview.box.type.image = color.palette.magenta
|
||||
color.debugger.plugin.memview.box.type.virtual.alloc = color.palette.lightgray
|
||||
color.debugger.plugin.memview.box.type.heap.create = color.palette.blue
|
||||
color.debugger.plugin.memview.box.type.heap.alloc = color.palette.darkgreen
|
||||
color.debugger.plugin.memview.box.type.pool = color.palette.indigo
|
||||
color.debugger.plugin.memview.box.type.stack = color.palette.cyan
|
||||
color.debugger.plugin.memview.box.type.perfinfo = color.palette.lightgray
|
||||
color.debugger.plugin.memview.box.type.read.memory = color.palette.darkgray
|
||||
color.debugger.plugin.memview.box.type.write.memory = color.palette.blue
|
||||
color.debugger.plugin.memview.box.type.breakpoint = color.palette.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 = red
|
||||
color.fg.debugger.plugin.objects.invisible = color.palette.lightgray
|
||||
color.fg.debugger.plugin.objects.invalidated = color.palette.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 = blue
|
||||
color.fg.debugger.plugin.objects.target = magenta
|
||||
color.fg.debugger.plugin.objects.accessor = lightgray
|
||||
color.fg.debugger.plugin.objects.link = green
|
||||
color.fg.debugger.plugin.objects.intrinsic = color.palette.blue
|
||||
color.fg.debugger.plugin.objects.target = color.palette.magenta
|
||||
color.fg.debugger.plugin.objects.accessor = color.palette.lightgray
|
||||
color.fg.debugger.plugin.objects.link = color.palette.green
|
||||
|
||||
color.bg.debugger.plugin.resources.stale = lightgray
|
||||
color.bg.debugger.plugin.resources.error = lightpink
|
||||
color.bg.debugger.plugin.resources.stale = color.palette.lightgray
|
||||
color.bg.debugger.plugin.resources.error = color.palette.lightpink
|
||||
|
||||
color.fg.debugger.value.stale = gray
|
||||
color.fg.debugger.value.stale.selected = lightgray
|
||||
color.fg.debugger.value.changed = red
|
||||
color.fg.debugger.value.changed.selected = lightcoral
|
||||
color.fg.debugger.value.stale = color.palette.gray
|
||||
color.fg.debugger.value.stale.selected = color.palette.lightgray
|
||||
color.fg.debugger.value.changed = color.palette.red
|
||||
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.selected = color.fg.debugger.value.stale.selected
|
||||
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.selected = color.fg.debugger.value.changed.selected
|
||||
|
||||
color.debugger.plugin.resources.value.changed = red
|
||||
color.debugger.plugin.resources.value.changed.selected = lightcoral
|
||||
color.debugger.plugin.resources.value.changed = color.palette.red
|
||||
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.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
|
||||
|
||||
|
||||
@@ -194,64 +194,5 @@ icon.debugger.enable.edits = editbytes.gif
|
||||
icon.debugger.disassemble = editbytes.gif // TODO this icon was missing 'disassemble.png'
|
||||
|
||||
|
||||
|
||||
[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
|
||||
|
||||
+2
-2
@@ -23,7 +23,7 @@ import javax.swing.border.EmptyBorder;
|
||||
import javax.swing.text.*;
|
||||
|
||||
import docking.DialogComponentProvider;
|
||||
import generic.theme.GColor;
|
||||
import generic.theme.GThemeDefaults.Colors;
|
||||
import generic.theme.Gui;
|
||||
import ghidra.framework.plugintool.PluginTool;
|
||||
import ghidra.pcode.exec.SleighUtils.SleighParseError;
|
||||
@@ -31,7 +31,7 @@ import ghidra.pcode.exec.SleighUtils.SleighParseErrorEntry;
|
||||
import ghidra.util.*;
|
||||
|
||||
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;
|
||||
|
||||
static {
|
||||
|
||||
+5
-14
@@ -57,23 +57,14 @@ import ghidra.trace.model.program.TraceProgramView;
|
||||
import ghidra.trace.model.time.schedule.TraceSchedule;
|
||||
import ghidra.util.Msg;
|
||||
|
||||
@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 " +
|
||||
"trace. The comparison is limited to raw bytes.",
|
||||
category = PluginCategoryNames.DEBUGGER,
|
||||
packageName = DebuggerPluginPackage.NAME,
|
||||
status = PluginStatus.RELEASED,
|
||||
eventsConsumed = {
|
||||
@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 " +
|
||||
"trace. The comparison is limited to raw bytes.", category = PluginCategoryNames.DEBUGGER, packageName = DebuggerPluginPackage.NAME, status = PluginStatus.RELEASED, eventsConsumed = {
|
||||
TraceClosedPluginEvent.class,
|
||||
},
|
||||
eventsProduced = {},
|
||||
servicesRequired = {
|
||||
}, eventsProduced = {}, servicesRequired = {
|
||||
DebuggerListingService.class,
|
||||
},
|
||||
servicesProvided = {})
|
||||
}, servicesProvided = {})
|
||||
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_DESCRIPTION = "Difference between snapshots in this trace";
|
||||
|
||||
+5
-3
@@ -22,7 +22,7 @@ import javax.swing.JTree;
|
||||
import javax.swing.tree.TreePath;
|
||||
|
||||
import docking.widgets.tree.support.GTreeRenderer;
|
||||
import generic.theme.GThemeDefaults.Colors.Tables;
|
||||
import generic.theme.GColor;
|
||||
import generic.theme.Gui;
|
||||
import ghidra.app.plugin.core.debug.gui.objects.DebuggerObjectsProvider;
|
||||
import ghidra.app.plugin.core.debug.gui.objects.ObjectContainer;
|
||||
@@ -31,6 +31,8 @@ import ghidra.dbg.target.TargetExecutionStateful.TargetExecutionState;
|
||||
import ghidra.dbg.target.TargetObject;
|
||||
|
||||
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 final DebuggerObjectsProvider provider;
|
||||
@@ -51,7 +53,7 @@ class ObjectTreeCellRenderer extends GTreeRenderer {
|
||||
TargetObject targetObject = container.getTargetObject();
|
||||
if (container.isSubscribed()) {
|
||||
Color color = provider.COLOR_FOREGROUND_SUBSCRIBED;
|
||||
if (!color.equals(Tables.FG_UNSELECTED)) {
|
||||
if (!color.equals(getTextNonSelectionColor())) {
|
||||
component.setForeground(color);
|
||||
}
|
||||
}
|
||||
@@ -86,7 +88,7 @@ class ObjectTreeCellRenderer extends GTreeRenderer {
|
||||
if (last instanceof ObjectNode) {
|
||||
ObjectContainer selection = ((ObjectNode) last).getContainer();
|
||||
if (container.equals(selection)) {
|
||||
component.setForeground(Tables.FG_SELECTED);
|
||||
component.setForeground(COLOR_FOREGROUND_SELECTION);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -15,12 +15,15 @@
|
||||
*/
|
||||
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.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import generic.theme.GColor;
|
||||
import generic.theme.GThemeDefaults.Colors;
|
||||
import ghidra.app.plugin.core.debug.stack.UnwoundFrame;
|
||||
import ghidra.pcode.exec.DebuggerPcodeUtils.PrettyBytes;
|
||||
import ghidra.pcode.exec.DebuggerPcodeUtils.WatchValue;
|
||||
@@ -44,7 +47,7 @@ import ghidra.util.exception.InvalidInputException;
|
||||
*/
|
||||
public interface VariableValueRow {
|
||||
// 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");
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,17 +5,22 @@ color.bg.currentline.listing = color.bg.currentline
|
||||
color.bg.selection.listing = color.bg.selection
|
||||
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.unselected = [color]system.color.bg.control
|
||||
color.bg.listing.tabs.highlighted = #ABC8FF
|
||||
color.bg.listing.tabs.list = rgb(255, 255, 230)
|
||||
color.bg.listing.tabs.more.tabs.hover = rgb(255, 226, 213)
|
||||
color.bg.listing.tabs.highlighted = color.palette.lightcornflowerblue
|
||||
color.bg.listing.tabs.list = [color]system.color.bg.tooltip
|
||||
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.unselected = color.fg
|
||||
color.fg.listing.tabs.list = black
|
||||
color.fg.listing.tabs.list = color.fg
|
||||
|
||||
|
||||
color.bg.listing.header.active.field = rgb(244, 221, 183)
|
||||
color.bg.listing.header.active.field = color.palette.tan
|
||||
color.fg.listing.header.active.field = color.fg
|
||||
|
||||
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.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.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.post = color.palette.blue
|
||||
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.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.thunk = color.fg.listing.function.name
|
||||
color.fg.listing.function.param = color.fg
|
||||
color.fg.listing.function.param.auto = color.palette.gray
|
||||
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.return.type = 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.assigned = color.palette.purple
|
||||
|
||||
color.fg.listing.label.local = color.palette.green
|
||||
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.mnemonic = navy
|
||||
color.fg.listing.mnemonic.override = deepPink
|
||||
color.fg.listing.mnemonic.unimplemented = navy
|
||||
color.fg.listing.mnemonic = color.palette.navy
|
||||
color.fg.listing.mnemonic.override = color.palette.magenta
|
||||
color.fg.listing.mnemonic.unimplemented = color.palette.navy
|
||||
|
||||
color.fg.listing.array.values = color.fg
|
||||
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.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.bg.listing.comparison.bytes = chartreuse
|
||||
color.bg.listing.comparison.mnemonic = chartreuse
|
||||
color.bg.listing.comparison.operand = chartreuse
|
||||
color.bg.listing.comparison.code.units.diff = silver
|
||||
color.bg.listing.comparison.code.units.unmatched = skyblue
|
||||
color.bg.listing.comparison.bytes = color.palette.lightgreen
|
||||
color.bg.listing.comparison.mnemonic = color.palette.lightgreen
|
||||
color.bg.listing.comparison.operand = color.palette.lightgreen
|
||||
color.bg.listing.comparison.code.units.diff = color.palette.silver
|
||||
color.bg.listing.comparison.code.units.unmatched = color.palette.lightskyblue
|
||||
|
||||
color.bg.listing.error = color.palette.lightcoral
|
||||
|
||||
font.listing.base = font.monospaced
|
||||
font.listing.header = SansSerif-PLAIN-11
|
||||
@@ -105,23 +112,5 @@ font.listing.header = SansSerif-PLAIN-11
|
||||
|
||||
[Dark Defaults]
|
||||
|
||||
color.bg.listing.header.active.field = rgb(244, 221, 183)
|
||||
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
|
||||
color.bg.highlight.listing.diff = #4D4D2A
|
||||
|
||||
|
||||
@@ -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.thunk = blue
|
||||
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
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
[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.jump.conditional = #007C00 // dark green
|
||||
color.flowtype.jump.unconditional = blue
|
||||
color.flowtype.fall.through = color.palette.red
|
||||
color.flowtype.jump.conditional = color.palette.green
|
||||
color.flowtype.jump.unconditional = color.palette.blue
|
||||
|
||||
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.bundle.disabled = darkGray
|
||||
color.fg.table.bundle.busy = gray
|
||||
color.fg.table.bundle.inactive = black
|
||||
color.fg.table.bundle.active = green
|
||||
color.fg.table.bundle.disabled = color.palette.darkgray
|
||||
color.fg.table.bundle.busy = color.palette.gray
|
||||
color.fg.table.bundle.inactive = color.palette.black
|
||||
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.bg.splash.infopanel = color.bg
|
||||
|
||||
color.bg.table.selected.ghidratable = color.bg
|
||||
color.fg.table.ghidratable.equate.bad = red
|
||||
color.fg.table.ghidratable.equate = blue
|
||||
color.fg.table.ghidratable.suggestion = silver
|
||||
color.fg.dialog.equates.equate.selected = color.fg
|
||||
color.fg.dialog.equates.equate.bad = color.fg.error
|
||||
color.fg.dialog.equates.equate = color.palette.blue
|
||||
color.fg.dialog.equates.suggestion = color.palette.hint
|
||||
|
||||
color.fg.consoletextpane = color.fg
|
||||
color.fg.error.consoletextpane = color.fg.error
|
||||
@@ -32,125 +32,122 @@ color.bg.interpreterconsole = color.bg
|
||||
color.fg.interpreterconsole = color.fg
|
||||
color.fg.interpreterconsole.error = color.fg.error
|
||||
|
||||
color.bg.listing.highlighter.default = yellow
|
||||
color.bg.listing.highlighter.scoped.read = rgb(204,204, 0)
|
||||
color.bg.listing.highlighter.scoped.write = green
|
||||
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.markerservice = color.bg
|
||||
|
||||
color.bg.search.highlight = rgb(255,255,200)
|
||||
color.bg.search.current.line.highlight = yellow
|
||||
color.bg.search.highlight = color.bg.highlight
|
||||
color.bg.search.current.line.highlight = color.palette.yellow
|
||||
|
||||
color.bg.tree.renderer.icon.fill = #9F9FFF
|
||||
color.bg.tree.renderer.icon.line = #8282FF
|
||||
color.bg.analysis.options.not.default.enablement = color.palette.lightgray
|
||||
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.bg.analysis.options.not.default.enablement.selected = rgb(177, 212, 236)
|
||||
color.fg.analysis.options.prototype = crimson
|
||||
color.fg.analysis.options.prototype.selected = crimson
|
||||
color.fg.plugin.assembler.completion.least = color.palette.green
|
||||
color.fg.plugin.assembler.completion.middle = color.palette.navy
|
||||
color.fg.plugin.assembler.completion.most = color.palette.blue
|
||||
|
||||
color.fg.plugin.assembler.completion.least = rgb(0, 128, 0)
|
||||
color.fg.plugin.assembler.completion.middle = rgb(0, 0, 128)
|
||||
color.fg.plugin.assembler.completion.most = blue
|
||||
color.bg.plugin.bookmark.analysis = color.palette.orange
|
||||
color.bg.plugin.bookmark.default = color.palette.magenta
|
||||
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.bookmark.default = rgb(255, 0, 255) // magenta
|
||||
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 = color.palette.lightskyblue
|
||||
color.bg.plugin.colorizer.marker = color.palette.pink
|
||||
|
||||
color.bg.plugin.colorizer.default = #84AFD3
|
||||
color.bg.plugin.colorizer.marker = pink
|
||||
|
||||
color.fg.plugin.comments.history.text = blue
|
||||
color.fg.plugin.comments.history.text = color.palette.blue
|
||||
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.composite = magenta
|
||||
color.bg.plugin.datamgr.edge.reference = blue
|
||||
color.bg.plugin.datamgr.icon.highlight = rgb(204, 204, 255)
|
||||
color.bg.plugin.datamgr.edge.default = color.palette.blue
|
||||
color.bg.plugin.datamgr.edge.composite = color.palette.magenta
|
||||
color.bg.plugin.datamgr.edge.reference = color.palette.blue
|
||||
color.bg.plugin.datamgr.icon.highlight = color.palette.lightsteelblue
|
||||
|
||||
color.fg.plugin.disassembledview.address = 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.interior = #D4D4D4
|
||||
color.bg.plugin.editors.compositeeditor.byte.header = #DFDFDF
|
||||
color.bg.plugin.editors.compositeeditor.bit.undefined = #F8F8F8
|
||||
color.bg.plugin.editors.compositeeditor.bit.component = #BFBFFF
|
||||
color.bg.plugin.editors.compositeeditor.bit.active = green
|
||||
color.bg.plugin.editors.compositeeditor.bit.conflict = yellow
|
||||
color.bg.plugin.editors.compositeeditor.non.bit = #A0A0FF
|
||||
color.bg.plugin.editors.compositeeditor.line.interior = color.palette.lightgray
|
||||
color.bg.plugin.editors.compositeeditor.byte.header = color.palette.lightgray
|
||||
color.bg.plugin.editors.compositeeditor.bit.undefined = color.palette.white
|
||||
color.bg.plugin.editors.compositeeditor.bit.component = color.palette.lightpurple
|
||||
color.bg.plugin.editors.compositeeditor.bit.active = color.palette.green
|
||||
color.bg.plugin.editors.compositeeditor.bit.conflict = color.palette.yellow
|
||||
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.error = color.fg.error
|
||||
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.bg.plugin.instructionsearch.table.masked.instruction = rgb(237, 243, 254) // faint blue
|
||||
color.bg.plugin.instructionsearch.table.masked.non.instruction = rgb(255, 242, 214) // tan
|
||||
color.bg.plugin.instructionsearch.table.not.masked.instruction = rgb(188, 212, 254) // light blue
|
||||
color.bg.plugin.instructionsearch.table.not.masked.non.instruction = rgb(203, 186, 150) // dark tan
|
||||
color.bg.plugin.instructionsearch.table.default = rgb(214, 217, 223)
|
||||
color.bg.plugin.instructionsearch.search.markers = lightgreen
|
||||
color.bg.plugin.instructionsearch.table.masked.instruction = color.palette.lavender
|
||||
color.bg.plugin.instructionsearch.table.masked.non.instruction = color.palette.cornsilk
|
||||
color.bg.plugin.instructionsearch.table.not.masked.instruction = color.palette.lightsteelblue
|
||||
color.bg.plugin.instructionsearch.table.not.masked.non.instruction = color.palette.tan
|
||||
color.bg.plugin.instructionsearch.table.default = color.palette.lightgray
|
||||
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.2 = rgb(194, 54, 33) // red
|
||||
color.fg.plugin.interpreter.renderer.color.standard.3 = rgb(37, 188, 36) // green
|
||||
color.fg.plugin.interpreter.renderer.color.standard.4 = rgb(173, 173, 39) // yellow
|
||||
color.fg.plugin.interpreter.renderer.color.standard.5 = rgb(73, 46, 225) // blue
|
||||
color.fg.plugin.interpreter.renderer.color.standard.6 = rgb(211, 56, 211) // magenta
|
||||
color.fg.plugin.interpreter.renderer.color.standard.7 = rgb(51, 187, 200) // cyan
|
||||
color.fg.plugin.interpreter.renderer.color.standard.8 = rgb(203, 204, 205) // white
|
||||
color.fg.plugin.interpreter.renderer.color.intense.1 = rgb(129, 131, 131) // intense black
|
||||
color.fg.plugin.interpreter.renderer.color.intense.2 = rgb(252, 57, 31) // intense red
|
||||
color.fg.plugin.interpreter.renderer.color.intense.3 = rgb(49, 231, 34) // intense green
|
||||
color.fg.plugin.interpreter.renderer.color.intense.4 = rgb(234, 236, 35) // intense yellow
|
||||
color.fg.plugin.interpreter.renderer.color.intense.5 = rgb(88, 51, 255) // intense blue
|
||||
color.fg.plugin.interpreter.renderer.color.intense.6 = rgb(249, 53, 248) // intense magenta
|
||||
color.fg.plugin.interpreter.renderer.color.intense.7 = rgb(20, 240, 240) // intense cyan
|
||||
color.fg.plugin.interpreter.renderer.color.intense.8 = rgb(233, 235, 235) // intense white
|
||||
color.fg.plugin.interpreter.renderer.color.standard.1 = color.palette.black
|
||||
color.fg.plugin.interpreter.renderer.color.standard.2 = color.palette.maroon
|
||||
color.fg.plugin.interpreter.renderer.color.standard.3 = color.palette.limegreen
|
||||
color.fg.plugin.interpreter.renderer.color.standard.4 = color.palette.darkkhaki
|
||||
color.fg.plugin.interpreter.renderer.color.standard.5 = color.palette.blue
|
||||
color.fg.plugin.interpreter.renderer.color.standard.6 = color.palette.magenta
|
||||
color.fg.plugin.interpreter.renderer.color.standard.7 = color.palette.cyan
|
||||
color.fg.plugin.interpreter.renderer.color.standard.8 = color.palette.lightgray
|
||||
color.fg.plugin.interpreter.renderer.color.intense.1 = color.palette.darkgray
|
||||
color.fg.plugin.interpreter.renderer.color.intense.2 = color.palette.red
|
||||
color.fg.plugin.interpreter.renderer.color.intense.3 = color.palette.lime
|
||||
color.fg.plugin.interpreter.renderer.color.intense.4 = color.palette.yellow
|
||||
color.fg.plugin.interpreter.renderer.color.intense.5 = color.palette.blue
|
||||
color.fg.plugin.interpreter.renderer.color.intense.6 = color.palette.magenta
|
||||
color.fg.plugin.interpreter.renderer.color.intense.7 = color.palette.cyan
|
||||
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.latest.version = blue
|
||||
color.bg.plugin.myprogramchangesdisplay.markers.changes.not.checked.in = green
|
||||
color.bg.plugin.myprogramchangesdisplay.markers.changes.latest.version = color.palette.blue
|
||||
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.function = rgb(204, 150, 255)
|
||||
color.bg.plugin.overview.address.external.ref = rgb(255, 150, 150)
|
||||
color.bg.plugin.overview.address.instruction = rgb(192, 192, 255)
|
||||
color.bg.plugin.overview.address.undefined = rgb(255, 51, 102)
|
||||
color.bg.plugin.overview.address.uninitialized = black
|
||||
color.bg.plugin.overview.address.data = color.palette.palegreen
|
||||
color.bg.plugin.overview.address.function = color.palette.lightpurple
|
||||
color.bg.plugin.overview.address.external.ref = color.palette.lightcoral
|
||||
color.bg.plugin.overview.address.instruction = color.palette.lightcornflowerblue
|
||||
color.bg.plugin.overview.address.undefined = color.palette.red
|
||||
color.bg.plugin.overview.address.uninitialized = color.palette.black
|
||||
|
||||
color.bg.plugin.overview.entropy.knot.1 = red
|
||||
color.bg.plugin.overview.entropy.knot.2 = blue
|
||||
color.bg.plugin.overview.entropy.knot.3 = green
|
||||
color.bg.plugin.overview.entropy.knot.4 = yellow
|
||||
color.bg.plugin.overview.entropy.knot.5 = blue
|
||||
color.bg.plugin.overview.entropy.uninitialized = blue
|
||||
color.bg.plugin.overview.entropy.palette.base.low = black
|
||||
color.bg.plugin.overview.entropy.palette.base.high = white
|
||||
color.bg.plugin.overview.entropy.knot.1 = color.palette.red
|
||||
color.bg.plugin.overview.entropy.knot.2 = color.palette.blue
|
||||
color.bg.plugin.overview.entropy.knot.3 = color.palette.green
|
||||
color.bg.plugin.overview.entropy.knot.4 = color.palette.yellow
|
||||
color.bg.plugin.overview.entropy.knot.5 = color.palette.blue
|
||||
color.bg.plugin.overview.entropy.uninitialized = color.palette.blue
|
||||
color.bg.plugin.overview.entropy.palette.base.low = color.palette.black
|
||||
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.bounds.virtual = red
|
||||
color.bg.plugin.windowlocation.bounds.visible = green
|
||||
color.bg.plugin.windowlocation.screens = orange
|
||||
color.bg.plugin.windowlocation.window.selected = rgba(0, 255, 0, 200)
|
||||
color.fg.plugin.windowlocation.window.text = gray
|
||||
color.bg.plugin.windowlocation = color.palette.black
|
||||
color.bg.plugin.windowlocation.bounds.virtual = color.palette.red
|
||||
color.bg.plugin.windowlocation.bounds.visible = color.palette.green
|
||||
color.bg.plugin.windowlocation.screens = color.palette.orange
|
||||
color.bg.plugin.windowlocation.window.selected = color.palette.lime
|
||||
color.fg.plugin.windowlocation.window.text = color.palette.gray
|
||||
|
||||
font.print = SansSerif-PLAIN-10
|
||||
font.plugin.console = font.monospaced
|
||||
@@ -170,43 +167,14 @@ font.plugin.tips.label = font.plugin.tips[BOLD]
|
||||
|
||||
[Dark Defaults]
|
||||
|
||||
color.bg.undefined = #5C4D68
|
||||
// custom; if changed, check: decompiler
|
||||
color.bg.undefined = #3A2A48
|
||||
|
||||
color.flowtype.fall.through = rgb(164, 66, 66)
|
||||
color.flowtype.jump.conditional = rgb(95, 129, 157)
|
||||
color.flowtype.jump.unconditional = rgb(140, 148, 64)
|
||||
// non-palette colors; these are currently ugly, but bright enough for easy scanning
|
||||
color.bg.listing.highlighter.default = yellow
|
||||
color.bg.listing.highlighter.scoped.read = darkorange
|
||||
color.bg.listing.highlighter.scoped.write = lime
|
||||
|
||||
color.fg.table.bundle.disabled = lightGray
|
||||
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
|
||||
color.fg.analysis.options.prototype.selected = color.palette.crimson
|
||||
|
||||
|
||||
|
||||
+3
-2
@@ -263,8 +263,8 @@ public class AutoAnalysisPlugin extends Plugin implements AutoAnalysisManagerLis
|
||||
|
||||
private void programActivated(Program program) {
|
||||
program.getOptions(StoredAnalyzerTimes.OPTIONS_LIST)
|
||||
.registerOption(StoredAnalyzerTimes.OPTION_NAME, OptionType.CUSTOM_TYPE, null, null,
|
||||
"Cumulative analysis task times", new StoredAnalyzerTimesPropertyEditor());
|
||||
.registerOption(StoredAnalyzerTimes.OPTION_NAME, OptionType.CUSTOM_TYPE, null, null,
|
||||
"Cumulative analysis task times", new StoredAnalyzerTimesPropertyEditor());
|
||||
|
||||
}
|
||||
|
||||
@@ -282,6 +282,7 @@ public class AutoAnalysisPlugin extends Plugin implements AutoAnalysisManagerLis
|
||||
tool.clearStatusInfo();
|
||||
Options options = tool.getOptions(GhidraOptions.CATEGORY_AUTO_ANALYSIS);
|
||||
boolean showDialog = options.getBoolean(SHOW_ANALYSIS_OPTIONS, true);
|
||||
|
||||
if (!showDialog) {
|
||||
return true;
|
||||
}
|
||||
|
||||
+5
@@ -653,6 +653,11 @@ public class BitFieldPlacementComponent extends JPanel implements Scrollable {
|
||||
y += CELL_HEIGHT + BYTE_SEPARATOR_THICKNESS;
|
||||
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);
|
||||
paintBits((Graphics2D) g, (2 * BYTE_SEPARATOR_THICKNESS) + CELL_HEIGHT);
|
||||
}
|
||||
|
||||
+1
-2
@@ -336,8 +336,7 @@ public class DataTypeArchiveGTree extends GTree {
|
||||
isSelected ? getBackgroundSelectionColor() : getBackgroundNonSelectionColor());
|
||||
}
|
||||
|
||||
MultiIcon multiIcon = new MultiIcon(
|
||||
new BackgroundIcon(ICON_WIDTH, ICON_HEIGHT, false));
|
||||
MultiIcon multiIcon = new MultiIcon(new DtBackgroundIcon());
|
||||
Icon icon = getIcon();
|
||||
multiIcon.addIcon(new CenterVerticalIcon(icon, ICON_HEIGHT));
|
||||
|
||||
|
||||
+1
-1
@@ -115,7 +115,7 @@ public class DomainFileArchiveNode extends ArchiveNode {
|
||||
public Icon getIcon(boolean expanded) {
|
||||
|
||||
Icon baseIcon = archive.getIcon(expanded);
|
||||
BackgroundIcon bgIcon = new BackgroundIcon(24, 16, isVersioned);
|
||||
DtBackgroundIcon bgIcon = new DtBackgroundIcon(isVersioned);
|
||||
MultiIcon multiIcon = new MultiIcon(bgIcon);
|
||||
multiIcon.addIcon(baseIcon);
|
||||
|
||||
|
||||
+22
-23
@@ -22,21 +22,27 @@ import javax.swing.Icon;
|
||||
import generic.theme.GColor;
|
||||
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_LIGHT = new GColor("color.bg.tree.renderer.icon.fill");
|
||||
private static Color VERSION_ICON_COLOR = new GColor("color.bg.icon.versioned");
|
||||
|
||||
private static Color ALPHA = Palette.NO_COLOR;
|
||||
|
||||
private int width;
|
||||
private int height;
|
||||
private boolean isVersioned;
|
||||
private Color bgColor = Palette.NO_COLOR;
|
||||
|
||||
BackgroundIcon(int width, int height, boolean isVersioned) {
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
this.isVersioned = isVersioned;
|
||||
private int width = 24;
|
||||
private int height = 16;
|
||||
|
||||
DtBackgroundIcon() {
|
||||
this(false);
|
||||
}
|
||||
|
||||
DtBackgroundIcon(boolean isVersioned) {
|
||||
this.bgColor = isVersioned ? VERSION_ICON_COLOR : ALPHA;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -51,18 +57,11 @@ class BackgroundIcon implements Icon {
|
||||
|
||||
@Override
|
||||
public void paintIcon(Component c, Graphics g, int x, int y) {
|
||||
if (isVersioned) {
|
||||
g.setColor(VERSION_ICON_COLOR_LIGHT);
|
||||
g.fillRect(x + 1, y + 1, width - 2, height - 2);
|
||||
g.setColor(VERSION_ICON_COLOR_LINE);
|
||||
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 + 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);
|
||||
}
|
||||
g.setColor(bgColor);
|
||||
g.fillRect(x + 1, y + 1, width - 2, height - 2);
|
||||
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 + 1, y + height - 1, x + width - 2, y + height - 1);
|
||||
g.drawLine(x, y + 1, x, y + height - 2);
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -38,7 +38,7 @@ public class FileArchiveNode extends ArchiveNode {
|
||||
|
||||
@Override
|
||||
public Icon getIcon(boolean expanded) {
|
||||
BackgroundIcon bgIcon = new BackgroundIcon(24, 16, false);
|
||||
DtBackgroundIcon bgIcon = new DtBackgroundIcon();
|
||||
MultiIcon multiIcon = new MultiIcon(bgIcon);
|
||||
boolean hasWriteLock = fileArchive.hasWriteLock();
|
||||
Icon baseIcon = fileArchive.getIcon(expanded);
|
||||
|
||||
+2
-2
@@ -43,7 +43,7 @@ import util.CollectionUtils;
|
||||
|
||||
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 List<Equate> equateList = new ArrayList<>();
|
||||
@@ -161,7 +161,7 @@ class EquateTableModel extends GDynamicColumnTableModel<Equate, Object> {
|
||||
}
|
||||
else if (!eq.isEnumBased()) { // User label
|
||||
label.setForeground(
|
||||
(isSelected) ? table.getSelectionForeground() : FG_ENUM_BASED);
|
||||
(isSelected) ? table.getSelectionForeground() : FG_USER_DEFINED);
|
||||
}
|
||||
|
||||
String tooltip = getEquateToolTip(eq);
|
||||
|
||||
+2
-2
@@ -24,8 +24,8 @@ import javax.swing.JToolTip;
|
||||
|
||||
import docking.widgets.fieldpanel.field.Field;
|
||||
import docking.widgets.fieldpanel.support.FieldLocation;
|
||||
import generic.theme.GColor;
|
||||
import generic.theme.GThemeDefaults.Colors;
|
||||
import generic.theme.GThemeDefaults.Colors.Messages;
|
||||
import ghidra.app.plugin.core.gotoquery.GoToHelper;
|
||||
import ghidra.app.services.CodeFormatService;
|
||||
import ghidra.app.util.*;
|
||||
@@ -47,7 +47,7 @@ public abstract class AbstractReferenceHover extends AbstractConfigurableHover {
|
||||
|
||||
private static final int WINDOW_OFFSET = 50;
|
||||
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 ListingPanel panel;
|
||||
|
||||
+2
-1
@@ -30,6 +30,7 @@ import org.osgi.framework.Bundle;
|
||||
import docking.widgets.table.*;
|
||||
import generic.jar.ResourceFile;
|
||||
import generic.theme.GColor;
|
||||
import generic.theme.GThemeDefaults.Colors;
|
||||
import generic.util.Path;
|
||||
import ghidra.docking.settings.Settings;
|
||||
import ghidra.framework.plugintool.ServiceProvider;
|
||||
@@ -45,7 +46,7 @@ public class BundleStatusTableModel
|
||||
extends GDynamicColumnTableModel<BundleStatus, List<BundleStatus>> {
|
||||
|
||||
//@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_BUSY = new GColor("color.fg.table.bundle.busy");
|
||||
private static final Color COLOR_BUNDLE_INACTIVE = new GColor("color.fg.table.bundle.inactive");
|
||||
|
||||
+8
-2
@@ -115,8 +115,13 @@ class ProgramListPanel extends JPanel {
|
||||
listModel = new DefaultListModel<>();
|
||||
initListModel();
|
||||
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.addMouseMotionListener(new MouseMotionAdapter() {
|
||||
@Override
|
||||
@@ -259,5 +264,6 @@ class ProgramListPanel extends JPanel {
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+1
-14
@@ -16,7 +16,6 @@
|
||||
package ghidra.app.plugin.core.programtree;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.util.*;
|
||||
|
||||
import javax.swing.Icon;
|
||||
@@ -26,7 +25,6 @@ import javax.swing.tree.DefaultTreeCellRenderer;
|
||||
import docking.widgets.GComponent;
|
||||
import generic.theme.GColor;
|
||||
import generic.theme.GIcon;
|
||||
import generic.theme.GThemeDefaults.Colors;
|
||||
import ghidra.program.model.listing.Group;
|
||||
import resources.ResourceManager;
|
||||
|
||||
@@ -331,7 +329,7 @@ class DnDTreeCellRenderer extends DefaultTreeCellRenderer {
|
||||
for (int i = 0; i < iconIds.length; i++) {
|
||||
GIcon icon = new GIcon(iconIds[i]);
|
||||
iconMap.put(iconIds[i], icon);
|
||||
Icon disabledIcon = getDisabledIcon(iconIds[i], icon);
|
||||
Icon disabledIcon = ResourceManager.getDisabledIcon(icon);
|
||||
iconMap.put(disabledNames[i], disabledIcon);
|
||||
}
|
||||
}
|
||||
@@ -344,15 +342,4 @@ class DnDTreeCellRenderer extends DefaultTreeCellRenderer {
|
||||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-2
@@ -39,8 +39,7 @@ import generic.theme.GThemeDefaults.Colors;
|
||||
*/
|
||||
public abstract class DragNDropTree extends JTree implements Draggable, Droppable, Autoscroll {
|
||||
|
||||
private static final Color BG_COLOR_DRAG_NO_SELECTION =
|
||||
new GColor("color.bg.tree.drag.no.selection");
|
||||
private static final Color BG_COLOR_DRAG_NO_SELECTION = new GColor("color.bg.tree.drag");
|
||||
|
||||
private AutoscrollAdapter autoscroller;
|
||||
|
||||
|
||||
+15
-25
@@ -1,6 +1,5 @@
|
||||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (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;
|
||||
|
||||
/**
|
||||
* Task to do a single search..
|
||||
*
|
||||
* Task to do a single search.
|
||||
*/
|
||||
class SearchTask extends Task {
|
||||
|
||||
private Searcher textSearcher;
|
||||
private Navigatable navigatable;
|
||||
private ProgramLocation loc = null;
|
||||
private ProgramLocation loc;
|
||||
private boolean isCanceled;
|
||||
private TaskMonitor taskMonitor;
|
||||
private Program program;
|
||||
|
||||
/**
|
||||
* Constructor for SearchTask.
|
||||
* @param navigatable the navigatable
|
||||
* @param program the program
|
||||
* @param textSearcher existing search to use
|
||||
* @param listener listener that will be called when the search
|
||||
* completes
|
||||
*/
|
||||
SearchTask(Navigatable navigatable, Program program, Searcher textSearcher) {
|
||||
super("Searching Program Text", true, true, false);
|
||||
@@ -50,21 +47,19 @@ class SearchTask extends Task {
|
||||
this.program = program;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ghidra.util.task.Task#run(TaskMonitor)
|
||||
*/
|
||||
@Override
|
||||
public void run(TaskMonitor monitor) {
|
||||
|
||||
monitor.setMessage("Searching...");
|
||||
if (isCanceled) {
|
||||
monitor.cancel();
|
||||
return;
|
||||
}
|
||||
|
||||
monitor.setMessage("Searching...");
|
||||
textSearcher.setMonitor(monitor);
|
||||
try {
|
||||
monitor.setMessage("Searching...");
|
||||
textSearcher.setMonitor(monitor);
|
||||
this.taskMonitor = monitor;
|
||||
if (isCanceled) {
|
||||
monitor.cancel();
|
||||
}
|
||||
else {
|
||||
loc = textSearcher.search();
|
||||
}
|
||||
loc = textSearcher.search();
|
||||
}
|
||||
catch (Exception e) {
|
||||
if (!(e instanceof DomainObjectException)) {
|
||||
@@ -73,16 +68,10 @@ class SearchTask extends Task {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the text searcher that this task used.
|
||||
*/
|
||||
Searcher getTextSearcher() {
|
||||
return textSearcher;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the program for this search task.
|
||||
*/
|
||||
Navigatable getNavigatable() {
|
||||
return navigatable;
|
||||
}
|
||||
@@ -95,6 +84,7 @@ class SearchTask extends Task {
|
||||
* Called when program is deactivated but the task hasn't started to
|
||||
* run yet. Cancel it when it does run.
|
||||
*/
|
||||
@Override
|
||||
public void cancel() {
|
||||
super.cancel();
|
||||
isCanceled = true;
|
||||
|
||||
+18
-21
@@ -1,6 +1,5 @@
|
||||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (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;
|
||||
|
||||
/**
|
||||
* Search the program text.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Search the program text
|
||||
*/
|
||||
public interface Searcher {
|
||||
|
||||
/**
|
||||
* Get the next program location.
|
||||
* @return null if there is no next program location.
|
||||
*/
|
||||
public ProgramLocation search();
|
||||
|
||||
/**
|
||||
* Set the task monitor.
|
||||
* @param monitor monitor that allows the search to be canceled
|
||||
*/
|
||||
public void setMonitor(TaskMonitor monitor);
|
||||
|
||||
/**
|
||||
* Return the search options associated with this Searcher.
|
||||
*/
|
||||
public SearchOptions getSearchOptions();
|
||||
/**
|
||||
* Get the next program location.
|
||||
* @return null if there is no next program location.
|
||||
*/
|
||||
public ProgramLocation search();
|
||||
|
||||
/**
|
||||
* Set the task monitor.
|
||||
* @param monitor monitor that allows the search to be canceled
|
||||
*/
|
||||
public void setMonitor(TaskMonitor monitor);
|
||||
|
||||
/**
|
||||
* Return the search options associated with this Searcher.
|
||||
* @return the search option
|
||||
*/
|
||||
public SearchOptions getSearchOptions();
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@ import docking.widgets.filter.FilterListener;
|
||||
import docking.widgets.label.GDLabel;
|
||||
import docking.widgets.label.GLabel;
|
||||
import docking.widgets.table.GTableCellRenderingData;
|
||||
import generic.theme.GColor;
|
||||
import ghidra.app.context.ListingActionContext;
|
||||
/**
|
||||
* Dialog for Equate Plugin.
|
||||
@@ -65,6 +66,13 @@ import ghidra.util.table.*;
|
||||
import utility.function.Callback;
|
||||
|
||||
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 OK = 1;
|
||||
|
||||
@@ -153,18 +161,18 @@ public class SetEquateDialog extends DialogComponentProvider {
|
||||
if (refCount > 0) {
|
||||
if (eqRowObject.getEntryName().contains(EquateManager.ERROR_TAG)) {
|
||||
c.setForeground(
|
||||
isSelected ? this.SELECTED_CELL_COLOR : this.BAD_EQUATE_COLOR);
|
||||
isSelected ? FG_EQUATE_SELECED_COLOR : FG_BAD_EQUATE_COLOR);
|
||||
}
|
||||
else {
|
||||
Equate e = eqRowObject.getEquate();
|
||||
if (e != null && !e.isEnumBased()) {
|
||||
c.setForeground(
|
||||
isSelected ? this.SELECTED_CELL_COLOR : this.EQUATE_COLOR);
|
||||
isSelected ? FG_EQUATE_SELECED_COLOR : FG_EQUATE_COLOR);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
c.setForeground(isSelected ? this.SELECTED_CELL_COLOR : this.SUGGESTION_COLOR);
|
||||
c.setForeground(isSelected ? FG_EQUATE_SELECED_COLOR : FG_SUGGESTION_COLOR);
|
||||
}
|
||||
return c;
|
||||
}
|
||||
|
||||
+5
-1
@@ -15,6 +15,8 @@
|
||||
*/
|
||||
package ghidra.app.util.viewer.format;
|
||||
|
||||
import java.awt.Color;
|
||||
|
||||
import docking.widgets.fieldpanel.field.*;
|
||||
import docking.widgets.fieldpanel.support.*;
|
||||
import generic.theme.GColor;
|
||||
@@ -25,11 +27,13 @@ import ghidra.app.util.viewer.proxy.ProxyObj;
|
||||
|
||||
public class ErrorListingField extends ListingTextField {
|
||||
|
||||
private static Color BG_ERROR_COLOR = new GColor("color.bg.listing.error");
|
||||
|
||||
private Throwable t;
|
||||
|
||||
private static HighlightProvider myProvider =
|
||||
(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) {
|
||||
super(ff, proxy, createField(ff, proxy, varWidth, t));
|
||||
|
||||
@@ -37,7 +37,6 @@ import docking.widgets.indexedscrollpane.IndexedScrollPane;
|
||||
import docking.widgets.label.GDLabel;
|
||||
import generic.theme.GThemeDefaults.Colors;
|
||||
import generic.theme.GThemeDefaults.Colors.Palette;
|
||||
import generic.theme.GThemeDefaults.Colors.Tables;
|
||||
import ghidra.GhidraOptions;
|
||||
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
|
||||
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() {
|
||||
setOpaque(true);
|
||||
@@ -354,8 +353,8 @@ public class OptionsGui extends JPanel {
|
||||
Font origFont = fontNameField.getFont();
|
||||
setFont(new Font(value.toString(), origFont.getStyle(), origFont.getSize()));
|
||||
|
||||
setBackground(isSelected ? SELECTED_COLOR : Colors.BACKGROUND);
|
||||
setForeground(isSelected ? Tables.FG_SELECTED : Tables.FG_UNSELECTED);
|
||||
setBackground(isSelected ? SELECTED_BG_COLOR : Colors.BACKGROUND);
|
||||
setForeground(isSelected ? list.getSelectionForeground() : list.getForeground());
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -45,11 +45,11 @@ public class ProgramDiffDetails {
|
||||
private static final String STANDARD_NEW_LINE = "\n";
|
||||
|
||||
//@formatter:off
|
||||
private static Color FG_COLOR_ADDRESS = new GColor("color.bg.plugin.programdiff.details.address");
|
||||
private static Color FG_COLOR_COMMENT = new GColor("color.bg.plugin.programdiff.details.comment");
|
||||
private static Color FG_COLOR_DANGER = new GColor("color.bg.plugin.programdiff.details.danger");
|
||||
private static Color FG_COLOR_EMPHASIZE = new GColor("color.bg.plugin.programdiff.details.emphasize");
|
||||
private static Color FG_COLOR_PROGRAM = new GColor("color.bg.plugin.programdiff.details.emphasize");
|
||||
private static Color FG_COLOR_ADDRESS = new GColor("color.fg.plugin.programdiff.details.address");
|
||||
private static Color FG_COLOR_COMMENT = new GColor("color.fg.plugin.programdiff.details.comment");
|
||||
private static Color FG_COLOR_DANGER = new GColor("color.fg.plugin.programdiff.details.danger");
|
||||
private static Color FG_COLOR_EMPHASIZE = new GColor("color.fg.plugin.programdiff.details.emphasize");
|
||||
private static Color FG_COLOR_PROGRAM = new GColor("color.fg.plugin.programdiff.details.program");
|
||||
//@formatter:on
|
||||
|
||||
private static final Color EMPHASIZE_COLOR = FG_COLOR_EMPHASIZE;
|
||||
|
||||
@@ -15,14 +15,12 @@
|
||||
*/
|
||||
package ghidra.util.table;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.Font;
|
||||
|
||||
import javax.swing.JTable;
|
||||
import javax.swing.table.TableModel;
|
||||
|
||||
import docking.widgets.table.GTableCellRenderer;
|
||||
import generic.theme.GColor;
|
||||
import ghidra.app.util.viewer.field.ListingColors;
|
||||
import ghidra.program.model.address.Address;
|
||||
import ghidra.program.model.listing.Program;
|
||||
@@ -32,11 +30,6 @@ import ghidra.program.model.symbol.Symbol;
|
||||
|
||||
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() {
|
||||
// default constructor
|
||||
}
|
||||
|
||||
+2
-2
@@ -23,7 +23,7 @@ import javax.swing.JLabel;
|
||||
|
||||
import docking.widgets.table.GTableCellRenderingData;
|
||||
import generic.theme.GIcon;
|
||||
import generic.theme.GThemeDefaults.Colors;
|
||||
import generic.theme.GThemeDefaults.Colors.Palette;
|
||||
import ghidra.docking.settings.Settings;
|
||||
import ghidra.framework.plugintool.ServiceProvider;
|
||||
import ghidra.program.model.listing.Program;
|
||||
@@ -76,7 +76,7 @@ public class MemoryTypeProgramLocationBasedTableColumn
|
||||
|
||||
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 onIcon = new GIcon("icon.check");
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
color.bg.byteviewer = color.bg
|
||||
color.bg.byteviewer.highlight = yellow
|
||||
|
||||
color.fg.byteviewer.separator = blue
|
||||
color.fg.byteviewer.separator = color.palette.blue
|
||||
color.fg.byteviewer.changed = red
|
||||
color.cursor.byteviewer.focused.active = color.cursor.focused
|
||||
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.fg.byteviewer.changed = indianRed
|
||||
color.fg.byteviewer.separator = darkBlue
|
||||
color.cursor.byteviewer.focused.not.active = gray
|
||||
|
||||
|
||||
+2
-2
@@ -225,8 +225,8 @@ public abstract class ByteViewerComponentProvider extends ComponentProviderAdapt
|
||||
opt.registerOption(OPTION_HIGHLIGHT_CURSOR_LINE, true, help,
|
||||
"Toggles highlighting background color of line containing the cursor");
|
||||
|
||||
Color missingValueColor = opt.getColor(SEPARATOR_COLOR_OPTION_NAME, SEPARATOR_COLOR);
|
||||
panel.setSeparatorColor(missingValueColor);
|
||||
Color separatorColor = opt.getColor(SEPARATOR_COLOR_OPTION_NAME, SEPARATOR_COLOR);
|
||||
panel.setSeparatorColor(separatorColor);
|
||||
|
||||
panel.setCurrentCursorColor(CURSOR_ACTIVE_COLOR);
|
||||
panel.setNonFocusCursorColor(CURSOR_NOT_FOCUSED_COLOR);
|
||||
|
||||
@@ -3,54 +3,45 @@
|
||||
color.bg.decompiler = color.bg
|
||||
color.fg.decompiler = color.fg
|
||||
|
||||
color.fg.decompiler.keyword = #0001e6
|
||||
color.fg.decompiler.function.name = blue
|
||||
color.fg.decompiler.comment = blueViolet
|
||||
color.fg.decompiler.error = crimson
|
||||
color.fg.decompiler.variable = #999900 // close to oliveDrab
|
||||
color.fg.decompiler.constant = forestGreen
|
||||
color.fg.decompiler.type = mediumBlue
|
||||
color.fg.decompiler.parameter = darkMagenta
|
||||
color.fg.decompiler.global = darkCyan
|
||||
color.fg.decompiler.special = #cc0033
|
||||
color.fg.decompiler.keyword = color.palette.blue
|
||||
color.fg.decompiler.function.name = color.palette.blue
|
||||
color.fg.decompiler.comment = color.palette.blueviolet
|
||||
color.fg.decompiler.error = color.palette.crimson
|
||||
color.fg.decompiler.variable = color.palette.olive
|
||||
color.fg.decompiler.constant = color.palette.green
|
||||
color.fg.decompiler.type = color.palette.blue
|
||||
color.fg.decompiler.parameter = color.palette.purple
|
||||
color.fg.decompiler.global = color.palette.darkcyan
|
||||
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.special = sandybrown
|
||||
color.bg.decompiler.highlights.search = mediumslateblue
|
||||
color.bg.decompiler.highlights.default = color.palette.highlight.transparent.yellow
|
||||
color.bg.decompiler.highlights.special = color.palette.crimson
|
||||
color.bg.decompiler.highlights.search = color.palette.slateblue
|
||||
|
||||
color.bg.decompiler.pcode.dfg.vertex.default = red
|
||||
color.bg.decompiler.pcode.dfg.vertex.selected = deeppink
|
||||
color.bg.decompiler.pcode.dfg.vertex.constant = darkgreen
|
||||
color.bg.decompiler.pcode.dfg.vertex.register = navy
|
||||
color.bg.decompiler.pcode.dfg.vertex.unique = black
|
||||
color.bg.decompiler.pcode.dfg.vertex.persistent = darkorange
|
||||
color.bg.decompiler.pcode.dfg.vertex.address.tied = orange
|
||||
color.bg.decompiler.pcode.dfg.vertex.op = red
|
||||
color.bg.decompiler.pcode.dfg.edge.default = navy
|
||||
color.bg.decompiler.pcode.dfg.edge.selected = deeppink
|
||||
color.bg.decompiler.pcode.dfg.edge.within.block = black
|
||||
color.bg.decompiler.pcode.dfg.edge.between.blocks = red
|
||||
font.decompiler.pcode.dfg = font.graphdisplay.default
|
||||
color.bg.decompiler.pcode.dfg.vertex.default = color.palette.red
|
||||
color.bg.decompiler.pcode.dfg.vertex.selected = color.palette.lightcoral
|
||||
color.bg.decompiler.pcode.dfg.vertex.constant = color.palette.darkgreen
|
||||
color.bg.decompiler.pcode.dfg.vertex.register = color.palette.navy
|
||||
color.bg.decompiler.pcode.dfg.vertex.unique = color.palette.black
|
||||
color.bg.decompiler.pcode.dfg.vertex.persistent = color.palette.darkorange
|
||||
color.bg.decompiler.pcode.dfg.vertex.address.tied = color.palette.orange
|
||||
color.bg.decompiler.pcode.dfg.vertex.op = color.palette.red
|
||||
color.bg.decompiler.pcode.dfg.edge.default = color.palette.navy
|
||||
color.bg.decompiler.pcode.dfg.edge.selected = color.palette.lightcoral
|
||||
color.bg.decompiler.pcode.dfg.edge.within.block = color.palette.black
|
||||
color.bg.decompiler.pcode.dfg.edge.between.blocks = color.palette.red
|
||||
|
||||
icon.decompiler.action.provider = decompileFunction.gif
|
||||
icon.decompiler.action.provider.clone = icon.provider.clone
|
||||
icon.decompiler.action.export = page_edit.png
|
||||
|
||||
font.decompiler = font.monospaced
|
||||
font.decompiler.pcode.dfg = font.graphdisplay.default
|
||||
|
||||
|
||||
|
||||
[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]
|
||||
|
||||
|
||||
color.bg.plugin.functiongraph = color.bg
|
||||
|
||||
color.fg.plugin.functiongraph.label.picked = color.fg
|
||||
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.exit = color.palette.lightred
|
||||
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.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.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.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
|
||||
@@ -54,12 +53,6 @@ icon.plugin.functiongraph.action.provider = function_graph.png
|
||||
icon.plugin.functiongraph.action.provider.satellite = network-wireless-16.png
|
||||
|
||||
|
||||
|
||||
[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]
|
||||
|
||||
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.edge.primary.direct = rgb(143, 197, 143) // light pale green
|
||||
color.bg.plugin.fcg.edge.primary.direct.selected = rgb(68, 171, 96) // lighter green
|
||||
color.bg.plugin.fcg.edge.primary.indirect = rgb(233, 233, 233) // lightGray
|
||||
color.bg.plugin.fcg.edge.primary.indirect.selected = rgb(201, 195, 195)
|
||||
color.bg.plugin.fcg.edge.primary.direct = darkseagreen // TODO
|
||||
color.bg.plugin.fcg.edge.primary.direct.selected = color.palette.lightgreen
|
||||
color.bg.plugin.fcg.edge.primary.indirect = color.palette.lavender
|
||||
color.bg.plugin.fcg.edge.primary.indirect.selected = color.palette.silver
|
||||
|
||||
// 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.indirect = rgba(125, 125, 125, 25) // 'washed out gray'
|
||||
color.bg.plugin.fcg.edge.satellite.direct = color.palette.lightgray
|
||||
color.bg.plugin.fcg.edge.satellite.indirect = color.palette.lightpurple
|
||||
|
||||
icon.plugin.fcg.layout.bow.tie = color_swatch.png
|
||||
|
||||
|
||||
[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]
|
||||
|
||||
color.bg.plugin.programdiff.highlight = color.bg.highlight.listing.diff
|
||||
|
||||
|
||||
color.bg.plugin.programdiff.highlight = moccasin
|
||||
|
||||
color.bg.plugin.programdiff.details.address = #009999
|
||||
color.bg.plugin.programdiff.details.comment = #009900
|
||||
color.bg.plugin.programdiff.details.danger = #FF0000
|
||||
color.bg.plugin.programdiff.details.emphasize = #009900
|
||||
color.fg.plugin.programdiff.details.address = color.palette.teal
|
||||
color.fg.plugin.programdiff.details.comment = color.palette.green
|
||||
color.fg.plugin.programdiff.details.danger = color.fg.error
|
||||
color.fg.plugin.programdiff.details.emphasize = color.palette.green
|
||||
color.fg.plugin.programdiff.details.program = color.palette.purple
|
||||
|
||||
icon.plugin.programdiff.apply = pencil16.png
|
||||
icon.plugin.programdiff.apply.next = pencil_arrow16.png
|
||||
@@ -22,4 +21,3 @@ icon.plugin.programdiff.cursor.location = cursor_arrow.gif
|
||||
|
||||
[Dark Defaults]
|
||||
|
||||
color.bg.plugin.programdiff.highlight = #4D4D2A
|
||||
@@ -1,17 +1,17 @@
|
||||
|
||||
[Defaults]
|
||||
|
||||
color.fg.plugin.python.syntax.class = blue
|
||||
color.fg.plugin.python.syntax.code = darkgreen
|
||||
color.fg.plugin.python.syntax.function = green
|
||||
color.fg.plugin.python.syntax.instance = purple
|
||||
color.fg.plugin.python.syntax.map = steelblue
|
||||
color.fg.plugin.python.syntax.method = teal
|
||||
color.fg.plugin.python.syntax.null = red
|
||||
color.fg.plugin.python.syntax.number = darkgray
|
||||
color.fg.plugin.python.syntax.package = darkred
|
||||
color.fg.plugin.python.syntax.sequence = rgb(128, 96, 64)
|
||||
color.fg.plugin.python.syntax.special = darkgreen
|
||||
color.fg.plugin.python.syntax.class = color.palette.blue
|
||||
color.fg.plugin.python.syntax.code = color.palette.darkgreen
|
||||
color.fg.plugin.python.syntax.function = color.palette.green
|
||||
color.fg.plugin.python.syntax.instance = color.palette.purple
|
||||
color.fg.plugin.python.syntax.map = color.palette.steelblue
|
||||
color.fg.plugin.python.syntax.method = color.palette.teal
|
||||
color.fg.plugin.python.syntax.null = color.palette.red
|
||||
color.fg.plugin.python.syntax.number = color.palette.darkgray
|
||||
color.fg.plugin.python.syntax.package = color.palette.darkred
|
||||
color.fg.plugin.python.syntax.sequence = color.palette.saddlebrown
|
||||
color.fg.plugin.python.syntax.special = color.palette.darkgreen
|
||||
|
||||
icon.plugin.python = python.png
|
||||
|
||||
|
||||
@@ -1,34 +1,34 @@
|
||||
[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.unapplied = rgb(255, 170, 85) // orange
|
||||
color.bg.version.tracking.dual.listing.highlight.markup.ignored = gainsboro // 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.dual.listing.highlight.markup.applied = color.palette.lightgreen
|
||||
color.bg.version.tracking.dual.listing.highlight.markup.unapplied = color.palette.orange
|
||||
color.bg.version.tracking.dual.listing.highlight.markup.ignored = color.palette.lightgray
|
||||
color.bg.version.tracking.dual.listing.highlight.markup.rejected = color.palette.pink
|
||||
color.bg.version.tracking.dual.listing.highlight.markup.failed = color.palette.red
|
||||
color.bg.version.tracking.dual.listing.highlight.markup.no.address = color.palette.lavender
|
||||
color.bg.version.tracking.dual.listing.highlight.markup.same = color.palette.lightskyblue
|
||||
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.editing = rgb(243, 242, 131) // yellowish
|
||||
color.bg.version.tracking.filter.formatted.field.error = color.palette.lightgray
|
||||
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.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.bg.version.tracking.match.table.markup.status.tooltip.unexamined = black
|
||||
color.bg.version.tracking.match.table.locked.out = color.palette.aliceblue
|
||||
color.bg.version.tracking.match.table.markup.status.applied = color.palette.limegreen
|
||||
color.bg.version.tracking.match.table.markup.status.rejected = color.palette.red
|
||||
color.bg.version.tracking.match.table.markup.status.dont.care = color.palette.cornflowerblue
|
||||
color.bg.version.tracking.match.table.markup.status.dont.know = color.palette.orange
|
||||
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.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.fg.version.tracking.markup.items.table.user.defined.address = color.palette.cyan
|
||||
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.medium = yellow
|
||||
color.bg.version.tracking.related.matches.table.bad = red
|
||||
color.bg.version.tracking.related.matches.table.good = color.palette.green
|
||||
color.bg.version.tracking.related.matches.table.medium = color.palette.yellow
|
||||
color.bg.version.tracking.related.matches.table.bad = color.palette.red
|
||||
|
||||
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.replace = sync_enabled.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.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.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.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)]}
|
||||
@@ -134,34 +132,6 @@ icon.version.tracking.new.session.info = information.png
|
||||
icon.version.tracking.correlator.status.already.run = flag-green.png
|
||||
|
||||
|
||||
|
||||
[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
|
||||
+2
-4
@@ -37,8 +37,8 @@ import docking.widgets.EventTrigger;
|
||||
import docking.widgets.fieldpanel.FieldPanel;
|
||||
import docking.widgets.label.GDLabel;
|
||||
import docking.widgets.table.threaded.ThreadedTableModel;
|
||||
import generic.theme.GColor;
|
||||
import generic.theme.GIcon;
|
||||
import generic.theme.GThemeDefaults.Colors;
|
||||
import ghidra.app.plugin.core.functioncompare.FunctionComparisonPanel;
|
||||
import ghidra.app.services.GoToService;
|
||||
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");
|
||||
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 destinationFunctionsTable;
|
||||
private VTFunctionAssociationTableModel sourceFunctionsModel;
|
||||
@@ -361,7 +359,7 @@ public class VTFunctionAssociationProvider extends ComponentProviderAdapter
|
||||
JPanel statusPanel = new JPanel(new BorderLayout());
|
||||
statusLabel = new GDLabel(NO_ERROR_MESSAGE);
|
||||
statusLabel.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
statusLabel.setForeground(FG_ERROR);
|
||||
statusLabel.setForeground(Colors.ERROR);
|
||||
statusLabel.addComponentListener(new ComponentAdapter() {
|
||||
@Override
|
||||
public void componentResized(ComponentEvent e) {
|
||||
|
||||
@@ -1,51 +1,47 @@
|
||||
[Defaults]
|
||||
|
||||
|
||||
color.bg.splashscreen = black
|
||||
color.fg.splashscreen = gray
|
||||
color.bg.splashscreen = black // always black; no palette
|
||||
color.fg.splashscreen = gray // always gray; no palette
|
||||
|
||||
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.inactive = black
|
||||
color.header.drag.cursor = black
|
||||
color.fg.header.inactive = color.palette.black
|
||||
color.header.drag.cursor = color.palette.black
|
||||
|
||||
color.fg.dialog.status.alert = color.fg.messages.alert
|
||||
color.fg.dialog.status.error = color.fg.messages.error
|
||||
color.fg.dialog.status.normal = color.fg.messages.normal
|
||||
color.fg.dialog.status.warning = color.fg.messages.warning
|
||||
|
||||
color.bg.selection = rgb(180, 240, 180) // pale green
|
||||
color.bg.highlight = rgb(240,240,150) // pale yellow
|
||||
color.bg.selection = color.palette.palegreen
|
||||
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.invalid = rgb(255,225,225)
|
||||
color.fg.textfield.hint = color.fg.hint
|
||||
color.bg.textfield.hint.invalid = color.palette.mistyrose
|
||||
color.fg.textfield.hint = color.fg.messages.hint
|
||||
|
||||
color.bg.tree.drag = color.palette.lavender
|
||||
color.bg.tree.drag.no.selection = rgb(204, 204, 255)
|
||||
|
||||
color.bg.filterfield = color.bg.filtered
|
||||
color.fg.filterfield = black
|
||||
color.bg.filterfield = color.palette.yellow
|
||||
color.fg.filterfield = color.palette.black
|
||||
|
||||
// generic component items
|
||||
color.border.bevel.highlight = lightGray
|
||||
color.border.bevel.shadow = gray
|
||||
color.border.provider.disconnected = orange
|
||||
color.border.bevel.highlight = color.palette.lightgray
|
||||
color.border.bevel.shadow = color.palette.gray
|
||||
color.border.provider.disconnected = color.palette.orange
|
||||
color.fg.button = color.palette.black
|
||||
|
||||
color.bg.filechooser = color.bg
|
||||
color.fg.filechooser = color.fg
|
||||
color.bg.filechooser.shortcut = lightGray
|
||||
color.bg.filechooser.shortcut = color.palette.lightgray
|
||||
|
||||
color.bg.fieldpanel = color.bg
|
||||
color.fg.fieldpanel = color.fg
|
||||
color.bg.fieldpanel.selection = color.bg.selection
|
||||
color.bg.fieldpanel.highlight = color.bg.highlight
|
||||
|
||||
// docking buttons
|
||||
color.fg.button = black
|
||||
|
||||
icon.folder.new = folder_add.png
|
||||
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.redo = EMPTY_ICON{oxygen-edit-redo.png[move(0,3)]}
|
||||
|
||||
|
||||
icon.font = text_lowercase.png
|
||||
icon.rename = textfield_rename.png
|
||||
icon.check = check.png
|
||||
@@ -145,32 +140,13 @@ font.input.hint = monospaced-PLAIN-10
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
[Dark Defaults]
|
||||
|
||||
|
||||
color.bg.header.inactive = #6A6A6A
|
||||
color.header.drag.cursor = lightGray
|
||||
|
||||
color.fg.dialog.status.alert = orange
|
||||
color.fg.dialog.status.error = color.fg.error
|
||||
color.fg.dialog.status.warning = orange
|
||||
color.fg.dialog.status.normal = lightBlue
|
||||
color.fg.filterfield = color.palette.darkslategray
|
||||
|
||||
color.bg.currentline = #003366
|
||||
|
||||
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.highlight = #703401 // orangish
|
||||
|
||||
color.bg.filechooser.shortcut = [color]system.color.bg.view
|
||||
|
||||
|
||||
+19
-4
@@ -18,7 +18,9 @@ package docking.options.editor;
|
||||
import java.awt.Color;
|
||||
import java.awt.Component;
|
||||
import java.beans.PropertyEditorSupport;
|
||||
import java.util.Objects;
|
||||
import java.util.*;
|
||||
|
||||
import javax.swing.event.ChangeListener;
|
||||
|
||||
import ghidra.util.Swing;
|
||||
|
||||
@@ -28,6 +30,7 @@ import ghidra.util.Swing;
|
||||
public class ColorPropertyEditor extends PropertyEditorSupport {
|
||||
|
||||
private GhidraColorChooser colorChooser;
|
||||
private ChangeListener listener = e -> colorChanged();
|
||||
|
||||
private void colorChanged() {
|
||||
// run later - allows debugging without hanging the UI in some environments
|
||||
@@ -36,10 +39,22 @@ public class ColorPropertyEditor extends PropertyEditorSupport {
|
||||
|
||||
@Override
|
||||
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.getSelectionModel().addChangeListener(e -> colorChanged());
|
||||
colorChooser.setColorHistory(history);
|
||||
colorChooser.setRecentColors(recent);
|
||||
colorChooser.setActiveTab(activeTab);
|
||||
colorChooser.getSelectionModel().addChangeListener(listener);
|
||||
return colorChooser;
|
||||
}
|
||||
|
||||
|
||||
+102
-21
@@ -23,21 +23,54 @@ import java.util.List;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.colorchooser.AbstractColorChooserPanel;
|
||||
import javax.swing.plaf.ColorChooserUI;
|
||||
|
||||
public class GhidraColorChooser extends JColorChooser {
|
||||
|
||||
private static final String DEFAULT_TITLE = "Please Choose a Color";
|
||||
|
||||
private String title = DEFAULT_TITLE;
|
||||
private RecentColorCache recentColorCache = new RecentColorCache();
|
||||
private RecentColorCache historyColorCache = new RecentColorCache();
|
||||
private List<Color> recentColors = new ArrayList<>();
|
||||
private String activeTabName;
|
||||
|
||||
public GhidraColorChooser() {
|
||||
super();
|
||||
|
||||
init();
|
||||
}
|
||||
|
||||
public GhidraColorChooser(Color 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) {
|
||||
@@ -45,19 +78,58 @@ public class GhidraColorChooser extends JColorChooser {
|
||||
}
|
||||
|
||||
public void addColorToHistory(Color c) {
|
||||
recentColorCache.addColor(c);
|
||||
maybeInstallSettableColorSwatchChooserPanel();
|
||||
historyColorCache.addColor(c);
|
||||
installHistoryColors();
|
||||
}
|
||||
|
||||
public void setColorHistory(List<Color> colors) {
|
||||
for (Color color : colors) {
|
||||
recentColorCache.addColor(color);
|
||||
historyColorCache.addColor(color);
|
||||
}
|
||||
maybeInstallSettableColorSwatchChooserPanel();
|
||||
|
||||
installHistoryColors();
|
||||
}
|
||||
|
||||
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) {
|
||||
activeTabName = tabName;
|
||||
doSetActiveTab();
|
||||
}
|
||||
|
||||
public String getActiveTab() {
|
||||
return activeTabName;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public Color showDialog(Component centerOverComponent) {
|
||||
OKListener okListener = new OKListener();
|
||||
JDialog dialog = createDialog(centerOverComponent, title, true, this, okListener, null);
|
||||
doSetActiveTab(dialog);
|
||||
|
||||
dialog.show(); // blocks until user brings dialog down...
|
||||
|
||||
Color color = okListener.getColor();
|
||||
if (color != null) {
|
||||
recentColorCache.addColor(color);
|
||||
historyColorCache.addColor(color);
|
||||
}
|
||||
return color; // null if the user cancels
|
||||
}
|
||||
|
||||
private void doSetActiveTab(JDialog dialog) {
|
||||
private void doSetActiveTab() {
|
||||
if (activeTabName == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
JTabbedPane pane = findTabbedPane(dialog);
|
||||
JTabbedPane pane = findTabbedPane(this);
|
||||
if (pane == null) {
|
||||
return;
|
||||
}
|
||||
@@ -126,24 +202,28 @@ public class GhidraColorChooser extends JColorChooser {
|
||||
return null;
|
||||
}
|
||||
|
||||
private void maybeInstallSettableColorSwatchChooserPanel() {
|
||||
if (recentColorCache.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
private SettableColorSwatchChooserPanel getCustomSwatchPanel() {
|
||||
|
||||
List<Color> mruColorList = recentColorCache.getMRUColorList();
|
||||
AbstractColorChooserPanel[] chooserPanels = getChooserPanels();
|
||||
if (chooserPanels != null & chooserPanels.length > 1) {
|
||||
AbstractColorChooserPanel panel = chooserPanels[0];
|
||||
if (panel instanceof SettableColorSwatchChooserPanel) {
|
||||
// we've already added our panel--reuse
|
||||
((SettableColorSwatchChooserPanel) panel).setRecentColors(mruColorList);
|
||||
return;
|
||||
return (SettableColorSwatchChooserPanel) panel;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private SettableColorSwatchChooserPanel installSettableColorSwatchChooserPanel() {
|
||||
|
||||
SettableColorSwatchChooserPanel swatchPanel = getCustomSwatchPanel();
|
||||
if (swatchPanel != null) {
|
||||
return swatchPanel; // already installed
|
||||
}
|
||||
|
||||
AbstractColorChooserPanel[] chooserPanels = getChooserPanels();
|
||||
SettableColorSwatchChooserPanel newSwatchPanel =
|
||||
new SettableColorSwatchChooserPanel(mruColorList);
|
||||
new SettableColorSwatchChooserPanel();
|
||||
AbstractColorChooserPanel[] newChooserPanels =
|
||||
new AbstractColorChooserPanel[chooserPanels.length];
|
||||
newChooserPanels[0] = newSwatchPanel;
|
||||
@@ -153,6 +233,7 @@ public class GhidraColorChooser extends JColorChooser {
|
||||
}
|
||||
|
||||
setChooserPanels(newChooserPanels);
|
||||
return newSwatchPanel;
|
||||
}
|
||||
|
||||
//==================================================================================================
|
||||
@@ -173,7 +254,7 @@ public class GhidraColorChooser extends JColorChooser {
|
||||
}
|
||||
|
||||
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() {
|
||||
super(16, 0.75f, true);
|
||||
|
||||
+280
-89
@@ -16,43 +16,72 @@
|
||||
package docking.options.editor;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.datatransfer.Clipboard;
|
||||
import java.awt.event.*;
|
||||
import java.io.Serializable;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.border.LineBorder;
|
||||
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 generic.theme.GThemeDefaults.Colors;
|
||||
import generic.theme.GThemeDefaults.Colors.Java;
|
||||
import generic.theme.GThemeDefaults.Colors.Messages;
|
||||
import ghidra.util.ColorUtils;
|
||||
import ghidra.util.layout.VerticalLayout;
|
||||
import ghidra.util.WebColors;
|
||||
import ghidra.util.layout.HorizontalLayout;
|
||||
|
||||
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 List<Color> recentColors;
|
||||
private SwatchPanel swatchPanel;
|
||||
private RecentSwatchPanel recentSwatchPanel;
|
||||
private HistorySwatchPanel historySwatchPanel;
|
||||
private JTextField colorNameField;
|
||||
private GDLabel colorValueLabel;
|
||||
|
||||
public SettableColorSwatchChooserPanel(List<Color> recentColors) {
|
||||
setRecentColors(recentColors);
|
||||
private MainSwatchListener mainSwatchListener;
|
||||
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) {
|
||||
this.recentColors = recentColors;
|
||||
if (historySwatchPanel != null) {
|
||||
historySwatchPanel.setRecentColors(recentColors);
|
||||
if (recentSwatchPanel != null) {
|
||||
recentSwatchPanel.setRecentColors(recentColors);
|
||||
}
|
||||
}
|
||||
|
||||
public List<Color> getRecentColors() {
|
||||
if (recentSwatchPanel != null) {
|
||||
return recentSwatchPanel.getRecentColors();
|
||||
}
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDisplayName() {
|
||||
return UIManager.getString("ColorChooser.swatchesNameText");
|
||||
@@ -115,7 +144,7 @@ public class SettableColorSwatchChooserPanel extends AbstractColorChooserPanel {
|
||||
swatchPanel.getAccessibleContext().setAccessibleName(getDisplayName());
|
||||
|
||||
recentSwatchPanel = new RecentSwatchPanel();
|
||||
recentSwatchPanel.getAccessibleContext().setAccessibleName(recentStr);
|
||||
recentSwatchPanel.getAccessibleContext().setAccessibleName(recentText);
|
||||
|
||||
mainSwatchListener = new MainSwatchListener();
|
||||
swatchPanel.addMouseListener(mainSwatchListener);
|
||||
@@ -124,62 +153,169 @@ public class SettableColorSwatchChooserPanel extends AbstractColorChooserPanel {
|
||||
|
||||
LineBorder border = new LineBorder(Java.BORDER);
|
||||
swatchPanel.setBorder(border);
|
||||
gbc.gridx = 0;
|
||||
gbc.gridy = 0;
|
||||
gbc.weightx = 1.0;
|
||||
gbc.gridwidth = 2;
|
||||
gbc.gridheight = 2;
|
||||
gbc.weighty = 1.0;
|
||||
gbc.anchor = GridBagConstraints.PAGE_START;
|
||||
superHolder.add(swatchPanel, gbc);
|
||||
|
||||
recentSwatchPanel.addMouseListener(recentSwatchListener);
|
||||
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
|
||||
historySwatchPanel = new HistorySwatchPanel(recentColors);
|
||||
historySwatchListener = new HistorySwatchListener();
|
||||
JLabel recentLabel = new GLabel(recentText);
|
||||
recentLabel.setLabelFor(recentSwatchPanel);
|
||||
|
||||
JPanel recentPanel = new JPanel(new BorderLayout());
|
||||
recentPanel.add(recentLabel, BorderLayout.NORTH);
|
||||
recentPanel.add(recentSwatchPanel, BorderLayout.CENTER);
|
||||
|
||||
historySwatchPanel = new HistorySwatchPanel(historyColors);
|
||||
historySwatchPanel.addMouseListener(historySwatchListener);
|
||||
historySwatchListener = new HistorySwatchListener();
|
||||
historySwatchPanel.setBorder(border);
|
||||
JPanel historyLabelHolder = new JPanel(new BorderLayout());
|
||||
|
||||
JPanel historyPanel = new JPanel(new BorderLayout());
|
||||
JLabel historyLabel = new GLabel("History:");
|
||||
historyLabel.setLabelFor(historySwatchPanel);
|
||||
historyLabelHolder.add(historyLabel, BorderLayout.NORTH);
|
||||
gbc.weighty = 0.0;
|
||||
gbc.gridwidth = GridBagConstraints.REMAINDER;
|
||||
gbc.gridheight = 1;
|
||||
//superHolder.add( historyLabelHolder, gbc );
|
||||
//superHolder.add( historySwatchPanel, gbc );
|
||||
historyPanel.add(historyLabel, BorderLayout.NORTH);
|
||||
historyPanel.add(historySwatchPanel, BorderLayout.CENTER);
|
||||
|
||||
JPanel recentAndHistoryPanel = new JPanel(new VerticalLayout(1));
|
||||
recentAndHistoryPanel.add(recentLabelHolder);
|
||||
recentAndHistoryPanel.add(recentSwatchPanel);
|
||||
recentAndHistoryPanel.add(Box.createVerticalStrut(2));
|
||||
recentAndHistoryPanel.add(historyLabelHolder);
|
||||
recentAndHistoryPanel.add(historySwatchPanel);
|
||||
superHolder.add(Box.createHorizontalStrut(5));
|
||||
superHolder.add(recentAndHistoryPanel);
|
||||
JPanel recentAndHistoryPanel = new JPanel(new HorizontalLayout(10));
|
||||
recentAndHistoryPanel.add(recentPanel);
|
||||
recentAndHistoryPanel.add(historyPanel);
|
||||
|
||||
gbc.gridx = 2;
|
||||
gbc.gridy = 0;
|
||||
gbc.weighty = 0.0;
|
||||
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);
|
||||
}
|
||||
|
||||
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
|
||||
public void uninstallChooserPanel(JColorChooser enclosingChooser) {
|
||||
ColorSelectionModel model = getColorSelectionModel();
|
||||
model.removeChangeListener(colorValueUpdateListener);
|
||||
|
||||
super.uninstallChooserPanel(enclosingChooser);
|
||||
swatchPanel.removeMouseListener(mainSwatchListener);
|
||||
recentSwatchPanel.removeMouseListener(recentSwatchListener);
|
||||
historySwatchPanel.removeMouseListener(historySwatchListener);
|
||||
swatchPanel = null;
|
||||
recentSwatchPanel = null;
|
||||
recentSwatchListener = null;
|
||||
mainSwatchListener = null;
|
||||
colorNameField.getDocument().removeDocumentListener(colorNameListener);
|
||||
|
||||
removeAll(); // strip out all the sub-components
|
||||
}
|
||||
|
||||
@@ -188,7 +324,7 @@ public class SettableColorSwatchChooserPanel extends AbstractColorChooserPanel {
|
||||
// stub
|
||||
}
|
||||
|
||||
class HistorySwatchListener extends MouseAdapter {
|
||||
private class HistorySwatchListener extends MouseAdapter {
|
||||
@Override
|
||||
public void mousePressed(MouseEvent e) {
|
||||
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
|
||||
public void mousePressed(MouseEvent e) {
|
||||
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
|
||||
public void mousePressed(MouseEvent e) {
|
||||
Color color = swatchPanel.getColorForLocation(e.getX(), e.getY());
|
||||
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 {
|
||||
|
||||
private List<Color> recentColors;
|
||||
|
||||
RecentSwatchPanel() {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
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();
|
||||
List<Color> getRecentColors() {
|
||||
return List.of(colors);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -367,8 +502,64 @@ class HistorySwatchPanel extends SwatchPanel {
|
||||
for (int i = 0; i < recentColorCount; 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;
|
||||
}
|
||||
|
||||
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() {
|
||||
((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;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Color;
|
||||
import java.awt.event.*;
|
||||
import java.beans.PropertyChangeEvent;
|
||||
|
||||
@@ -46,7 +45,7 @@ public class ThemeColorTable extends JPanel implements ActionContextProvider {
|
||||
public ThemeColorTable(ThemeManager themeManager, GThemeValuesCache valuesProvider) {
|
||||
super(new BorderLayout());
|
||||
this.themeManager = themeManager;
|
||||
colorTableModel = new ThemeColorTableModel(valuesProvider);
|
||||
colorTableModel = createModel(valuesProvider);
|
||||
|
||||
filterTable = new GFilterTable<>(colorTableModel);
|
||||
table = filterTable.getTable();
|
||||
@@ -82,7 +81,10 @@ public class ThemeColorTable extends JPanel implements ActionContextProvider {
|
||||
});
|
||||
|
||||
add(filterTable, BorderLayout.CENTER);
|
||||
}
|
||||
|
||||
ThemeColorTableModel createModel(GThemeValuesCache valuesProvider) {
|
||||
return new ThemeColorTableModel(valuesProvider);
|
||||
}
|
||||
|
||||
void colorValueChanged(PropertyChangeEvent event) {
|
||||
@@ -116,7 +118,7 @@ public class ThemeColorTable extends JPanel implements ActionContextProvider {
|
||||
}
|
||||
String id = currentValue.getId();
|
||||
ColorValue themeValue = colorTableModel.getThemeValue(id);
|
||||
return new ThemeTableContext<Color>(currentValue, themeValue);
|
||||
return new ThemeTableContext<>(currentValue, themeValue);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ import ghidra.util.table.column.GColumnRenderer;
|
||||
* Table model for theme colors
|
||||
*/
|
||||
public class ThemeColorTableModel extends GDynamicColumnTableModel<ColorValue, Object> {
|
||||
private List<ColorValue> colors;
|
||||
protected List<ColorValue> colors;
|
||||
private GThemeValueMap currentValues;
|
||||
private GThemeValueMap themeValues;
|
||||
private GThemeValueMap defaultValues;
|
||||
@@ -57,6 +57,7 @@ public class ThemeColorTableModel extends GDynamicColumnTableModel<ColorValue, O
|
||||
public void reloadCurrent() {
|
||||
currentValues = valuesCache.getCurrentValues();
|
||||
colors = currentValues.getColors();
|
||||
filter();
|
||||
fireTableDataChanged();
|
||||
}
|
||||
|
||||
@@ -81,6 +82,11 @@ public class ThemeColorTableModel extends GDynamicColumnTableModel<ColorValue, O
|
||||
lightDefaultValues = valuesCache.getLightValues();
|
||||
darkDefaultValues = valuesCache.getDarkValues();
|
||||
|
||||
filter();
|
||||
}
|
||||
|
||||
protected void filter() {
|
||||
// for subclasses
|
||||
}
|
||||
|
||||
@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() {
|
||||
groupingCombo = new JComboBox<GroupingStrategy>(GroupingStrategy.values());
|
||||
groupingCombo = new JComboBox<>(GroupingStrategy.values());
|
||||
groupingCombo.setSelectedItem(GroupingStrategy.BIN_64);
|
||||
groupingCombo.addItemListener(this::comboChanged);
|
||||
return groupingCombo;
|
||||
@@ -79,7 +79,7 @@ public class ThemeColorTree extends JPanel implements ActionContextProvider {
|
||||
|
||||
private Component buildSortCombo() {
|
||||
ColorSorter[] sorters = { RGB, RBG, GRB, GBR, BRG, BGR };
|
||||
colorSortCombo = new JComboBox<ColorSorter>(sorters);
|
||||
colorSortCombo = new JComboBox<>(sorters);
|
||||
colorSortCombo.addItemListener(this::comboChanged);
|
||||
return colorSortCombo;
|
||||
}
|
||||
@@ -326,25 +326,25 @@ public class ThemeColorTree extends JPanel implements ActionContextProvider {
|
||||
GroupingStrategy grouping = (GroupingStrategy) groupingCombo.getSelectedItem();
|
||||
switch (grouping) {
|
||||
case REF:
|
||||
return new ArrayList<GTreeNode>(nodes);
|
||||
return new ArrayList<>(nodes);
|
||||
case SAME_COLORS:
|
||||
List<ColorNode> grouped = groupSameColors(nodes);
|
||||
return new ArrayList<GTreeNode>(grouped);
|
||||
return new ArrayList<>(grouped);
|
||||
case BIN_8:
|
||||
bins = 8;
|
||||
grouped = groupSameColors(nodes);
|
||||
List<ColorNode> binned = binColors(grouped, bins);
|
||||
return new ArrayList<GTreeNode>(binned);
|
||||
return new ArrayList<>(binned);
|
||||
case BIN_64:
|
||||
bins = 64;
|
||||
grouped = groupSameColors(nodes);
|
||||
binned = binColors(grouped, bins);
|
||||
return new ArrayList<GTreeNode>(binned);
|
||||
return new ArrayList<>(binned);
|
||||
case BIN_512:
|
||||
bins = 512;
|
||||
grouped = groupSameColors(nodes);
|
||||
binned = binColors(grouped, bins);
|
||||
return new ArrayList<GTreeNode>(binned);
|
||||
return new ArrayList<>(binned);
|
||||
default:
|
||||
return new ArrayList<>();
|
||||
}
|
||||
@@ -361,6 +361,10 @@ public class ThemeColorTree extends JPanel implements ActionContextProvider {
|
||||
if (colorNode.isIndirect()) {
|
||||
String refId = colorNode.getReferenceId();
|
||||
ColorValueNode parent = idMap.get(refId);
|
||||
if (parent == null) {
|
||||
// this implies the user has changed id names and refreshed the tool
|
||||
continue;
|
||||
}
|
||||
parent.addNode(colorNode);
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -47,6 +47,7 @@ public class ThemeEditorDialog extends DialogComponentProvider {
|
||||
private ThemeFontTable fontTable;
|
||||
private ThemeIconTable iconTable;
|
||||
private ThemeColorTree colorTree;
|
||||
private ThemeColorTable paletteTable;
|
||||
|
||||
private ThemeManager themeManager;
|
||||
|
||||
@@ -90,7 +91,8 @@ public class ThemeEditorDialog extends DialogComponentProvider {
|
||||
DockingAction reloadDefaultsAction = new ActionBuilder("Restore Theme Values", getTitle())
|
||||
.toolBarIcon(new GIcon("icon.refresh"))
|
||||
.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"))
|
||||
.onAction(e -> restoreCallback())
|
||||
.build();
|
||||
@@ -151,6 +153,7 @@ public class ThemeEditorDialog extends DialogComponentProvider {
|
||||
private void reset() {
|
||||
colorTree.rebuild();
|
||||
colorTable.reloadAll();
|
||||
paletteTable.reloadAll();
|
||||
fontTable.reloadAll();
|
||||
iconTable.reloadAll();
|
||||
updateButtons();
|
||||
@@ -177,6 +180,7 @@ public class ThemeEditorDialog extends DialogComponentProvider {
|
||||
}
|
||||
colorTree.rebuild();
|
||||
colorTable.reloadAll();
|
||||
paletteTable.reloadAll();
|
||||
fontTable.reloadAll();
|
||||
iconTable.reloadAll();
|
||||
});
|
||||
@@ -233,11 +237,13 @@ public class ThemeEditorDialog extends DialogComponentProvider {
|
||||
iconTable = new ThemeIconTable(themeManager, valuesCache);
|
||||
fontTable = new ThemeFontTable(themeManager, valuesCache);
|
||||
colorTree = new ThemeColorTree(themeManager);
|
||||
paletteTable = new ThemeColorPaletteTable(themeManager, valuesCache);
|
||||
|
||||
tabbedPane.add("Colors", colorTable);
|
||||
tabbedPane.add("Fonts", fontTable);
|
||||
tabbedPane.add("Icons", iconTable);
|
||||
tabbedPane.add("Color Tree", colorTree);
|
||||
tabbedPane.add("Palette", paletteTable);
|
||||
|
||||
return tabbedPane;
|
||||
}
|
||||
@@ -293,6 +299,7 @@ public class ThemeEditorDialog extends DialogComponentProvider {
|
||||
if (event.hasAnyColorChanged()) {
|
||||
colorTable.reloadCurrent();
|
||||
colorTree.rebuild();
|
||||
paletteTable.reloadCurrent();
|
||||
}
|
||||
if (event.hasAnyFontChanged()) {
|
||||
fontTable.reloadCurrent();
|
||||
@@ -300,6 +307,7 @@ public class ThemeEditorDialog extends DialogComponentProvider {
|
||||
if (event.hasAnyIconChanged()) {
|
||||
iconTable.reloadCurrent();
|
||||
}
|
||||
|
||||
updateButtons();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,6 +130,8 @@ public abstract class ThemeValueEditor<T> {
|
||||
panel.add(editor.getCustomEditor(), BorderLayout.CENTER);
|
||||
|
||||
editor.setValue(initialValue);
|
||||
storeState(); // save the initial value to the history
|
||||
|
||||
editor.addPropertyChangeListener(internalListener);
|
||||
return panel;
|
||||
}
|
||||
|
||||
@@ -23,6 +23,8 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import docking.widgets.EmptyBorderButton;
|
||||
import docking.widgets.OptionDialog;
|
||||
import docking.widgets.label.GDHtmlLabel;
|
||||
@@ -106,8 +108,13 @@ public class TaskMonitorComponent extends JPanel implements TaskMonitor {
|
||||
shouldCancelRunnable = () -> {
|
||||
int currentTaskID = taskID.get();
|
||||
|
||||
String trailingText = "?";
|
||||
String name = getTaskName();
|
||||
if (!StringUtils.isBlank(name)) {
|
||||
trailingText = " " + name + "?";
|
||||
}
|
||||
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()) {
|
||||
cancel();
|
||||
|
||||
@@ -2,17 +2,17 @@
|
||||
|
||||
# visual graph
|
||||
color.bg.visualgraph = color.bg
|
||||
color.bg.highlight.visualgraph = rgba(255,255,0,155) // somewhat transparent yellow
|
||||
color.bg.visualgraph.message = rgb(138, 185, 241) // jordy blue
|
||||
color.bg.highlight.visualgraph = color.palette.highlight.transparent.yellow
|
||||
color.bg.visualgraph.message = color.palette.lightcornflowerblue
|
||||
|
||||
color.bg.visualgraph.drop.shadow.dark = black
|
||||
color.bg.visualgraph.drop.shadow.light = gray
|
||||
color.bg.visualgraph.drop.shadow.dark = color.palette.black
|
||||
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.fg.visualgraph.dockingvertex = black
|
||||
color.visualgraph.dockingvertex.cursor = red
|
||||
color.bg.visualgraph.dockingvertex = color.palette.darkcyan
|
||||
color.fg.visualgraph.dockingvertex = color.palette.black
|
||||
color.visualgraph.dockingvertex.cursor = color.palette.red
|
||||
|
||||
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
|
||||
@@ -24,12 +24,10 @@ color.visualgraph.view.satellite.edge.selected = color.palette.lime
|
||||
color.visualgraph.view.satellite.edge.hovered = color.palette.lime
|
||||
|
||||
|
||||
|
||||
# graph display
|
||||
color.graphdisplay.vertex.default = green
|
||||
color.graphdisplay.edge.default = green
|
||||
color.graphdisplay.vertex.selected = blue
|
||||
color.graphdisplay.edge.selected = blue
|
||||
color.graphdisplay.vertex.default = color.palette.green
|
||||
color.graphdisplay.edge.default = color.palette.green
|
||||
color.graphdisplay.vertex.selected = color.palette.blue
|
||||
color.graphdisplay.edge.selected = color.palette.blue
|
||||
|
||||
icon.graph.satellite = network-wireless-16.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.fit.to.window = view-fullscreen.png
|
||||
|
||||
|
||||
|
||||
font.graphdisplay.default = dialog-bold-18
|
||||
font.graph.component.message = SansSerif-BOLDITALIC-18
|
||||
|
||||
|
||||
|
||||
[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
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user