Add a 60 kHz bandmap zoom, a mode-wide zoom and denser scale ticks
The zoom list gains 60 kHz and a "mode" level that shows the CW, digital or phone part of the band the receiver is in, before "band". For views from 40 to 200 kHz wide, the scale picks the smallest round step that keeps three lines of text between ticks. The font size buttons are removed; Ctrl with the wheel or plus and minus still change the size. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -61,4 +61,34 @@ public class BandmapSliceTests
|
||||
|
||||
Assert.Equal(Khz(14_005), low);
|
||||
}
|
||||
|
||||
private static readonly BandSegments Segments = new(
|
||||
Bands.Band20M, CwHigh: Khz(14_150), DigitalLow: Khz(14_070), DigitalHigh: Khz(14_099));
|
||||
|
||||
[Theory]
|
||||
[InlineData(14_025, 14_000, 14_150)]
|
||||
[InlineData(14_080, 14_070, 14_099)]
|
||||
[InlineData(14_250, 14_150, 14_350)]
|
||||
public void ThePartOfTheBandIsTheOneTheReceiverIsIn(double receiver, double low, double high)
|
||||
{
|
||||
(Frequency from, Frequency to) = BandmapSlice.Part(Bands.Band20M, Segments, Khz(receiver));
|
||||
|
||||
Assert.Equal((Khz(low), Khz(high)), (from, to));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ABandWithoutBoundariesShowsTheWholeBandAsAPart()
|
||||
{
|
||||
(Frequency from, Frequency to) = BandmapSlice.Part(Bands.Band20M, null, Khz(14_025));
|
||||
|
||||
Assert.Equal((Bands.Band20M.Low, Bands.Band20M.High), (from, to));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ThePartIsStretchedToIncludeAReceiverOutsideTheBand()
|
||||
{
|
||||
(_, Frequency to) = BandmapSlice.Part(Bands.Band20M, Segments, Khz(14_360));
|
||||
|
||||
Assert.Equal(Khz(14_360), to);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user