diff --git a/src-ui/app/edit-screen/components/ProcessorPane.cpp b/src-ui/app/edit-screen/components/ProcessorPane.cpp index 35bdc1a3..1dac223b 100644 --- a/src-ui/app/edit-screen/components/ProcessorPane.cpp +++ b/src-ui/app/edit-screen/components/ProcessorPane.cpp @@ -52,6 +52,7 @@ ProcessorPane::ProcessorPane(SCXTEditor *e, int index, bool fz) forZone(fz) { setContentAreaComponent(std::make_unique()); + setOptionalCursorForNameArea(juce::MouseCursor::DraggingHandCursor); hasHamburger = true; onHamburger = [safeThis = juce::Component::SafePointer(this)]() { @@ -1110,6 +1111,7 @@ void ProcessorPane::itemDropped(const juce::DragAndDropTarget::SourceDetails &dr { sendToSerialization(cmsg::SwapGroupProcessors({index, pp->index})); } + setIsAccented(false); } void ProcessorPane::mouseDrag(const juce::MouseEvent &e) @@ -1143,5 +1145,13 @@ void ProcessorPane::setAsMultiZone(int32_t primaryType, const std::string &nm, resized(); repaint(); } +void ProcessorPane::itemDragEnter(const juce::DragAndDropTarget::SourceDetails &dragSourceDetails) +{ + setIsAccented(true); +} +void ProcessorPane::itemDragExit(const juce::DragAndDropTarget::SourceDetails &dragSourceDetails) +{ + setIsAccented(false); +} } // namespace scxt::ui::app::edit_screen diff --git a/src-ui/app/edit-screen/components/ProcessorPane.h b/src-ui/app/edit-screen/components/ProcessorPane.h index 4cd46313..93fff60f 100644 --- a/src-ui/app/edit-screen/components/ProcessorPane.h +++ b/src-ui/app/edit-screen/components/ProcessorPane.h @@ -198,7 +198,8 @@ struct ProcessorPane : sst::jucegui::components::NamedPanel, HasEditor, juce::Dr bool isInterestedInDragSource(const SourceDetails &dragSourceDetails) override; void itemDropped(const SourceDetails &dragSourceDetails) override; - + void itemDragEnter(const SourceDetails &dragSourceDetails) override; + void itemDragExit(const SourceDetails &dragSourceDetails) override; void reapplyStyle(); bool multiZone{false}; diff --git a/src-ui/theme/ThemeApplier.cpp b/src-ui/theme/ThemeApplier.cpp index 1aad55aa..26ff1078 100644 --- a/src-ui/theme/ThemeApplier.cpp +++ b/src-ui/theme/ThemeApplier.cpp @@ -67,7 +67,6 @@ namespace edit static constexpr sheet_t::Class ModulationJogButon{"multi.modulation.jogbutton"}; static constexpr sheet_t::Class ModulationToggle{"multi.modulation.toggle"}; static constexpr sheet_t::Class ModulationMenu{"multi.modulation.menu"}; -static constexpr sheet_t::Class ModulationHSliderFilled{"multi.modulation.hsliderfilled"}; void applyColors(const sheet_t::ptr_t &, const ColorMap &); void init() @@ -75,8 +74,6 @@ void init() sheet_t::addClass(ModulationJogButon).withBaseClass(jcmp::JogUpDownButton::Styles::styleClass); sheet_t::addClass(ModulationToggle).withBaseClass(jcmp::ToggleButton::Styles::styleClass); sheet_t::addClass(ModulationMenu).withBaseClass(jcmp::MenuButton::Styles::styleClass); - sheet_t::addClass(ModulationHSliderFilled) - .withBaseClass(jcmp::HSliderFilled::Styles::styleClass); } namespace zone @@ -87,6 +84,7 @@ static constexpr sheet_t::Class ModulationVSlider{"multi.zone.modulation.vslider static constexpr sheet_t::Class ModulationKnob{"multi.zone.modulation.knob"}; static constexpr sheet_t::Class ModulationDraggableTextEditableValue{ "multi.zone.modulation.draggabletexteditablevalue"}; +static constexpr sheet_t::Class ModulationHSliderFilled{"multi.zone.modulation.hsliderfilled"}; void applyColors(const sheet_t::ptr_t &, const ColorMap &); void init() @@ -97,6 +95,8 @@ void init() sheet_t::addClass(ModulationKnob).withBaseClass(jcmp::Knob::Styles::styleClass); sheet_t::addClass(ModulationDraggableTextEditableValue) .withBaseClass(jcmp::DraggableTextEditableValue::Styles::styleClass); + sheet_t::addClass(ModulationHSliderFilled) + .withBaseClass(jcmp::HSliderFilled::Styles::styleClass); } } // namespace zone @@ -115,6 +115,7 @@ static constexpr sheet_t::Class ModulationKnob{"multi.group.modulation.knob"}; static constexpr sheet_t::Class ModulationVSlider{"multi.group.modulation.vslider"}; static constexpr sheet_t::Class ModulationDraggableTextEditableValue{ "multi.group.modulation.draggabletexteditablevalue"}; +static constexpr sheet_t::Class ModulationHSliderFilled{"multi.group.modulation.hsliderfilled"}; void applyColors(const sheet_t::ptr_t &, const ColorMap &); void init() @@ -132,6 +133,8 @@ void init() sheet_t::addClass(ModulationVSlider).withBaseClass(VSlider); sheet_t::addClass(ModulationDraggableTextEditableValue) .withBaseClass(DraggableTextEditableValue); + sheet_t::addClass(ModulationHSliderFilled) + .withBaseClass(jcmp::HSliderFilled::Styles::styleClass); } } // namespace group @@ -198,7 +201,6 @@ void populateSharedGroupZoneMultiModulation(jstl::CustomTypeMap &map) map.addCustomClass(detail::edit::ModulationJogButon); map.addCustomClass(detail::edit::ModulationToggle); map.addCustomClass(detail::edit::ModulationMenu); - map.addCustomClass(detail::edit::ModulationHSliderFilled); } void ThemeApplier::applyZoneMultiScreenModulationTheme(juce::Component *toThis) { @@ -207,6 +209,7 @@ void ThemeApplier::applyZoneMultiScreenModulationTheme(juce::Component *toThis) map.addCustomClass(detail::edit::zone::ModulationMultiSwitch); map.addCustomClass(detail::edit::zone::ModulationVSlider); map.addCustomClass(detail::edit::zone::ModulationKnob); + map.addCustomClass(detail::edit::zone::ModulationHSliderFilled); map.addCustomClass( detail::edit::zone::ModulationDraggableTextEditableValue); populateSharedGroupZoneMultiModulation(map); @@ -230,6 +233,7 @@ void ThemeApplier::applyGroupMultiScreenModulationTheme(juce::Component *toThis) map.addCustomClass(detail::edit::group::ModulationKnob); map.addCustomClass( detail::edit::group::ModulationDraggableTextEditableValue); + map.addCustomClass(detail::edit::group::ModulationHSliderFilled); populateSharedGroupZoneMultiModulation(map); map.applyMapTo(toThis); } @@ -395,6 +399,8 @@ void applyColors(const sheet_t::ptr_t &base, const ColorMap &cols) npol); base->setColour(jcmp::NamedPanel::Styles::styleClass, jcmp::NamedPanel::Styles::selectedtab, cols.get(ColorMap::accent_1a)); + base->setColour(jcmp::NamedPanel::Styles::styleClass, jcmp::NamedPanel::Styles::accentedPanel, + cols.get(ColorMap::accent_1b)); base->setColour(jcmp::MenuButton::Styles::styleClass, jcmp::MenuButton::Styles::menuarrow_hover, cols.get(ColorMap::accent_1a)); @@ -429,15 +435,6 @@ void applyColors(const sheet_t::ptr_t &base, const ColorMap &cols) base->setColour(ModulationMenu, jcmp::MenuButton::Styles::menuarrow_hover, cols.get(ColorMap::accent_2a)); - base->setColour(ModulationHSliderFilled, jcmp::HSliderFilled::Styles::value, - cols.get(ColorMap::accent_2b)); - base->setColour(ModulationHSliderFilled, jcmp::HSliderFilled::Styles::value_hover, - cols.getHover(ColorMap::accent_2b)); - base->setColour(ModulationHSliderFilled, jcmp::HSliderFilled::Styles::handle, - cols.get(ColorMap::accent_2a)); - base->setColour(ModulationHSliderFilled, jcmp::HSliderFilled::Styles::handle_hover, - cols.getHover(ColorMap::accent_2a)); - base->setColour(ModulationToggle, jcmp::ToggleButton::Styles::value, cols.get(ColorMap::accent_2a)); base->setColour(ModulationToggle, jcmp::ToggleButton::Styles::value_hover, @@ -458,6 +455,15 @@ void applyColors(const sheet_t::ptr_t &base, const ColorMap &cols) base->setColour(ModulationMultiSwitch, jcmp::MultiSwitch::Styles::valuelabel_hover, cols.getHover(ColorMap::generic_content_high)); + base->setColour(ModulationHSliderFilled, jcmp::HSliderFilled::Styles::value, + cols.get(ColorMap::accent_2b)); + base->setColour(ModulationHSliderFilled, jcmp::HSliderFilled::Styles::value_hover, + cols.getHover(ColorMap::accent_2b)); + base->setColour(ModulationHSliderFilled, jcmp::HSliderFilled::Styles::handle, + cols.get(ColorMap::accent_2a)); + base->setColour(ModulationHSliderFilled, jcmp::HSliderFilled::Styles::handle_hover, + cols.getHover(ColorMap::accent_2a)); + base->setColour(ModulationVSlider, jcmp::VSlider::Styles::value, cols.get(ColorMap::accent_2a)); base->setColour(ModulationVSlider, jcmp::VSlider::Styles::value_hover, cols.getHover(ColorMap::accent_2a)); @@ -530,6 +536,19 @@ void applyColors(const sheet_t::ptr_t &base, const ColorMap &cols) base->setColour(ModulationVSlider, jcmp::VSlider::Styles::value_hover, cols.getHover(ColorMap::accent_2a)); + base->setColour(ModulationHSliderFilled, jcmp::HSliderFilled::Styles::value, + cols.get(ColorMap::accent_2b)); + base->setColour(ModulationHSliderFilled, jcmp::HSliderFilled::Styles::value_hover, + cols.getHover(ColorMap::accent_2b)); + base->setColour(ModulationHSliderFilled, jcmp::HSliderFilled::Styles::handle, + cols.get(ColorMap::accent_2a)); + base->setColour(ModulationHSliderFilled, jcmp::HSliderFilled::Styles::handle_hover, + cols.getHover(ColorMap::accent_2a)); + base->setColour(ModulationHSliderFilled, jcmp::HSliderFilled::Styles::gutter, + cols.get(ColorMap::bg_2)); + base->setColour(ModulationHSliderFilled, jcmp::HSliderFilled::Styles::gutter_hover, + cols.getHover(ColorMap::bg_2)); + base->setColour(ModulationKnob, jcmp::Knob::Styles::value, cols.get(ColorMap::accent_2a)); base->setColour(ModulationKnob, jcmp::Knob::Styles::value_hover, cols.getHover(ColorMap::accent_2a));