Skip to content

Commit 38d48a8

Browse files
authored
Add isEnabled to DraggableTextEditor (#209)
1 parent 219b423 commit 38d48a8

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/sst/jucegui/components/DraggableTextEditableValue.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,15 @@ void DraggableTextEditableValue::paint(juce::Graphics &g)
8888
if (continuous() && !underlyingEditor->isVisible())
8989
{
9090
g.setFont(getFont(Styles::labelfont));
91-
g.setColour(
92-
getColour(Styles::value)); // on Hover, the text colour is intensionally the same.
91+
if (isEnabled())
92+
{
93+
g.setColour(
94+
getColour(Styles::value)); // on Hover, the text colour is intensionally the same.
95+
}
96+
else
97+
{
98+
g.setColour(getColour(Styles::value).withAlpha(0.5f));
99+
}
93100
if (displayUnits)
94101
{
95102
g.drawText(continuous()->getValueAsString(), getLocalBounds(),

0 commit comments

Comments
 (0)