diff --git a/res/themes/ui.toml b/res/themes/ui.toml index 023019c..3d3d8fe 100644 --- a/res/themes/ui.toml +++ b/res/themes/ui.toml @@ -1225,6 +1225,7 @@ pill-margin-y = { size = 3.0 } pill-rounding = { size = 12.0 } padding-x = { size = 12.0 } glass-fill-alpha = { size = 18.0 } +accent-fill-alpha = { size = 0.22 } # severity-tint fill opacity (fraction of the accent alpha) glass-border-alpha = { size = 35.0 } progress-bar-height = { size = 2.0 } duration-info = { size = 1.0 } diff --git a/src/ui/notifications.cpp b/src/ui/notifications.cpp index 967d722..3bc238a 100644 --- a/src/ui/notifications.cpp +++ b/src/ui/notifications.cpp @@ -123,9 +123,16 @@ void Notifications::render() glassSpec.borderWidth = 1.0f; material::DrawGlassPanel(dl, pMin, pMax, glassSpec); + // Severity-tinted fill so the toast differs by more than hue (helps when color alone is hard to read). + { + ImVec4 tint = accent_color; // already premultiplied by fade `alpha` + tint.w *= nde("accent-fill-alpha", 0.22f); + dl->AddRectFilled(pMin, pMax, ImGui::ColorConvertFloat4ToU32(tint), pillRounding); + } + // Colored accent border on top of the glass border for type indication ImU32 accentCol = ImGui::ColorConvertFloat4ToU32(accent_color); - dl->AddRect(pMin, pMax, accentCol, pillRounding, 0, 1.0f); + dl->AddRect(pMin, pMax, accentCol, pillRounding, 0, 1.5f * dp); // Progress bar at bottom of pill (accent-colored), clipped to pill rounded // corners. Draw a full-pill-size rounded rect and clip it to just the diff --git a/src/ui/windows/balance_tab.cpp b/src/ui/windows/balance_tab.cpp index 79df85c..6a426e8 100644 --- a/src/ui/windows/balance_tab.cpp +++ b/src/ui/windows/balance_tab.cpp @@ -526,6 +526,7 @@ static void RenderBalanceClassic(App* app) } // Pending badge (top-right corner) — labeled so an unconfirmed "+X" doesn't read as a mystery. + bool pendingChipHovered = false; if (state.unconfirmed_balance > 0.0) { snprintf(buf, sizeof(buf), TR("baltab_pending_chip"), state.unconfirmed_balance); ImVec2 ts = capFont->CalcTextSizeA( @@ -540,7 +541,7 @@ static void RenderBalanceClassic(App* app) dl->AddText(capFont, capFont->LegacySize, ImVec2(bMin.x + bp, bMin.y + bp * 0.5f), amberCol, buf); - if (material::IsRectHovered(bMin, bMax)) material::Tooltip("%s", TR("baltab_pending_tip")); + if (material::IsRectHovered(bMin, bMax)) { pendingChipHovered = true; material::Tooltip("%s", TR("baltab_pending_tip")); } } // Hover glow + click to Receive @@ -548,6 +549,7 @@ static void RenderBalanceClassic(App* app) dl->AddRect(cMin, cMax, IM_COL32(255, 255, 255, (int)S.drawElement("tabs.balance", "hover-glow-alpha").sizeOr(40.0f)), cardSpec.rounding, 0, S.drawElement("tabs.balance", "hover-glow-thickness").sizeOr(1.5f) * dp); ImGui::SetMouseCursor(ImGuiMouseCursor_Hand); + if (!pendingChipHovered) material::Tooltip("%s", TR("shielded_card_tooltip")); if (ImGui::IsMouseClicked(0)) app->setCurrentPage(NavPage::Receive); }