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:
@@ -77,6 +77,19 @@ public class BandmapLayoutTests
|
||||
Assert.Equal([14_005_000, 14_010_000], ticks.Select(t => t.Hertz));
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(60, 590, 5)]
|
||||
[InlineData(75, 590, 10)]
|
||||
[InlineData(100, 590, 10)]
|
||||
[InlineData(150, 590, 20)]
|
||||
public void TheTickStepKeepsThreeLinesBetweenTicks(int spanKilohertz, double height, int expectedKilohertz)
|
||||
{
|
||||
BandmapScale scale = new(
|
||||
Frequency.FromKilohertz(14_000), Frequency.FromKilohertz(14_000 + spanKilohertz), height);
|
||||
|
||||
Assert.Equal(expectedKilohertz, BandmapLayout.StepFor(scale, 3 * 16).Kilohertz);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TheScaleTurnsPixelsBackIntoFrequencies() =>
|
||||
Assert.Equal(14_050_000, Scale().At(50).Hertz);
|
||||
|
||||
Reference in New Issue
Block a user