Colours came from static brushes scattered over the windows. They now come from a Theme, and everything that paints a station, a spot or a log row asks Themes.Current as it paints, so changing the theme changes every window without reopening it. light is N1MM's own palette, read out of ApplicationStyles: the pale blue behind a window, ivory on a button, white boxes, and the four colours a station is painted in. dark is the same states in colours for a dark screen, which is roughly what the program looked like before. Config > Manage Skins, Colors and Fonts picks one, under N1MM's name for the same dialog, and shows what each theme paints a callsign. The choice is kept in settings.json as Theme, and light is the default. The window chrome follows through resources the Fluent controls read, so a text box and a button take the theme's colours in every state. Fonts and skins are not part of it. Looked at under Xvfb in both themes: the entry window, the theme dialog, and the log window with its rows still coloured by what each contact was worth. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
28 lines
1.2 KiB
XML
28 lines
1.2 KiB
XML
<Application xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
x:Class="Nonemm.App.App"
|
|
RequestedThemeVariant="Light">
|
|
<!-- the colours behind these keys are filled in from the theme in use, in
|
|
App.ApplyTheme -->
|
|
<Application.Resources>
|
|
<SolidColorBrush x:Key="FormBackground">#CDDAEB</SolidColorBrush>
|
|
<SolidColorBrush x:Key="FormForeground">#000000</SolidColorBrush>
|
|
<SolidColorBrush x:Key="ButtonBackground">#FFFAF0</SolidColorBrush>
|
|
<SolidColorBrush x:Key="FieldBackground">#FFFFFF</SolidColorBrush>
|
|
<SolidColorBrush x:Key="FieldForeground">#000000</SolidColorBrush>
|
|
</Application.Resources>
|
|
|
|
<Application.Styles>
|
|
<FluentTheme />
|
|
<StyleInclude Source="avares://Avalonia.Controls.DataGrid/Themes/Fluent.xaml" />
|
|
|
|
<Style Selector="Window">
|
|
<Setter Property="Background" Value="{DynamicResource FormBackground}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource FormForeground}" />
|
|
</Style>
|
|
<Style Selector="Menu">
|
|
<Setter Property="Background" Value="{DynamicResource FormBackground}" />
|
|
</Style>
|
|
</Application.Styles>
|
|
</Application>
|