Skip to content

Commit

Permalink
Graph Node UI cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
anjaldoshi committed May 11, 2024
1 parent ac54352 commit 071ea74
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions Source/UI/GraphViewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ void GraphViewport::lookAndFeelChanged()
GraphViewer::GraphViewer()
{
setBufferedToImage(true);
setRepaintsOnMouseActivity(false);
graphViewport = std::make_unique<GraphViewport>(this);
}

Expand Down Expand Up @@ -742,15 +741,12 @@ void DataStreamButton::paintButton(Graphics& g, bool isHighlighted, bool isDown)
g.setColour(findColour(ThemeColors::componentBackground));
g.fillRect(0, 0, 25, getHeight());

if(getButtonText().equalsIgnoreCase("Parameters"))
g.setColour(editor->getBackgroundColor().withSaturation(0.5f).withAlpha(0.7f));
else
g.setColour(editor->getBackgroundColor().withAlpha(0.5f));
g.setColour(editor->getBackgroundColor().withAlpha(0.5f));

g.fillRect(25, 0, getWidth() - 25, getHeight());

g.setColour(findColour(ThemeColors::outline));
g.drawRect(0, 0, getWidth(), getHeight(), 1);
g.fillRect(0, 0, getWidth(), 1);

g.setColour(findColour(ThemeColors::defaultText));

Expand Down Expand Up @@ -1234,6 +1230,7 @@ String GraphNode::getInfoString()

void GraphNode::paint (Graphics& g)
{
g.fillAll(findColour(ThemeColors::componentParentBackground));
g.setFont(Font("Fira Code", "SemiBold", 14));

if(processor->isEmpty())
Expand Down Expand Up @@ -1270,7 +1267,7 @@ void GraphNode::paintOverChildren(Graphics& g)
const float cornerSize = 5.0f; //desired corner size
fakeRoundedCorners.addRectangle(bounds); //What you start with
fakeRoundedCorners.setUsingNonZeroWinding(false); //The secret sauce
fakeRoundedCorners.addRoundedRectangle(bounds.reduced(1.0f), cornerSize); //subtract this shape
fakeRoundedCorners.addRoundedRectangle(bounds, cornerSize); //subtract this shape

g.setColour(findColour(ThemeColors::componentParentBackground));
g.fillPath(fakeRoundedCorners);
Expand Down

0 comments on commit 071ea74

Please sign in to comment.