mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-22 03:31:57 +08:00
GP-3798 - Function Graph - Fixed incorrect hover color that was broken
when theming was introduced
This commit is contained in:
+8
-5
@@ -23,10 +23,9 @@ import ghidra.app.plugin.core.functiongraph.graph.FunctionGraph;
|
||||
import ghidra.app.plugin.core.functiongraph.graph.vertex.FGVertex;
|
||||
import ghidra.app.plugin.core.functiongraph.mvc.FunctionGraphOptions;
|
||||
import ghidra.graph.viewer.renderer.ArticulatedEdgeRenderer;
|
||||
import ghidra.program.model.symbol.FlowType;
|
||||
|
||||
/**
|
||||
* A renderer used by the Function Graph API to provide additional edge coloring, as
|
||||
* A renderer used by the Function Graph API to provide additional edge coloring, as
|
||||
* determined by the {@link FunctionGraphOptions}.
|
||||
*/
|
||||
public class FGEdgeRenderer extends ArticulatedEdgeRenderer<FGVertex, FGEdge> {
|
||||
@@ -34,9 +33,7 @@ public class FGEdgeRenderer extends ArticulatedEdgeRenderer<FGVertex, FGEdge> {
|
||||
@Override
|
||||
public Color getDrawColor(Graph<FGVertex, FGEdge> g, FGEdge e) {
|
||||
FunctionGraphOptions options = getOptions(g);
|
||||
FlowType flowType = e.getFlowType();
|
||||
Color color = options.getColor(flowType);
|
||||
return color;
|
||||
return options.getColor(e.getFlowType());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -51,6 +48,12 @@ public class FGEdgeRenderer extends ArticulatedEdgeRenderer<FGVertex, FGEdge> {
|
||||
return options.getHighlightColor(e.getFlowType());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Color getHoveredColor(Graph<FGVertex, FGEdge> g, FGEdge e) {
|
||||
FunctionGraphOptions options = getOptions(g);
|
||||
return options.getColor(e.getFlowType());
|
||||
}
|
||||
|
||||
private FunctionGraphOptions getOptions(Graph<FGVertex, FGEdge> g) {
|
||||
FunctionGraph fg = (FunctionGraph) g;
|
||||
return fg.getOptions();
|
||||
|
||||
Reference in New Issue
Block a user