Skip to content

Commit

Permalink
Function ID and FileChooser color
Browse files Browse the repository at this point in the history
  • Loading branch information
pabx06 committed Oct 29, 2020
1 parent b30a932 commit 05ac562
Show file tree
Hide file tree
Showing 3 changed files with 109 additions and 0 deletions.
13 changes: 13 additions & 0 deletions patch/ActiveFidConfigureDialog.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/Ghidra/Features/FunctionID/src/main/java/ghidra/feature/fid/plugin/ActiveFidConfigureDialog.java b/Ghidra/Features/FunctionID/src/main/java/ghidra/feature/fid/plugin/ActiveFidConfigureDialog.java
index e9530bb46..1f880e12f 100644
--- a/Ghidra/Features/FunctionID/src/main/java/ghidra/feature/fid/plugin/ActiveFidConfigureDialog.java
+++ b/Ghidra/Features/FunctionID/src/main/java/ghidra/feature/fid/plugin/ActiveFidConfigureDialog.java
@@ -89,7 +89,7 @@ public class ActiveFidConfigureDialog extends DialogComponentProvider {
private Component buildCheckBoxPanel() {
JPanel panel = new JPanel(new VerticalLayout(5));
panel.setOpaque(true);
- panel.setBackground(Color.WHITE);
+ //panel.setBackground(Color.WHITE);
panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
for (FidFile fidFile : fidFiles) {
GCheckBox checkbox = new GCheckBox(fidFile.getName(), fidFile.isActive());
94 changes: 94 additions & 0 deletions patch/GhidraFileChooser.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
diff --git a/Ghidra/Framework/Docking/src/main/java/docking/widgets/filechooser/GhidraFileChooser.java b/Ghidra/Framework/Docking/src/main/java/docking/widgets/filechooser/GhidraFileChooser.java
index 6023e7657..4ef51442d 100644
--- a/Ghidra/Framework/Docking/src/main/java/docking/widgets/filechooser/GhidraFileChooser.java
+++ b/Ghidra/Framework/Docking/src/main/java/docking/widgets/filechooser/GhidraFileChooser.java
@@ -306,7 +306,7 @@ public class GhidraFileChooser extends DialogComponentProvider
myComputerButton.setName("MY_COMPUTER_BUTTON");
myComputerButton.setIcon(ResourceManager.loadImage("images/computer.png"));
myComputerButton.addActionListener(e -> updateMyComputer());
- myComputerButton.setForeground(FOREROUND_COLOR);
+ //myComputerButton.setForeground(FOREROUND_COLOR);

desktopButton = new FileChooserToggleButton("Desktop") {
@Override
@@ -317,7 +317,7 @@ public class GhidraFileChooser extends DialogComponentProvider
desktopButton.setName("DESKTOP_BUTTON");
desktopButton.setIcon(ResourceManager.loadImage("images/desktop.png"));
desktopButton.addActionListener(e -> updateDesktop());
- desktopButton.setForeground(FOREROUND_COLOR);
+ //desktopButton.setForeground(FOREROUND_COLOR);
desktopButton.setEnabled(fileChooserModel.getDesktopDirectory() != null);

homeButton = new FileChooserToggleButton("Home") {
@@ -329,7 +329,7 @@ public class GhidraFileChooser extends DialogComponentProvider
homeButton.setName("HOME_BUTTON");
homeButton.setIcon(ResourceManager.loadImage("images/user-home.png"));
homeButton.addActionListener(e -> updateHome());
- homeButton.setForeground(FOREROUND_COLOR);
+ //homeButton.setForeground(FOREROUND_COLOR);

recentButton = new FileChooserToggleButton("Recent") {
@Override
@@ -345,7 +345,7 @@ public class GhidraFileChooser extends DialogComponentProvider

recentButton.setIcon(multiIcon);
recentButton.addActionListener(e -> updateRecent());
- recentButton.setForeground(FOREROUND_COLOR);
+ //recentButton.setForeground(FOREROUND_COLOR);

shortCutButtonGroup = new UnselectableButtonGroup();
shortCutButtonGroup.add(myComputerButton);
@@ -362,7 +362,7 @@ public class GhidraFileChooser extends DialogComponentProvider

JPanel panel = new JPanel(new BorderLayout());
panel.setBorder(BorderFactory.createLoweredBevelBorder());
- panel.setBackground(BACKGROUND_COLOR.darker());
+ //panel.setBackground(BACKGROUND_COLOR.darker());
panel.add(shortCutPanel, BorderLayout.NORTH);
return panel;
}
@@ -470,7 +470,7 @@ public class GhidraFileChooser extends DialogComponentProvider
private void buildWaitPanel() {
waitPanel = new JPanel(new BorderLayout());
waitPanel.setBorder(BorderFactory.createLoweredBevelBorder());
- waitPanel.setBackground(BACKGROUND_COLOR);
+ //waitPanel.setBackground(BACKGROUND_COLOR);
waitPanel.addMouseListener(new MouseAdapter() {
@Override
public void mouseReleased(MouseEvent e) {
@@ -574,7 +574,7 @@ public class GhidraFileChooser extends DialogComponentProvider
directoryListModel = new DirectoryListModel();
directoryList = new DirectoryList(this, directoryListModel, rootPanel.getFont());
directoryList.setName("LIST");
- directoryList.setBackground(BACKGROUND_COLOR);
+ //directoryList.setBackground(BACKGROUND_COLOR);

directoryList.addFocusListener(new FocusAdapter() {
@Override
@@ -584,7 +584,7 @@ public class GhidraFileChooser extends DialogComponentProvider
});

directoryScroll = new JScrollPane(directoryList);
- directoryScroll.getViewport().setBackground(BACKGROUND_COLOR);
+ //directoryScroll.getViewport().setBackground(BACKGROUND_COLOR);
directoryScroll.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);
directoryScroll.addComponentListener(new ComponentAdapter() {
//if the scroll pane is resized, we need to adjust
@@ -1470,7 +1470,7 @@ public class GhidraFileChooser extends DialogComponentProvider
directoryTableModel = new DirectoryTableModel(this);
directoryTable = new DirectoryTable(this, directoryTableModel);
directoryTable.setName("TABLE");
- directoryTable.setBackground(BACKGROUND_COLOR);
+ //directoryTable.setBackground(BACKGROUND_COLOR);

directoryTable.addFocusListener(new FocusAdapter() {
@Override
@@ -1480,7 +1480,7 @@ public class GhidraFileChooser extends DialogComponentProvider
});

JScrollPane scrollPane = new JScrollPane(directoryTable);
- scrollPane.getViewport().setBackground(BACKGROUND_COLOR);
+ //scrollPane.getViewport().setBackground(BACKGROUND_COLOR);
return scrollPane;
}

2 changes: 2 additions & 0 deletions scripts/patchColors.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ patch ./Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/edito

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 ./Ghidra/Framework/Docking/src/main/java/docking/widgets/filechooser/GhidraFileChooser.java ../patch/GhidraFileChooser.patch
patch ./Ghidra/Features/FunctionID/src/main/java/ghidra/feature/fid/plugin/ActiveFidConfigureDialog.java ../patch/ActiveFidConfigureDialog.patch

0 comments on commit 05ac562

Please sign in to comment.