Draw the bandmap the way N1MM draws it
The bandmap was a list of frequencies and callsigns. It is now a frequency scale with the stations written out beside it and a leader line from each callsign back to where the station really is. BandmapLayout does the placing and has no UI reference, so the rule is unit tested: put the label centred on its frequency, and if it would cover the one above, push it below instead. That is N1MM's CalculateOffset, and it is what keeps three stations a hundred hertz apart readable. The scale stops short of the top and bottom edges, or the first and last frequency numbers come out cut in half. VfoMarker draws the receiver as a bar as wide as the mode passes, rather than a line. Only the receiver is fed: the radio does not report a transmit VFO or a second radio yet, so VfoRole has the other two roles ready and nothing draws them. Band-plan colouring of the scale is left out because the segments differ by ITU region and there is no band-plan table to read them from. Checked by running the program against a fake cluster node under Xvfb and looking at the result: twelve spots, three of them stacked with fanned leaders. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -2,12 +2,14 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="using:Nonemm.App.Windows"
|
||||
x:Class="Nonemm.App.Windows.BandmapWindow"
|
||||
Title="Bandmap" Width="320" Height="520">
|
||||
Title="Bandmap" Width="280" Height="620">
|
||||
<DockPanel>
|
||||
<StackPanel DockPanel.Dock="Top" Orientation="Horizontal" Margin="6,6,6,2" Spacing="6">
|
||||
<StackPanel DockPanel.Dock="Top" Orientation="Horizontal" Margin="6,6,6,4" Spacing="8">
|
||||
<TextBlock Name="BandText" FontSize="12" VerticalAlignment="Center" />
|
||||
<CheckBox Name="ThisBandOnly" Content="this band" IsChecked="True" FontSize="11" />
|
||||
<ComboBox Name="SpanBox" FontSize="11" Width="96" />
|
||||
</StackPanel>
|
||||
<ListBox Name="Spots" FontFamily="monospace" FontSize="13" />
|
||||
<TextBlock DockPanel.Dock="Bottom" Name="StatusText" Margin="6,2,6,6"
|
||||
FontSize="11" Opacity="0.7" />
|
||||
<local:BandmapView Name="View" />
|
||||
</DockPanel>
|
||||
</local:RefreshableWindow>
|
||||
|
||||
Reference in New Issue
Block a user