mirror of
https://git.vladimir.cc/vladimir/ewsdr.git
synced 2026-08-25 20:37:33 +00:00
Stabilize top VFO frequency spacing
This commit is contained in:
+7
-1
@@ -32,6 +32,7 @@ type
|
||||
FColorDim: TColor;
|
||||
FMinMhzDigits: Integer;
|
||||
FDimLeadingZeros: Boolean;
|
||||
FCenterText: Boolean;
|
||||
FOnChange: TFreqChangeEvent;
|
||||
|
||||
FHoverDigit: Integer; // 0=единицы .. 8=100МГц, -1=нет
|
||||
@@ -69,6 +70,7 @@ type
|
||||
property ColorDim: TColor read FColorDim write FColorDim;
|
||||
property MinMhzDigits: Integer read FMinMhzDigits write FMinMhzDigits;
|
||||
property DimLeadingZeros: Boolean read FDimLeadingZeros write FDimLeadingZeros;
|
||||
property CenterText: Boolean read FCenterText write FCenterText;
|
||||
property OnChange: TFreqChangeEvent read FOnChange write FOnChange;
|
||||
end;
|
||||
|
||||
@@ -87,6 +89,7 @@ begin
|
||||
FColorDim := TColor($00607080);
|
||||
FMinMhzDigits := 1;
|
||||
FDimLeadingZeros := False;
|
||||
FCenterText := True;
|
||||
FHoverDigit := -1;
|
||||
FDigitW := 14;
|
||||
FCharH := 24;
|
||||
@@ -217,7 +220,10 @@ begin
|
||||
Inc(LeadingMhzZeros);
|
||||
|
||||
TotalW := C.TextWidth(S);
|
||||
StartX := (Width - TotalW) div 2;
|
||||
if FCenterText then
|
||||
StartX := (Width - TotalW) div 2
|
||||
else
|
||||
StartX := 2;
|
||||
if StartX < 2 then StartX := 2;
|
||||
|
||||
// Строим карту digit → X
|
||||
|
||||
Reference in New Issue
Block a user