mirror of
https://git.vladimir.cc/vladimir/ewsdr.git
synced 2026-08-25 17:27:32 +00:00
light theme: waterfall palette + VFO hover colors + global theme fix
- SpectrumView: WaterfallLightTheme() — кремовый→зелень→бирюза→индиго - FreqDisplay: ColorHoverBG свойство, убран хардкод фона hover - AppTheme: FreqHover/FreqHoverBG/FreqDimDot для обеих тем - Settings: SaveTheme/LoadTheme в корневой секции preferences - MainForm: тема загружается при старте, сохраняется при изменении Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+28
-1
@@ -273,6 +273,30 @@ begin
|
||||
Result := ($FF shl 24) or (R shl 16) or (G shl 8) or B;
|
||||
end;
|
||||
|
||||
// Цветовая схема водопада для светлой темы.
|
||||
// Шум исчезает в фоне (кремовый), сигналы: зелень → бирюза → синева → индиго.
|
||||
function WaterfallLightTheme(ValueDB, LowDB, HighDB: Double): LongWord;
|
||||
const
|
||||
NSTOPS = 8;
|
||||
SR: array[0..NSTOPS-1] of Integer = (240, 210, 148, 60, 14, 8, 24, 64);
|
||||
SG: array[0..NSTOPS-1] of Integer = (238, 228, 200, 164, 132, 96, 52, 6);
|
||||
SB: array[0..NSTOPS-1] of Integer = (230, 190, 118, 68, 96, 148, 166, 100);
|
||||
var
|
||||
T: Double;
|
||||
Seg: Integer;
|
||||
R, G, B: Integer;
|
||||
begin
|
||||
if ValueDB <= LowDB then begin Result := $FFF0EEE6; Exit; end;
|
||||
if ValueDB >= HighDB then begin Result := ($FF shl 24) or (SR[NSTOPS-1] shl 16) or (SG[NSTOPS-1] shl 8) or SB[NSTOPS-1]; Exit; end;
|
||||
T := (ValueDB - LowDB) / Max(1E-9, HighDB - LowDB) * (NSTOPS - 1);
|
||||
Seg := Min(NSTOPS - 2, Trunc(T));
|
||||
T := T - Seg;
|
||||
R := EnsureRange(Round(SR[Seg] * (1.0 - T) + SR[Seg+1] * T), 0, 255);
|
||||
G := EnsureRange(Round(SG[Seg] * (1.0 - T) + SG[Seg+1] * T), 0, 255);
|
||||
B := EnsureRange(Round(SB[Seg] * (1.0 - T) + SB[Seg+1] * T), 0, 255);
|
||||
Result := ($FF shl 24) or (R shl 16) or (G shl 8) or B;
|
||||
end;
|
||||
|
||||
procedure InitRawDesc32(var Desc: TRawImageDescription; AWidth, AHeight: Integer);
|
||||
begin
|
||||
FillChar(Desc, SizeOf(Desc), 0);
|
||||
@@ -828,7 +852,10 @@ begin
|
||||
dB := FWaterfallBuf[WatS0] * (1.0 - frac) + FWaterfallBuf[WatS1] * frac;
|
||||
V := Trunc((dB - WfLow) * InvRange);
|
||||
if V < 0 then V := 0; if V > 255 then V := 255;
|
||||
Pal := WaterfallEnhancedColorThetis(dB, WfLow, WfHigh);
|
||||
if FLightTheme then
|
||||
Pal := WaterfallLightTheme(dB, WfLow, WfHigh)
|
||||
else
|
||||
Pal := WaterfallEnhancedColorThetis(dB, WfLow, WfHigh);
|
||||
Px^ := Pal; Inc(Px);
|
||||
WatSrcF := WatSrcF + Step;
|
||||
end;
|
||||
|
||||
Reference in New Issue
Block a user