fix: close review findings on the velocity-curve deck and bipolar curves
Cancels the curve-node drag whenever the popup closes so Esc mid-drag can't alias the amp curve; generalizes CurveTarget routing to one switch; fixes stale/overstated comments; clamps a pre-v12 depth fold; adds deck-inertness and filter-fold test coverage.
This commit is contained in:
@@ -214,14 +214,15 @@ void drawButton(LICE_IBitmap* bmp, const KitButtonBox& button, const char* label
|
||||
radius, toLice(borderCol), drawAlpha(borderCol), 0, true);
|
||||
|
||||
if (label && *label) {
|
||||
// Active fill is the accent — label goes in bg/base for contrast; else text/primary.
|
||||
const Role textRole = (state == InteractionState::Active)
|
||||
? Role::BgBase
|
||||
: Role::TextPrimary;
|
||||
text(bmp, b, label, Font::Label, textRole, Align::Center);
|
||||
text(bmp, b, label, Font::Label, buttonLabelRole(state), Align::Center);
|
||||
}
|
||||
}
|
||||
|
||||
Role buttonLabelRole(InteractionState state) {
|
||||
// Active fill is the accent — the mark goes in bg/base for contrast; else text/primary.
|
||||
return state == InteractionState::Active ? Role::BgBase : Role::TextPrimary;
|
||||
}
|
||||
|
||||
void drawSlider(LICE_IBitmap* bmp, const SliderGeometry& geom, InteractionState state) {
|
||||
if (!bmp || geom.track.empty()) return;
|
||||
|
||||
|
||||
@@ -87,6 +87,11 @@ void fillSurface(LICE_IBitmap* bmp, const KitBox& box, Role role, InteractionSta
|
||||
void drawButton(LICE_IBitmap* bmp, const KitButtonBox& button, const char* label,
|
||||
InteractionState state, bool warn);
|
||||
|
||||
// THE ink role drawButton's own label draws in, for `state` (see draw_kit.cpp). A non-text
|
||||
// button mark (e.g. a drawn glyph, not text()) that needs to sit legibly on a drawButton
|
||||
// surface should call this rather than re-deriving the rule.
|
||||
Role buttonLabelRole(InteractionState state);
|
||||
|
||||
// A horizontal slider: track groove, accent-filled portion up to the handle, and the
|
||||
// handle itself. `geom` is the pure SliderGeometry the caller computed.
|
||||
void drawSlider(LICE_IBitmap* bmp, const SliderGeometry& geom, InteractionState state);
|
||||
|
||||
Reference in New Issue
Block a user