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:
@@ -904,7 +904,7 @@ static void RenderBalanceClassic(App* app)
|
||||
else app->favoriteAddress(addr.address);
|
||||
btnClicked = true;
|
||||
}
|
||||
if (bHov) ImGui::SetTooltip("%s", row.favorite ? TR("remove_favorite") : TR("favorite_address"));
|
||||
if (bHov) material::Tooltip("%s", row.favorite ? TR("remove_favorite") : TR("favorite_address"));
|
||||
}
|
||||
|
||||
// Eye button (zero balance or hidden)
|
||||
@@ -926,7 +926,7 @@ static void RenderBalanceClassic(App* app)
|
||||
else app->hideAddress(addr.address);
|
||||
btnClicked = true;
|
||||
}
|
||||
if (bHov) ImGui::SetTooltip("%s", row.hidden ? TR("restore_address") : TR("hide_address"));
|
||||
if (bHov) material::Tooltip("%s", row.hidden ? TR("restore_address") : TR("hide_address"));
|
||||
}
|
||||
|
||||
// Content zone ends before buttons
|
||||
@@ -1023,7 +1023,7 @@ static void RenderBalanceClassic(App* app)
|
||||
|
||||
// Tooltip with full address
|
||||
if (ImGui::IsItemHovered() && !btnClicked) {
|
||||
ImGui::SetTooltip("%s", addr.address.c_str());
|
||||
material::Tooltip("%s", addr.address.c_str());
|
||||
}
|
||||
|
||||
// Right-click context menu
|
||||
@@ -1180,7 +1180,7 @@ static void RenderBalanceClassic(App* app)
|
||||
// Show the full, untruncated address — two z-addresses can truncate to the
|
||||
// same first/last window, so the truncated text alone can't disambiguate.
|
||||
if (!tx.address.empty())
|
||||
ImGui::SetTooltip("%s", tx.address.c_str());
|
||||
material::Tooltip("%s", tx.address.c_str());
|
||||
if (ImGui::IsMouseClicked(0))
|
||||
app->setCurrentPage(NavPage::History);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user