▎ Problem — The modulation dragger's value label is drawn inside the hover
▎ popup (drawModulationDragBackground's labelBounds), which ties the label's
▎ z-level and clipping to the popup. If the draggers are kept at parent level
▎ (so they don't sit over other UI), a label positioned outside the slider's
▎ parent bounds (e.g. below the knob) gets clipped. There's no way to have
▎ parent-level draggers and an unclipped/free-positioned label.
▎
▎ Proposed (opt-in, backwards-compatible)
▎ - useDecoupledLabel flag on PositionData (default off).
▎ - New scripted-LAF callback drawModulationLabel(g, obj), mirroring the
▎ existing drawModulationDragger, so the project draws the label.
▎ - When set, the popup creates a small transparent, non-interactive label
▎ component at the top-level window (positioned from the project's labelArea)
▎ and draws it via the callback, leaving the draggers at parent level.
▎ Default off = identical to current behaviour.
▎
▎ Questions — Is this something you'd want upstream, or is label-in-popup
▎ sufficient? If yes, preferences on the API shape — callback name
▎ drawModulationLabel, flag useDecoupledLabel, and whether positioning should
▎ also be a callback (getModulationLabelData)? Implemented + tested; can PR
▎ once the shape's agreed.
Files touched (4):
- hi_core/hi_core/MacroControlledComponents.h — useDecoupledLabel flag, the new
drawModulationLabel LAF virtual, a ModulationLabel forward-decl
- hi_core/hi_core/MacroControlledComponents.cpp — a transparent, non-interactive
ModulationLabel component at the top-level window; useDecoupledLabel
serialization; the HoverPopup ctor creates it (and drops labelArea from the popup
so the draggers stay at parent level); paint() refreshes it; default base impl
(~80 lines)
- hi_scripting/scripting/api/ScriptingGraphics.h — the scripted override decl
- hi_scripting/scripting/api/ScriptingGraphics.cpp — the scripted
drawModulationLabel override + registration in getAllFunctionNames (~32 lines)
▎ Problem — The modulation dragger's value label is drawn inside the hover
▎ popup (drawModulationDragBackground's labelBounds), which ties the label's
▎ z-level and clipping to the popup. If the draggers are kept at parent level
▎ (so they don't sit over other UI), a label positioned outside the slider's
▎ parent bounds (e.g. below the knob) gets clipped. There's no way to have
▎ parent-level draggers and an unclipped/free-positioned label.
▎
▎ Proposed (opt-in, backwards-compatible)
▎ - useDecoupledLabel flag on PositionData (default off).
▎ - New scripted-LAF callback drawModulationLabel(g, obj), mirroring the
▎ existing drawModulationDragger, so the project draws the label.
▎ - When set, the popup creates a small transparent, non-interactive label
▎ component at the top-level window (positioned from the project's labelArea)
▎ and draws it via the callback, leaving the draggers at parent level.
▎ Default off = identical to current behaviour.
▎
▎ Questions — Is this something you'd want upstream, or is label-in-popup
▎ sufficient? If yes, preferences on the API shape — callback name
▎ drawModulationLabel, flag useDecoupledLabel, and whether positioning should
▎ also be a callback (getModulationLabelData)? Implemented + tested; can PR
▎ once the shape's agreed.
Files touched (4):
drawModulationLabel LAF virtual, a ModulationLabel forward-decl
ModulationLabel component at the top-level window; useDecoupledLabel
serialization; the HoverPopup ctor creates it (and drops labelArea from the popup
so the draggers stay at parent level); paint() refreshes it; default base impl
(~80 lines)
drawModulationLabel override + registration in getAllFunctionNames (~32 lines)