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:
@@ -385,13 +385,13 @@ void RenderSharedAddressList(App* app, float listH, float availW,
|
||||
// edge of a row = reorder (move here).
|
||||
if (s_dropTargetIdx >= 0 && s_dropTargetIdx < (int)rows.size() && s_dropMode == 0) {
|
||||
const auto& target = rows[s_dropTargetIdx];
|
||||
ImGui::SetTooltip("%s\n%s\n\n%s %s",
|
||||
material::Tooltip("%s\n%s\n\n%s %s",
|
||||
truncateAddress(addr.address, 32).c_str(),
|
||||
row.isZ ? TR("shielded") : TR("transparent"),
|
||||
TR("transfer_to"),
|
||||
truncateAddress(target.info->address, 32).c_str());
|
||||
} else {
|
||||
ImGui::SetTooltip("%s\n%s\n\n%s",
|
||||
material::Tooltip("%s\n%s\n\n%s",
|
||||
truncateAddress(addr.address, 32).c_str(),
|
||||
row.isZ ? TR("shielded") : TR("transparent"),
|
||||
TR("address_reorder_hint"));
|
||||
@@ -474,7 +474,7 @@ void RenderSharedAddressList(App* app, float listH, float availW,
|
||||
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)
|
||||
@@ -500,7 +500,7 @@ void RenderSharedAddressList(App* app, float listH, float availW,
|
||||
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"));
|
||||
}
|
||||
|
||||
// ---- Type icon or custom icon ----
|
||||
@@ -624,7 +624,7 @@ void RenderSharedAddressList(App* app, float listH, float availW,
|
||||
ImGui::SetCursorScreenPos(ImVec2(rowPos.x, rowY[row_idx]));
|
||||
ImGui::InvisibleButton("##addr", ImVec2(innerW, rowH));
|
||||
if (ImGui::IsItemHovered() && !s_dragActive) {
|
||||
ImGui::SetTooltip("%s", addr.address.c_str());
|
||||
material::Tooltip("%s", addr.address.c_str());
|
||||
}
|
||||
|
||||
// Context menu
|
||||
|
||||
Reference in New Issue
Block a user