From 56cd9b6273d90f499ee0aa495f0a04bffa7d262f Mon Sep 17 00:00:00 2001 From: DanS Date: Mon, 13 Jul 2026 21:04:58 -0500 Subject: [PATCH] fix(settings): make the rescan slider visible on light themes The scan-height slider drew its track, % label, and thumb in pure white, which vanished on light skins because the glass sub-section goes opaque white there (only the numeric input showed). Switch those to OnSurface-based colors so they adapt: near-white on dark (unchanged look) and dark on light (now visible). Surfaced by the full Windows UI sweep on the marble/light skins. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/app.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/app.cpp b/src/app.cpp index d7b6c9e..6e4b0f1 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -2804,7 +2804,9 @@ static void RenderScanHeightControl(char* buf, size_t bufSize, int tipHeight, bo const float pct = std::clamp((float)cur / (float)tipHeight, 0.0f, 1.0f); // Track + accent fill up to the thumb (fill's rounded right edge matches the thumb circle). - dl->AddRectFilled(barMin, barMax, IM_COL32(255, 255, 255, enabled ? 26 : 12), barRound); + // OnSurface-based (not pure white) so the track/label/thumb stay visible on a light-theme glass + // panel, which goes opaque white. + dl->AddRectFilled(barMin, barMax, m::WithAlpha(m::OnSurface(), enabled ? 30 : 14), barRound); const float usableW = barW - thumbR * 2.0f; const float thumbCenterX = barMin.x + thumbR + usableW * pct; const float fillRight = thumbCenterX + thumbR; @@ -2820,13 +2822,13 @@ static void RenderScanHeightControl(char* buf, size_t bufSize, int tipHeight, bo const ImVec2 tsz = cap->CalcTextSizeA(cap->LegacySize, 10000.0f, 0.0f, pctBuf); dl->AddText(cap, cap->LegacySize, ImVec2(barMin.x + (barW - tsz.x) * 0.5f, barMin.y + (barH - tsz.y) * 0.5f), - IM_COL32(255, 255, 255, enabled ? 190 : 80), pctBuf); + m::WithAlpha(m::OnSurface(), enabled ? 200 : 80), pctBuf); } // Glass thumb (drawn last so it sits above the fill + label). const float thumbY = barMin.y + barH * 0.5f; - dl->AddCircleFilled(ImVec2(thumbCenterX, thumbY), thumbR, IM_COL32(255, 255, 255, enabled ? 205 : 90), 24); - dl->AddCircle(ImVec2(thumbCenterX, thumbY), thumbR, IM_COL32(255, 255, 255, enabled ? 120 : 50), 24, 1.4f * dp); + dl->AddCircleFilled(ImVec2(thumbCenterX, thumbY), thumbR, m::WithAlpha(m::OnSurface(), enabled ? 215 : 90), 24); + dl->AddCircle(ImVec2(thumbCenterX, thumbY), thumbR, m::WithAlpha(m::OnSurface(), enabled ? 130 : 50), 24, 1.4f * dp); if (hovered && enabled) { ImGui::SetMouseCursor(ImGuiMouseCursor_Hand);