From fa38e433e177992731b84e2ea4d359fce302d068 Mon Sep 17 00:00:00 2001 From: Uladzimir Karpenka Date: Sat, 2 May 2026 21:48:12 +0300 Subject: [PATCH] fix waterfall init color to match surrounding panel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Empty waterfall now fills with FTheme.Panel (same color as PanelRight) instead of FTheme.BG, so there's no visible seam before stream starts. Correct TColor→BGRA conversion (R/B swap) applied. Co-Authored-By: Claude Sonnet 4.6 --- SpectrumView.pas | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/SpectrumView.pas b/SpectrumView.pas index 3445ad6..0b3e73d 100644 --- a/SpectrumView.pas +++ b/SpectrumView.pas @@ -834,7 +834,12 @@ begin begin FWfBitmapW := W; FWfBitmapH := H; SetLength(FWfPixels, W * H); - FillDWord(FWfPixels[0], W * H, 0); + // TColor = $00BBGGRR → waterfall pixel = $FF_RR_GG_BB (swap R и B) + Pal := $FF000000 + or ((LongWord(FTheme.Panel) and $FF) shl 16) + or (LongWord(FTheme.Panel) and $FF00) + or ((LongWord(FTheme.Panel) shr 16) and $FF); + FillDWord(FWfPixels[0], W * H, Pal); FWfBitmap.SetSize(W, H); FreeAndNil(FWfIntfImg); end; @@ -1171,7 +1176,7 @@ begin if (FWfBitmap <> nil) and (FWfBitmap.Width = W) and (FWfBitmap.Height = H) then PB.Canvas.Draw(0, 0, FWfBitmap) else begin - PB.Canvas.Brush.Color := clBlack; + PB.Canvas.Brush.Color := FTheme.Panel; PB.Canvas.FillRect(Rect(0, 0, W, H)); end; if FMarkerActive then DrawMarkerLine(PB.Canvas, W, H);