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:
@@ -352,7 +352,7 @@ void RenderPeersTab(App* app)
|
||||
ImGui::InvisibleButton("##BestBlockCopy", ImVec2(hashSz.x + Layout::spacingSm(), sub1->LegacySize + 2 * dp));
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetMouseCursor(ImGuiMouseCursor_Hand);
|
||||
ImGui::SetTooltip("%s %s", TR("peers_click_copy"), hash.c_str());
|
||||
material::Tooltip("%s %s", TR("peers_click_copy"), hash.c_str());
|
||||
dl->AddLine(ImVec2(cx, valY + sub1->LegacySize + 1 * dp),
|
||||
ImVec2(cx + hashSz.x, valY + sub1->LegacySize + 1 * dp),
|
||||
WithAlpha(OnSurface(), 60), 1.0f * dp);
|
||||
@@ -657,7 +657,7 @@ void RenderPeersTab(App* app)
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetMouseCursor(ImGuiMouseCursor_Hand);
|
||||
if (!isRefreshing)
|
||||
ImGui::SetTooltip("%s", TR("peers_refresh_tooltip"));
|
||||
material::Tooltip("%s", TR("peers_refresh_tooltip"));
|
||||
}
|
||||
ImGui::PopID();
|
||||
}
|
||||
@@ -808,7 +808,7 @@ void RenderPeersTab(App* app)
|
||||
}
|
||||
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::BeginTooltip();
|
||||
material::BeginTooltip();
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_CellPadding, ImVec2(8, 3));
|
||||
if (ImGui::BeginTable("##PeerTT", 2, ImGuiTableFlags_SizingFixedFit)) {
|
||||
auto TTRow = [](const char* label, const char* value) {
|
||||
@@ -836,7 +836,7 @@ void RenderPeersTab(App* app)
|
||||
ImGui::EndTable();
|
||||
}
|
||||
ImGui::PopStyleVar();
|
||||
ImGui::EndTooltip();
|
||||
material::EndTooltip();
|
||||
}
|
||||
|
||||
if (i < state.peers.size() - 1) {
|
||||
|
||||
Reference in New Issue
Block a user