Files
Nonemm/src/Nonemm.App/Dialogs/MessagesDialog.axaml
T
erikbrockoandClaude Sonnet 5.5 29d3a0f016 Name a monospace font list instead of the generic monospace
The generic name only resolves through fontconfig, so on Windows the
windows fell back to the proportional default.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 01:07:47 +00:00

44 lines
2.5 KiB
XML

<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:theming="using:Nonemm.App.Theming"
x:Class="Nonemm.App.Dialogs.MessagesDialog"
Title="Function key messages" Width="620" Height="520"
WindowStartupLocation="CenterOwner" KeyDown="OnKeyDown">
<Window.Styles>
<!-- the box holds transparent text over the coloured lines, so its own
background must stay out of the way in every state, focused included -->
<Style Selector="TextBox#TextArea /template/ Border#PART_BorderElement">
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderThickness" Value="0" />
</Style>
</Window.Styles>
<DockPanel Margin="14">
<TextBlock DockPanel.Dock="Top" TextWrapping="Wrap" FontSize="11" Opacity="0.75"
Text="One line per key: the button label, a comma, then the message. A line starting with # is a comment. The first twelve lines are F1 to F12 while running; twelve more give the keys while searching, and the ones left out keep their running message. This is N1MM's .mc format, so a file from either program works in the other." />
<Grid DockPanel.Dock="Bottom" ColumnDefinitions="Auto,*,Auto" Margin="0,10,0,0">
<StackPanel Orientation="Horizontal" Spacing="6">
<Button Content="Import…" Click="OnImport" />
<Button Content="Export…" Click="OnExport" />
<Button Content="Back to the defaults" Click="OnDefaults" />
</StackPanel>
<StackPanel Grid.Column="2" Orientation="Horizontal" Spacing="6">
<Button Content="Cancel" Click="OnCancel" />
<Button Content="Save" Click="OnSave" />
</StackPanel>
</Grid>
<!-- the colours are painted on a text block underneath, and the box on top
holds transparent text, so both use the same layout and scroll as one -->
<Border BorderThickness="1" BorderBrush="#40808080" CornerRadius="3" Margin="0,8,0,0">
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
<Grid>
<StackPanel Name="Highlight" Margin="6,4" IsHitTestVisible="False" ZIndex="1" />
<TextBox Name="TextArea" AcceptsReturn="True" AcceptsTab="False" FontFamily="{x:Static theming:Fonts.Mono}"
FontSize="12" Padding="6,4" TextWrapping="NoWrap" BorderThickness="0"
Background="Transparent" Foreground="Transparent"
VerticalContentAlignment="Top" />
</Grid>
</ScrollViewer>
</Border>
</DockPanel>
</Window>