Lay the buttons out the way N1MM lays them out
The twelve function keys were one row of twelve at the bottom of the window, with the action row under them. N1MM puts both between the entry boxes and the bearing line, six keys to a row in two rows, each row filling the width. The action row takes N1MM's widths as well: 23 per cent to the first button and the rest shared out. N1MM gives the remaining seven 11 per cent each; there are five here, because Mark and Store are missing, so they share the same 77. Looked at under Xvfb against the N1MM screenshot: same two rows of six, same action row under them, same order down the window. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RoGtneMQaz4M9w7Kk49AVD
This commit is contained in:
14
README.md
14
README.md
@@ -206,9 +206,17 @@ the right one red while something is going out on the air.
|
||||
|
||||
### The buttons and the title bar
|
||||
|
||||
Under the function keys is the row N1MM has: Esc: Stop, Wipe, Log It, Edit,
|
||||
Spot It and QRZ, each doing what its key does. QRZ opens the callsign's page in
|
||||
a browser. N1MM's Mark and Store are not there, because call stacking is not.
|
||||
The twelve function keys sit in two rows of six, with the row of actions under
|
||||
them, between the entry boxes and the bearing line, which is where N1MM puts
|
||||
them. Each row fills the width, and the first button of the action row takes the
|
||||
23 per cent N1MM gives it.
|
||||
|
||||
The action row is N1MM's: Esc: Stop, Wipe, Log It, Edit, Spot It and QRZ, each
|
||||
doing what its key does. QRZ opens the callsign's page in a browser.
|
||||
|
||||
N1MM's other two buttons are not there. Mark puts a `Busy@` marker on your own
|
||||
bandmap at the frequency you are on, which needs a bandmap entry that is not a
|
||||
station. Store is call stacking, which is not here either.
|
||||
|
||||
The title bar says what N1MM's says: the frequency, the mode, whether the
|
||||
frequency came from a radio or was typed, and which radio the window belongs to
|
||||
|
||||
@@ -34,8 +34,10 @@
|
||||
</Style>
|
||||
<Style Selector="Button.fkey">
|
||||
<Setter Property="FontSize" Value="11" />
|
||||
<Setter Property="Padding" Value="6,3" />
|
||||
<Setter Property="Margin" Value="0,0,3,0" />
|
||||
<Setter Property="Padding" Value="4,3" />
|
||||
<Setter Property="Margin" Value="0,0,2,2" />
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
||||
</Style>
|
||||
<!-- the key Enter would send next, while ESM is on -->
|
||||
<Style Selector="Button.fkey.esm">
|
||||
@@ -120,21 +122,6 @@
|
||||
</MenuItem>
|
||||
</Menu>
|
||||
|
||||
<Border DockPanel.Dock="Bottom" Padding="6,4" BorderThickness="0,1,0,0"
|
||||
BorderBrush="#33808080">
|
||||
<StackPanel Spacing="4">
|
||||
<WrapPanel Name="FunctionKeys" />
|
||||
<WrapPanel>
|
||||
<Button Classes="fkey" Content="Esc: Stop" Click="OnStopSending" />
|
||||
<Button Classes="fkey" Content="Wipe" Click="OnWipe" />
|
||||
<Button Classes="fkey" Content="Log It" Click="OnLogIt" />
|
||||
<Button Classes="fkey" Content="Edit" Click="OnEditLastContact" />
|
||||
<Button Classes="fkey" Content="Spot It" Click="OnSpotIt" />
|
||||
<Button Classes="fkey" Content="QRZ" Click="OnLookUpCall" />
|
||||
</WrapPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<Border DockPanel.Dock="Left" Padding="6,6,4,6" BorderThickness="0,0,1,0"
|
||||
BorderBrush="#33808080">
|
||||
<Grid Name="BandButtons" ColumnDefinitions="Auto,Auto" />
|
||||
@@ -171,7 +158,23 @@
|
||||
<TextBlock Name="VerdictText" FontSize="12" Text="" />
|
||||
</Border>
|
||||
|
||||
<TextBlock Name="PathText" FontSize="11" Opacity="0.75" Margin="2,4,0,0" Text=""
|
||||
<!-- N1MM's two rows of six function keys, then the row of actions, both
|
||||
between the entry boxes and the bearing line -->
|
||||
<Grid Name="FunctionKeys" Margin="0,6,0,0"
|
||||
ColumnDefinitions="*,*,*,*,*,*" RowDefinitions="Auto,Auto" />
|
||||
|
||||
<!-- the widths N1MM gives the row: 23 per cent to the first and the rest
|
||||
shared out -->
|
||||
<Grid ColumnDefinitions="115*,77*,77*,77*,77*,77*">
|
||||
<Button Classes="fkey" Content="Esc: Stop" Click="OnStopSending" />
|
||||
<Button Grid.Column="1" Classes="fkey" Content="Wipe" Click="OnWipe" />
|
||||
<Button Grid.Column="2" Classes="fkey" Content="Log It" Click="OnLogIt" />
|
||||
<Button Grid.Column="3" Classes="fkey" Content="Edit" Click="OnEditLastContact" />
|
||||
<Button Grid.Column="4" Classes="fkey" Content="Spot It" Click="OnSpotIt" />
|
||||
<Button Grid.Column="5" Classes="fkey" Content="QRZ" Click="OnLookUpCall" />
|
||||
</Grid>
|
||||
|
||||
<TextBlock Name="PathText" FontSize="11" Opacity="0.75" Margin="2,8,0,0" Text=""
|
||||
TextTrimming="CharacterEllipsis" />
|
||||
|
||||
<TextBlock Name="UserTextText" FontSize="11" Margin="2,2,0,0" Text=""
|
||||
|
||||
@@ -23,6 +23,10 @@ public sealed partial class EntryWindow : Window
|
||||
private readonly List<Button> functionButtons = [];
|
||||
private const double MilesPerKilometre = 0.621371;
|
||||
|
||||
/// The width of the function key panel, in buttons. N1MM's is six wide and
|
||||
/// two deep; the XAML holds the same six columns.
|
||||
private const int FunctionKeyColumns = 6;
|
||||
|
||||
private static readonly IBrush Dark = new SolidColorBrush(Color.FromArgb(0x33, 0x80, 0x80, 0x80));
|
||||
|
||||
private bool sending;
|
||||
@@ -850,7 +854,8 @@ public sealed partial class EntryWindow : Window
|
||||
|
||||
/// The labels come from the message file, so what the buttons say is what
|
||||
/// the operator wrote. Right-clicking one opens the editor, as it does on
|
||||
/// the telnet window's buttons.
|
||||
/// the telnet window's buttons. Twelve keys in two rows of six, as N1MM
|
||||
/// lays them out.
|
||||
private void BuildFunctionKeys()
|
||||
{
|
||||
FunctionKeys.Children.Clear();
|
||||
@@ -868,6 +873,8 @@ public sealed partial class EntryWindow : Window
|
||||
_ = EditMessages();
|
||||
}
|
||||
};
|
||||
Grid.SetColumn(button, at % FunctionKeyColumns);
|
||||
Grid.SetRow(button, at / FunctionKeyColumns);
|
||||
FunctionKeys.Children.Add(button);
|
||||
functionButtons.Add(button);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user