Show tool tips at once and widen the bandmap carrier tick
The tool tip has no show delay and the theme's fade is removed. The carrier tick reaches 30 px further to the right. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -27,6 +27,10 @@
|
|||||||
<Style Selector="DataGrid">
|
<Style Selector="DataGrid">
|
||||||
<Setter Property="ScrollViewer.AllowAutoHide" Value="False" />
|
<Setter Property="ScrollViewer.AllowAutoHide" Value="False" />
|
||||||
</Style>
|
</Style>
|
||||||
|
<!-- the Fluent tool tip fades in and out; show it at once -->
|
||||||
|
<Style Selector="ToolTip">
|
||||||
|
<Setter Property="Transitions" Value="{x:Null}" />
|
||||||
|
</Style>
|
||||||
<Style Selector="Window">
|
<Style Selector="Window">
|
||||||
<Setter Property="Background" Value="{DynamicResource FormBackground}" />
|
<Setter Property="Background" Value="{DynamicResource FormBackground}" />
|
||||||
<Setter Property="Foreground" Value="{DynamicResource FormForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource FormForeground}" />
|
||||||
|
|||||||
@@ -29,6 +29,10 @@ public sealed class BandmapView : Control
|
|||||||
/// How far the carrier tick reaches past each side of the bar.
|
/// How far the carrier tick reaches past each side of the bar.
|
||||||
private const double CarrierOverhang = 3;
|
private const double CarrierOverhang = 3;
|
||||||
|
|
||||||
|
/// How much further the carrier tick reaches to the right, so it can be
|
||||||
|
/// seen beside the callsign labels.
|
||||||
|
private const double CarrierExtraRight = 30;
|
||||||
|
|
||||||
/// The scale stops short of the top and bottom edges so the first and last
|
/// The scale stops short of the top and bottom edges so the first and last
|
||||||
/// frequency numbers are not cut in half.
|
/// frequency numbers are not cut in half.
|
||||||
private const double Inset = 9;
|
private const double Inset = 9;
|
||||||
@@ -160,7 +164,7 @@ public sealed class BandmapView : Control
|
|||||||
double carrier = Math.Round(scale.YFor(vfo.Carrier) + Inset);
|
double carrier = Math.Round(scale.YFor(vfo.Carrier) + Inset);
|
||||||
context.FillRectangle(
|
context.FillRectangle(
|
||||||
brush,
|
brush,
|
||||||
new Rect(ScaleX - (VfoWidth / 2) - CarrierOverhang, carrier - 1, VfoWidth + (2 * CarrierOverhang), 2));
|
new Rect(ScaleX - (VfoWidth / 2) - CarrierOverhang, carrier - 1, VfoWidth + (2 * CarrierOverhang) + CarrierExtraRight, 2));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -194,6 +198,7 @@ public sealed class BandmapView : Control
|
|||||||
protected override void OnPointerMoved(PointerEventArgs e)
|
protected override void OnPointerMoved(PointerEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnPointerMoved(e);
|
base.OnPointerMoved(e);
|
||||||
|
ToolTip.SetShowDelay(this, 0);
|
||||||
ToolTip.SetTip(
|
ToolTip.SetTip(
|
||||||
this,
|
this,
|
||||||
LabelAt(e.GetPosition(this)) is { } label ? SpotDescription.Of(label.Spot) : null);
|
LabelAt(e.GetPosition(this)) is { } label ? SpotDescription.Of(label.Spot) : null);
|
||||||
|
|||||||
Reference in New Issue
Block a user