Fix stale hover latch on drag release, tooltip anchor, border off-by-one; pin gutter golden test, drop DPI framing

This commit is contained in:
2026-07-30 09:35:18 -04:00
parent ae23ee0882
commit 9812690b96
8 changed files with 64 additions and 20 deletions
+5 -2
View File
@@ -205,13 +205,16 @@ void ReaSamplerEditor::paintChromeTooltip(LICE_IBitmap* bmp, const FaceLayout& f
const std::string label = noteName(hover_.index);
const int textW = static_cast<int>(label.size()) * kTooltipCharPx;
const TooltipBox tb = computeTooltip(area.x + key.x, area.y + key.y, key.width, key.height,
// Anchor y/h to the whole strip row, not the hovered key: a black key (18px) is shorter
// than a white key (30px), and anchoring to the key rect placed the chip 12px higher for
// black keys — landing on the keyboard's bottom edge and, near the root, on the badge.
const TooltipBox tb = computeTooltip(area.x + key.x, area.y, key.width, area.height,
textW, kTooltipTextH, w, h, TooltipSpec{});
if (tb.empty()) return;
const Rect box = Rect::ltrb(tb.x, tb.y, tb.x + tb.width, tb.y + tb.height);
fillSurface(bmp, toKitBox(box), Role::BgCell, InteractionState::Hover);
LICE_DrawRect(bmp, box.x, box.y, box.width, box.height,
LICE_DrawRect(bmp, box.x, box.y, box.width - 1, box.height - 1,
toLice(roleColor(Role::LineHairline)), 1.0f, 0);
kitTextCentered(bmp, box, label.c_str(), Font::Label, Role::TextPrimary);
}