refactor(ui): app-wide compact, translucent tooltips

Add material::Tooltip / BeginTooltip / EndTooltip wrappers (tooltip_style.h)
that scope a small window padding (8x4, dpi-scaled) and ~85% opacity to
tooltips only, then route the tooltip call sites through them. Menus and combo
dropdowns are untouched (they keep the global opaque PopupBg).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-27 21:26:52 -05:00
parent 69a6fb3e64
commit 2e8e214689
24 changed files with 160 additions and 92 deletions

View File

@@ -690,7 +690,7 @@ inline bool RenderSidebar(NavPage& current, float sidebarWidth, float contentHei
} else {
float iconCX = (indMin.x + indMax.x) * 0.5f;
DrawNavIcon(dl, item.page, iconCX, iconCY, iconS, textCol);
if (hovered) ImGui::SetTooltip("%s", NavLabel(item));
if (hovered) material::Tooltip("%s", NavLabel(item));
}
// Badge indicator
@@ -826,7 +826,7 @@ inline bool RenderSidebar(NavPage& current, float sidebarWidth, float contentHei
ImVec2 iconSz = iconFont->CalcTextSizeA(eIconFsz, 1000.0f, 0.0f, exitIcon);
dl->AddText(iconFont, eIconFsz,
ImVec2(cx - iconSz.x * 0.5f, cy - iconSz.y * 0.5f), exitCol, exitIcon);
if (exitHover) ImGui::SetTooltip("%s", TR("exit"));
if (exitHover) material::Tooltip("%s", TR("exit"));
}
}