From 73b491bb63ef59f3e739fa01a623e13f2274cf9c Mon Sep 17 00:00:00 2001 From: dragonmacher <48328597+dragonmacher@users.noreply.github.com> Date: Tue, 22 Aug 2023 12:55:44 -0400 Subject: [PATCH] GP-3768 - Function Call Graph - fixed exception when using 'Start Fully Zoomed In'; fixed button painting in Dark Theme --- .../src/main/java/functioncalls/graph/FcgVertex.java | 6 ++++++ .../main/java/functioncalls/graph/view/FcgComponent.java | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/Ghidra/Features/GraphFunctionCalls/src/main/java/functioncalls/graph/FcgVertex.java b/Ghidra/Features/GraphFunctionCalls/src/main/java/functioncalls/graph/FcgVertex.java index fca956b637..0a19e65b75 100644 --- a/Ghidra/Features/GraphFunctionCalls/src/main/java/functioncalls/graph/FcgVertex.java +++ b/Ghidra/Features/GraphFunctionCalls/src/main/java/functioncalls/graph/FcgVertex.java @@ -319,6 +319,12 @@ public class FcgVertex extends AbstractVisualVertex implements VertexShapeProvid toggleInsButton.setBackground(Palette.NO_COLOR); toggleOutsButton.setBackground(Palette.NO_COLOR); + // This is needed for Flat Dark theme to work correctly, due to the fact that it wants to + // paint its parent background when the button is opaque. The parent background will get + // painted over any items that lie between the button and the parent. + toggleInsButton.setOpaque(false); + toggleOutsButton.setOpaque(false); + Rectangle parentBounds = vertexImageLabel.getBounds(); Dimension size = toggleInsButton.getPreferredSize(); diff --git a/Ghidra/Features/GraphFunctionCalls/src/main/java/functioncalls/graph/view/FcgComponent.java b/Ghidra/Features/GraphFunctionCalls/src/main/java/functioncalls/graph/view/FcgComponent.java index aabcc6167b..c2cd471364 100644 --- a/Ghidra/Features/GraphFunctionCalls/src/main/java/functioncalls/graph/view/FcgComponent.java +++ b/Ghidra/Features/GraphFunctionCalls/src/main/java/functioncalls/graph/view/FcgComponent.java @@ -53,6 +53,12 @@ public class FcgComponent extends GraphComponent