diff --git a/include/sst/jucegui/components/DraggableTextEditableValue.h b/include/sst/jucegui/components/DraggableTextEditableValue.h index 570b732..c8ebc66 100644 --- a/include/sst/jucegui/components/DraggableTextEditableValue.h +++ b/include/sst/jucegui/components/DraggableTextEditableValue.h @@ -36,17 +36,19 @@ struct DraggableTextEditableValue : public juce::Component, public style::SettingsConsumer, public style::StyleConsumer { - struct Styles : base_styles::Outlined, base_styles::BaseLabel, base_styles::ValueBearing + struct Styles : base_styles::Base, + base_styles::Outlined, + base_styles::BaseLabel, + base_styles::ValueBearing { SCLASS(draggabletexteditor); - PROP(background_editing); static void initialize() { style::StyleSheet::addClass(styleClass) + .withBaseClass(base_styles::Base::styleClass) .withBaseClass(base_styles::Outlined::styleClass) .withBaseClass(base_styles::BaseLabel::styleClass) - .withBaseClass(base_styles::ValueBearing::styleClass) - .withProperty(background_editing); + .withBaseClass(base_styles::ValueBearing::styleClass); } }; diff --git a/src/sst/jucegui/components/DraggableTextEditableValue.cpp b/src/sst/jucegui/components/DraggableTextEditableValue.cpp index 3498182..da1991c 100644 --- a/src/sst/jucegui/components/DraggableTextEditableValue.cpp +++ b/src/sst/jucegui/components/DraggableTextEditableValue.cpp @@ -58,20 +58,17 @@ void DraggableTextEditableValue::setFromEditor() void DraggableTextEditableValue::paint(juce::Graphics &g) { - if (underlyingEditor->isVisible()) - { - g.setColour(getColour(Styles::background_editing)); - g.fillRoundedRectangle(getLocalBounds().toFloat(), 3.f); - } + g.setColour(getColour(Styles::background)); + if (isHovered) + g.setColour(getColour(Styles::background_hover)); + g.fillRoundedRectangle(getLocalBounds().toFloat(), 3.f); - g.setColour(getColour(Styles::brightoutline)); - g.drawRoundedRectangle(getLocalBounds().toFloat(), 3.f, 1.f); if (continuous() && !underlyingEditor->isVisible()) { g.setFont(getFont(Styles::labelfont)); - g.setColour(getColour(Styles::labelcolor)); + g.setColour(getColour(Styles::value)); if (isHovered) - g.setColour(getColour(Styles::labelcolor_hover)); + g.setColour(getColour(Styles::value_hover)); g.drawText(continuous()->getValueAsString(), getLocalBounds(), juce::Justification::centred); } diff --git a/src/sst/jucegui/components/MultiSwitch.cpp b/src/sst/jucegui/components/MultiSwitch.cpp index 80b665f..a570251 100644 --- a/src/sst/jucegui/components/MultiSwitch.cpp +++ b/src/sst/jucegui/components/MultiSwitch.cpp @@ -81,7 +81,6 @@ void MultiSwitch::paint(juce::Graphics &g) else isH = isHovered && txt.contains(hoverX, getHeight() / 2); - // Draw the background if (i == data->getValue() - data->getMin()) { // Selected option diff --git a/src/sst/jucegui/style/StyleSheet.cpp b/src/sst/jucegui/style/StyleSheet.cpp index 67187cf..7304466 100644 --- a/src/sst/jucegui/style/StyleSheet.cpp +++ b/src/sst/jucegui/style/StyleSheet.cpp @@ -342,11 +342,6 @@ struct DarkSheet : public StyleSheetBuiltInImpl setColour(n::styleClass, n::connectorcol, juce::Colour(160, 160, 160)); } - { - using n = components::DraggableTextEditableValue::Styles; - setColour(n::styleClass, n::background_editing, juce::Colour(0x30, 0x30, 0x30)); - } - { using n = components::ToolTip::Styles; setFont(n::styleClass, n::datafont, @@ -477,11 +472,6 @@ struct LightSheet : public StyleSheetBuiltInImpl setColour(n::styleClass, n::connectorcol, juce::Colour(160, 160, 160)); } - { - using n = components::DraggableTextEditableValue::Styles; - setColour(n::styleClass, n::background_editing, juce::Colour(0xC0, 0xC0, 0xC0)); - } - { using n = components::ToolTip::Styles; setFont(n::styleClass, n::datafont,