diff --git a/Ghidra/Features/Base/data/base.listing.theme.properties b/Ghidra/Features/Base/data/base.listing.theme.properties index f9fc4a35c4..60c1dac9a3 100644 --- a/Ghidra/Features/Base/data/base.listing.theme.properties +++ b/Ghidra/Features/Base/data/base.listing.theme.properties @@ -5,12 +5,12 @@ color.bg.currentline.listing = color.bg.currentline color.bg.selection.listing = color.bg.selection color.bg.highlight.listing = color.bg.highlight -color.bg.listing.tabs.selected = #788CBD +color.bg.listing.tabs.selected = [color]textHighlight color.bg.listing.tabs.unselected = system.color.bg.application 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.fg.listing.tabs.text.selected = black +color.fg.listing.tabs.text.selected = [color]textHighlightText color.fg.listing.tabs.text.unselected = color.fg color.fg.listing.tabs.list = black diff --git a/Ghidra/Framework/Docking/data/docking.theme.properties b/Ghidra/Framework/Docking/data/docking.theme.properties index 6fdd1754d1..51aa835e9f 100644 --- a/Ghidra/Framework/Docking/data/docking.theme.properties +++ b/Ghidra/Framework/Docking/data/docking.theme.properties @@ -28,9 +28,9 @@ color.fg.help.selector.code.path = #4682B4 color.bg.splashscreen = black -color.bg.header.active = mintcream -color.bg.header.inactive = rgb(150, 150, 150) -color.fg.header.active = black +color.bg.header.active = [color]textHighlight +color.bg.header.inactive = #A1A1A1 +color.fg.header.active = [color]textHighlightText color.fg.header.inactive = black color.header.drag.cursor = black @@ -190,6 +190,12 @@ font.splash.status = Serif-BOLD-12 font.table.header.number = arial-BOLD-12 font.input.hint = monospaced-PLAIN-10 + + + + + + [Dark Defaults] color.bg = #1c1d1e @@ -210,10 +216,7 @@ color.fg.help.selector.code.path = #5BA5E3 color.bg.splashscreen = black -color.bg.header.active = #4c87c8 -color.bg.header.inactive = #466a92 -color.fg.header.active = lightGray -color.fg.header.inactive = black +color.bg.header.inactive = #6A6A6A color.header.drag.cursor = lightGray color.fg.dialog.status.alert = orange @@ -253,3 +256,4 @@ color.bg.filechooser.shortcut = system.color.bg.widget color.bg.tree = color.bg color.bg.tree.selected = [color]Tree.selectionBackground + diff --git a/Ghidra/Framework/Docking/src/main/help/help/topics/Theming/ThemingUserDocs.html b/Ghidra/Framework/Docking/src/main/help/help/topics/Theming/ThemingUserDocs.html index eb9ff2d102..7aa4168930 100644 --- a/Ghidra/Framework/Docking/src/main/help/help/topics/Theming/ThemingUserDocs.html +++ b/Ghidra/Framework/Docking/src/main/help/help/topics/Theming/ThemingUserDocs.html @@ -121,7 +121,7 @@ tab for the appropriate type and double-click on the ID column or Current Value column of the item you want to change. An editor for that type will appear.

-

Reseting Theme Values

+

Reseting Theme Values

To reset an individual value back to its original theme value, from the main application menu invoke the -

Reloading Default Values

+

Reloading Default Values

This action causes Ghidra to reload all theme default values. It is really only useful for developers who are actively making changes to theme.properties files. To activate this diff --git a/Ghidra/Framework/Docking/src/main/java/docking/GenericHeader.java b/Ghidra/Framework/Docking/src/main/java/docking/GenericHeader.java index 8252b8598a..7131b1086f 100644 --- a/Ghidra/Framework/Docking/src/main/java/docking/GenericHeader.java +++ b/Ghidra/Framework/Docking/src/main/java/docking/GenericHeader.java @@ -30,7 +30,6 @@ import docking.util.AnimationUtils; import docking.widgets.VariableHeightPanel; import docking.widgets.label.GDLabel; import generic.theme.GColor; -import generic.theme.GThemeDefaults.Colors; import generic.theme.GThemeDefaults.Colors.Java; import generic.theme.GThemeDefaults.Colors.Palette; @@ -106,7 +105,7 @@ public class GenericHeader extends JPanel { /** * Signals whether or not to break the toolbar actions into multiple rows. The default is - * to wrap as necessary. + * to wrap as necessary. * @param noWrap true signals not to break the actions into multiple rows */ public void setNoWrapToolbar(boolean noWrap) { @@ -292,7 +291,7 @@ public class GenericHeader extends JPanel { //================================================================================================== // Inner Classes -//================================================================================================== +//================================================================================================== public class TitleFlasher { @@ -349,7 +348,7 @@ public class GenericHeader extends JPanel { setFocusable(false); titleLabel = new GDLabel(); titleLabel.setBorder(BorderFactory.createEmptyBorder(0, 6, 0, 0)); - titleLabel.setForeground(Colors.FOREGROUND); + titleLabel.setForeground(inactiveForeground); titleLabel.setFocusable(false); add(titleLabel, BorderLayout.CENTER); } @@ -371,13 +370,17 @@ public class GenericHeader extends JPanel { Graphics2D g2d = (Graphics2D) g; Rectangle r = getBounds(); + // use full color from 0 to the gradient start so the title text is painted over the + // full color, which makes it a bit more readable + int gradientStartOffset = 100; + int x = r.x + gradientStartOffset; + int y = r.y; GradientPaint gp; if (isSelected) { - gp = new GradientPaint(r.x, r.y, focusColor, r.x + r.width, r.y, getBackground()); + gp = new GradientPaint(x, y, focusColor, r.x + r.width, r.y, getBackground()); } else { - gp = new GradientPaint(r.x, r.y, nonFocusColor, r.x + r.width, r.y, - getBackground()); + gp = new GradientPaint(x, y, nonFocusColor, r.x + r.width, r.y, getBackground()); } g2d.setPaint(gp); diff --git a/Ghidra/Framework/Docking/src/main/java/docking/theme/gui/ThemeColorTableModel.java b/Ghidra/Framework/Docking/src/main/java/docking/theme/gui/ThemeColorTableModel.java index cba8f3dc41..99ad128350 100644 --- a/Ghidra/Framework/Docking/src/main/java/docking/theme/gui/ThemeColorTableModel.java +++ b/Ghidra/Framework/Docking/src/main/java/docking/theme/gui/ThemeColorTableModel.java @@ -166,6 +166,7 @@ public class ThemeColorTableModel extends GDynamicColumnTableModel getComparator() { return (v1, v2) -> { if (v1 == null && v2 == null) { @@ -201,6 +202,11 @@ public class ThemeColorTableModel extends GDynamicColumnTableModel nameToColorMap = new HashMap<>(); - private static final Map colorToNameMap = new HashMap<>(); + private static final Map colorToNameMap = new HashMap<>(); //@formatter:off public static final Color BLACK = registerColor("Black", Color.black); @@ -180,7 +180,7 @@ public abstract class WebColors { * Tries to find a color for the given String value. The String value can either be * a hex string (see {@link Color#decode(String)}) or a web color name as defined * above - * + * * @param value the string value to interpret as a color * @param defaultColor a default color to return if the string can't be converted to a color * @return a color for the given string value or the default color if the string can't be translated @@ -195,7 +195,7 @@ public abstract class WebColors { * the color name will be returned. Otherwise, it will return a hex string for the color as * follows. If the color has an non-opaque alpha value, it will be of the form #rrggbb. If * it has an alpha value,then the format will be #rrggbbaa. - * + * * @param color the color to convert to a string. * @return the string representation for the given color. */ @@ -208,7 +208,7 @@ public abstract class WebColors { * is true, the name of the color will be returned. OOtherwise, it will return a hex string for the color as * follows. If the color has an non-opaque alpha value, it will be of the form #rrggbb. If * it has an alpha value ,then the format will be #rrggbbaa. - * + * * @param color the color to convert to a string. * @param useNameIfPossible if true, the name of the color will be returned if the color is * a WebColor @@ -216,7 +216,7 @@ public abstract class WebColors { */ public static String toString(Color color, boolean useNameIfPossible) { if (useNameIfPossible) { - String name = colorToNameMap.get(color); + String name = colorToNameMap.get(color.getRGB()); if (name != null) { return name; } @@ -235,12 +235,12 @@ public abstract class WebColors { * @return the WebColor name for the given color. Returns null if the color is not a WebColor */ public static String toWebColorName(Color color) { - return colorToNameMap.get(color); + return colorToNameMap.get(color.getRGB()); } private static Color registerColor(String name, Color color) { nameToColorMap.put(name.toLowerCase(), color); - colorToNameMap.put(color, name); + colorToNameMap.put(color.getRGB(), name); return color; } @@ -290,12 +290,12 @@ public abstract class WebColors { *

 	 * #rrggbb
 	 * #rrggbbaa
-	 * 0xrrggbb 
+	 * 0xrrggbb
 	 * 0xrrggbbaa
-	 * 
- * + * + * * Each of the hex digits "rr", "gg", "bb", and "aa" specify the red, green, blue, and alpha - * values respectively. + * values respectively. *

* * @param hexString the string to parse into a color. @@ -337,7 +337,7 @@ public abstract class WebColors { *
 	 * rgb(red, green, blue)
 	 * rgb(red, green, blue, alpha)
-	 * 
+ * * Each of the values "red", "green", "blue", and "alpha" must be integer values between 0-255 *

* @param rgbString the string to parse into a color.