Show local spots in bold and name the computer that made them

A spot an operator put on a bandmap, here or on another computer, is
drawn in bold. Its hover text names the computer instead of the
spotter's callsign. A spot from another computer carries the name from
the ADDSPOT message.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-24 11:51:13 +00:00
co-authored by Claude Sonnet 5.5
parent 0c61401c2d
commit a189f63732
10 changed files with 47 additions and 12 deletions
+4 -3
View File
@@ -49,6 +49,7 @@ public sealed class BandmapView : Control
private static readonly IBrush OutsideBrush = new SolidColorBrush(Color.FromRgb(0xC0, 0x39, 0x2B), 0.13);
private readonly Typeface typeface = new(Fonts.Mono);
private readonly Typeface boldTypeface = new(Fonts.Mono, FontStyle.Normal, FontWeight.Bold);
private IReadOnlyList<BandmapLabel> placed = [];
private BandmapScale scale = new(Bands.Band20M.Low, Bands.Band20M.High, 1);
@@ -176,7 +177,7 @@ public sealed class BandmapView : Control
new Point(ScaleX + 2, label.MarkY),
new Point(LabelX - 2, label.LabelY + (LabelHeight / 2)));
context.DrawText(
Text(label.Spot.Call.Text, colour, TextSize),
Text(label.Spot.Call.Text, colour, TextSize, label.Spot.IsLocal),
new Point(LabelX, label.LabelY + (LabelPadding / 2)));
}
@@ -216,8 +217,8 @@ public sealed class BandmapView : Control
FrequencyPicked?.Invoke(this, scale.At(at.Y - Inset));
}
private FormattedText Text(string text, IBrush brush, double size) =>
new(text, CultureInfo.InvariantCulture, FlowDirection.LeftToRight, typeface, size, brush);
private FormattedText Text(string text, IBrush brush, double size, bool bold = false) =>
new(text, CultureInfo.InvariantCulture, FlowDirection.LeftToRight, bold ? boldTypeface : typeface, size, brush);
/// The form's text colour, which the theme sets in both light and dark.
private IBrush Foreground() =>