From b953998f7dc73ab7dff8fe93f398b6e5ca795a8c Mon Sep 17 00:00:00 2001 From: dragonmacher <48328597+dragonmacher@users.noreply.github.com> Date: Tue, 9 May 2023 12:04:37 -0400 Subject: [PATCH] GP-3397 - minor theme fixes --- .../Features/Base/data/base.theme.properties | 4 +-- .../AnalysisEnablementTableModel.java | 25 +++---------------- .../data/decompiler.theme.properties | 2 +- .../app/decompiler/DecompileOptions.java | 6 ++--- 4 files changed, 8 insertions(+), 29 deletions(-) diff --git a/Ghidra/Features/Base/data/base.theme.properties b/Ghidra/Features/Base/data/base.theme.properties index 9b1d743bc6..9223843e8c 100644 --- a/Ghidra/Features/Base/data/base.theme.properties +++ b/Ghidra/Features/Base/data/base.theme.properties @@ -35,10 +35,8 @@ color.fg.interpreterconsole.error = color.fg.error color.bg.markerservice = color.bg color.bg.search.highlight = color.bg.highlight -color.bg.search.current.line.highlight = color.palette.yellow +color.bg.search.highlight.current.line = color.palette.yellow -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 diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/AnalysisEnablementTableModel.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/AnalysisEnablementTableModel.java index 0aac30cb92..dc2acd6e69 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/AnalysisEnablementTableModel.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/AnalysisEnablementTableModel.java @@ -19,8 +19,7 @@ import java.awt.Color; import java.awt.Component; import java.util.List; -import javax.swing.JComponent; -import javax.swing.JTable; +import javax.swing.*; import docking.widgets.table.*; import generic.theme.GColor; @@ -40,9 +39,6 @@ public class AnalysisEnablementTableModel //@formatter:off private static Color FG_COLOR_PROTOTYPE = new GColor("color.fg.analysis.options.prototype"); private static Color FG_COLOR_PROTOTYPE_SELECTED = new GColor("color.fg.analysis.options.prototype.selected"); - - private static Color BG_COLOR_NOT_DEFAULT_ENABLEMENT = new GColor("color.bg.analysis.options.not.default.enablement"); - private static Color BG_COLOR_NOT_DEFAULT_ENABLEMENT_SELECTED = new GColor("color.bg.analysis.options.not.default.enablement.selected"); //@formatter:on private List analyzerStates; @@ -115,7 +111,7 @@ public class AnalysisEnablementTableModel //================================================================================================== // Inner Classes -//================================================================================================== +//================================================================================================== private class AnalyzerEnabledColumn extends AbstractDynamicTableColumn { @@ -179,15 +175,9 @@ public class AnalysisEnablementTableModel } // not the default enablement - if (isSelected) { - component.setBackground(BG_COLOR_NOT_DEFAULT_ENABLEMENT_SELECTED); - } - else { - component.setBackground(BG_COLOR_NOT_DEFAULT_ENABLEMENT); - } - + JLabel label = (JLabel) component; + label.setText("*"); setToolTip(component, "This option differs from the default"); - return component; } @@ -222,13 +212,6 @@ public class AnalysisEnablementTableModel // not the default enablement component.setForeground(Palette.BLACK); - if (data.isSelected()) { - component.setBackground(BG_COLOR_NOT_DEFAULT_ENABLEMENT_SELECTED); - } - else { - component.setBackground(BG_COLOR_NOT_DEFAULT_ENABLEMENT); - } - setToolTip(component, "This option differs from the default"); return component; } diff --git a/Ghidra/Features/Decompiler/data/decompiler.theme.properties b/Ghidra/Features/Decompiler/data/decompiler.theme.properties index 757fc8d7ed..d0d1ad0c24 100644 --- a/Ghidra/Features/Decompiler/data/decompiler.theme.properties +++ b/Ghidra/Features/Decompiler/data/decompiler.theme.properties @@ -18,7 +18,7 @@ color.bg.decompiler.current.variable = color.palette.highlight.transparent.yello 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.highlights.find = color.palette.slateblue color.bg.decompiler.pcode.dfg.vertex.default = color.palette.red color.bg.decompiler.pcode.dfg.vertex.selected = color.palette.lightcoral diff --git a/Ghidra/Features/Decompiler/src/main/java/ghidra/app/decompiler/DecompileOptions.java b/Ghidra/Features/Decompiler/src/main/java/ghidra/app/decompiler/DecompileOptions.java index db3d7486ee..fb64393bd8 100644 --- a/Ghidra/Features/Decompiler/src/main/java/ghidra/app/decompiler/DecompileOptions.java +++ b/Ghidra/Features/Decompiler/src/main/java/ghidra/app/decompiler/DecompileOptions.java @@ -366,9 +366,7 @@ public class DecompileOptions { private final static GColor HIGHLIGHT_DEFAULT_COLOR = new GColor("color.fg.decompiler"); private static final String SEARCH_HIGHLIGHT_MSG = "Display.Color for Highlighting Find Matches"; - private static final GColor SEARCH_HIGHLIGHT_COLOR = new GColor("color.bg.decompiler.highlights.search"); - - + private static final GColor SEARCH_HIGHLIGHT_COLOR = new GColor("color.bg.decompiler.highlights.find"); //@formatter:on private static final String BACKGROUND_COLOR_MSG = "Display.Background Color"; @@ -906,7 +904,7 @@ public class DecompileOptions { } /** - * @return color used on tokens that need to warn of an error or other unusual conditions + * @return color used on tokens that need to warn of an error or other unusual conditions */ public Color getErrorColor() { return ERROR_COLOR;