Skip to content

Commit 4e2fa41

Browse files
committed
Update SyncControlButton off color based on timestamp generation
1 parent e371e6b commit 4e2fa41

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

Source/Processors/Parameter/ParameterEditor.cpp

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -848,15 +848,24 @@ void SyncControlButton::paintButton (Graphics& g, bool isMouseOver, bool isButto
848848
{
849849
case SyncStatus::OFF:
850850
{
851+
Colour offColour;
852+
853+
// If the stream generates timestamps, use a transparent blue colour
854+
if (node->synchronizer.streamGeneratesTimestamps (streamKey))
855+
offColour = Colour (30, 112, 255).withAlpha (0.4f);
856+
else
857+
// If the stream does not generate timestamps, use the default fill colour
858+
offColour = findColour (ThemeColours::defaultFill);
859+
851860
if (isMouseOver)
852861
{
853862
//LIGHT GREY
854-
g.setColour (findColour (ThemeColours::defaultFill).contrasting (0.2f));
863+
g.setColour (offColour.contrasting (0.2f));
855864
}
856865
else
857866
{
858867
//DARK GREY
859-
g.setColour (findColour (ThemeColours::defaultFill));
868+
g.setColour (offColour);
860869
}
861870
break;
862871
}
@@ -892,10 +901,12 @@ void SyncControlButton::paintButton (Graphics& g, bool isMouseOver, bool isButto
892901
{
893902
if (isMouseOver)
894903
{
904+
// SPECIAL BLUE - slightly contrasting
895905
g.setColour (Colour (30, 112, 255).contrasting (0.1f));
896906
}
897907
else
898908
{
909+
// SPECIAL BLUE
899910
g.setColour (Colour (30, 112, 255));
900911
}
901912
break;

0 commit comments

Comments
 (0)