Skip to content

Commit

Permalink
Console Colors FunctionSignatureDialogue
Browse files Browse the repository at this point in the history
  • Loading branch information
pabx06 committed Oct 2, 2020
1 parent 8c75127 commit df25524
Show file tree
Hide file tree
Showing 7 changed files with 67 additions and 5 deletions.
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@
![ghidra_dark](/Screenshot.png?raw=true)

### how to
1. Download a release
⋅⋅* [v1.0.3](https://github.com/pabx06/buildghidra/releases/tag/v1.0.3) ghidra 0cdc722921cef61b7ca1b7236bdc21079fd4c03e
⋅⋅* [v1.0.2](https://github.com/pabx06/buildghidra/releases/tag/v1.0.2) ghidra 7e5f015d651b9c5e7825cb10bc50338b5af67538
2. Patch _code_browser.tcd if not already done `~/.ghidra/.ghidra_9.2_DEV/tools/_code_browser.tcd` to `~/.ghidra/.ghidra_9.2_DEV/tools/_code_browser_dark_night.tcd` with [ghidra_darknight](https://github.com/elliiot/ghidra_darknight)
1. Download a release [release](https://github.com/pabx06/buildghidra/releases) or build your own see `./scripts/` `./patch/`
2. Patch _code_browser.tcd . If not already done. Patch `~/.ghidra/.ghidra_9.2_DEV/tools/_code_browser.tcd` to `~/.ghidra/.ghidra_9.2_DEV/tools/_code_browser_dark_night.tcd` with [ghidra_darknight](https://github.com/elliiot/ghidra_darknight)
3. You know have a second code browser icon [dark](/dark_night.png). us it (drag and drop project file)

### ChangeLog
- v1.1.0 Color About,Tips of the day, Bytes Viewer, save data, CodeBrowser Tooltip, ARM manual
- v1.1.1 Color Console Interpreter
- v1.1.0 Color About,Tips of the day, Bytes Viewer, save data, CodeBrowser Tooltip, ARM manual

### TODO List
- finish Bytes Browser color
- tweak functionEditorDialogue DataTyper/Editor/CellEdit/Render
Binary file added dark_night.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions patch/ConsoleTextPane.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/framework/main/ConsoleTextPane.java b/Ghidra/Features/Base/src/main/java/ghidra/framework/main/ConsoleTextPane.java
index 8457f2e2d..e013db510 100644
--- a/Ghidra/Features/Base/src/main/java/ghidra/framework/main/ConsoleTextPane.java
+++ b/Ghidra/Features/Base/src/main/java/ghidra/framework/main/ConsoleTextPane.java
@@ -200,7 +200,7 @@ public class ConsoleTextPane extends JTextPane implements OptionsChangeListener
outputAttributeSet.addAttribute(StyleConstants.FontSize, font.getSize());
outputAttributeSet.addAttribute(StyleConstants.Italic, font.isItalic());
outputAttributeSet.addAttribute(StyleConstants.Bold, font.isBold());
- outputAttributeSet.addAttribute(StyleConstants.Foreground, Color.BLACK);
+ outputAttributeSet.addAttribute(StyleConstants.Foreground, Color.WHITE);

errorAttributeSet = new SimpleAttributeSet();
errorAttributeSet.addAttribute(CUSTOM_ATTRIBUTE_KEY, ERROR_ATTRIBUTE_VALUE);
13 changes: 13 additions & 0 deletions patch/DropDownTextField.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/Ghidra/Framework/Docking/src/main/java/docking/widgets/DropDownTextField.java b/Ghidra/Framework/Docking/src/main/java/docking/widgets/DropDownTextField.java
index 2aca644a8..e057ea354 100644
--- a/Ghidra/Framework/Docking/src/main/java/docking/widgets/DropDownTextField.java
+++ b/Ghidra/Framework/Docking/src/main/java/docking/widgets/DropDownTextField.java
@@ -63,7 +63,7 @@ public class DropDownTextField<T> extends JTextField implements GComponent {
private static final int DEFAULT_MAX_UPDATE_DELAY = 2000;
private static final int MIN_HEIGHT = 300;
private static final int MIN_WIDTH = 200;
- protected static final Color TOOLTIP_WINDOW_BGCOLOR = new Color(255, 255, 225);
+ protected static final Color TOOLTIP_WINDOW_BGCOLOR = new Color(0x32, 0x32, 0x32);

private JWindow toolTipWindow; // delayed initialization for parenting
private JWindow matchingWindow; // delayed initialization for parenting
13 changes: 13 additions & 0 deletions patch/FunctionSignatureTextField.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/editor/FunctionSignatureTextField.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/editor/FunctionSignatureTextField.java
index d42c13976..f0c61a24d 100644
--- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/editor/FunctionSignatureTextField.java
+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/editor/FunctionSignatureTextField.java
@@ -34,7 +34,7 @@ class FunctionSignatureTextField extends JTextPane {
private static final String ENTER_ACTION_NAME = "ENTER";
private static final String ESCAPE_ACTION_NAME = "ESCAPE";
private static final String TAB_ACTION_NAME = "TAB";
- public static Color DEFAULT_COLOR = Color.black;
+ public static Color DEFAULT_COLOR = Color.white;
public static Color PARAMETER_NAME_COLOR = new Color(155, 50, 155);
public static Color FUNCTION_NAME_COLOR = blue;
public static Color ERROR_NAME_COLOR = red;
13 changes: 13 additions & 0 deletions patch/InterpreterPanel.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/interpreter/InterpreterPanel.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/interpreter/InterpreterPanel.java
index 933189da1..2cc03fe6c 100644
--- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/interpreter/InterpreterPanel.java
+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/interpreter/InterpreterPanel.java
@@ -43,7 +43,7 @@ public class InterpreterPanel extends JPanel implements OptionsChangeListener {
"This is the font that will be used in the Console. " +
"Double-click the font example to change it.";

- private static final Color NORMAL_COLOR = Color.black;
+ private static final Color NORMAL_COLOR = Color.WHITE;
private static final Color ERROR_COLOR = Color.red;

public enum TextType {
6 changes: 6 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ patch ./Ghidra/Features/Base/src/main/java/ghidra/framework/main/InfoPanel.java
patch ./Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/byteviewer/ByteViewerPanel.java ../patch/ByteViewerPanel.patch
patch ./Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/byteviewer/ByteViewerComponent.java ../patch/ByteViewerComponent.patch

patch ./Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/interpreter/InterpreterPanel.java ../patch/InterpreterPanel.patch
patch ./Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/editor/FunctionSignatureTextField.java ../patch/FunctionSignatureTextField.patch

patch ./Ghidra/Framework/Docking/src/main/java/docking/widgets/DropDownTextField.java ../patch/DropDownTextField.patch
patch ./Ghidra/Features/Base/src/main/java/ghidra/framework/main/ConsoleTextPane.java > ../patch/ConsoleTextPane.patch

#patch launch.sh
patch ./Ghidra/RuntimeScripts/Common/support/launch.properties ../patch/launch.properties.patch
patch ./Ghidra/RuntimeScripts/Linux/support/launch.sh ../patch/launch.sh.patch
Expand Down

0 comments on commit df25524

Please sign in to comment.