diff --git a/AGENTS.md b/AGENTS.md index 38b9f7f..5c9e37c 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -95,6 +95,12 @@ Avalonia 12. Use the `avalonia-docs` MCP before reaching for an API from memory. - App types are `internal` (CA1515): a view sets `x:ClassModifier="internal"` to match. - Code-behind is view-only: focus and forwarding events to commands. - Every text-less control gets an `AutomationProperties.Name`. +- Freizeichen opens from inside Lagebuch and wears Lagebuch's theme: `Theme/Tokens.axaml` and + `Theme/Styles.axaml` are a trimmed copy of Lagebuch's, with the same token names so a change + there carries across by diff. Use the tokens and classes (`display`, `overline`, `secondary`, + `metric`, `status`, `Button.signal`), never a hard-coded colour or font in a view. +- Every new top-level `Window` calls `WindowsTitleBar.ApplyDarkMode` in `OnOpened`. Windows 10 + gets no dark title bar otherwise. ## Security diff --git a/Directory.Packages.props b/Directory.Packages.props index 84ad229..60a8a2e 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -8,7 +8,6 @@ - diff --git a/src/Freizeichen.App/Assets/Fonts/Barlow-Medium.ttf b/src/Freizeichen.App/Assets/Fonts/Barlow-Medium.ttf new file mode 100644 index 0000000..d546e7a Binary files /dev/null and b/src/Freizeichen.App/Assets/Fonts/Barlow-Medium.ttf differ diff --git a/src/Freizeichen.App/Assets/Fonts/Barlow-Regular.ttf b/src/Freizeichen.App/Assets/Fonts/Barlow-Regular.ttf new file mode 100644 index 0000000..bb3faec Binary files /dev/null and b/src/Freizeichen.App/Assets/Fonts/Barlow-Regular.ttf differ diff --git a/src/Freizeichen.App/Assets/Fonts/Barlow-SemiBold.ttf b/src/Freizeichen.App/Assets/Fonts/Barlow-SemiBold.ttf new file mode 100644 index 0000000..7c974a4 Binary files /dev/null and b/src/Freizeichen.App/Assets/Fonts/Barlow-SemiBold.ttf differ diff --git a/src/Freizeichen.App/Assets/Fonts/JetBrainsMono-Medium.ttf b/src/Freizeichen.App/Assets/Fonts/JetBrainsMono-Medium.ttf new file mode 100644 index 0000000..9767115 Binary files /dev/null and b/src/Freizeichen.App/Assets/Fonts/JetBrainsMono-Medium.ttf differ diff --git a/src/Freizeichen.App/Assets/Fonts/JetBrainsMono-Regular.ttf b/src/Freizeichen.App/Assets/Fonts/JetBrainsMono-Regular.ttf new file mode 100644 index 0000000..dff66cc Binary files /dev/null and b/src/Freizeichen.App/Assets/Fonts/JetBrainsMono-Regular.ttf differ diff --git a/src/Freizeichen.App/Assets/Fonts/Oswald-Medium.ttf b/src/Freizeichen.App/Assets/Fonts/Oswald-Medium.ttf new file mode 100644 index 0000000..8a4b838 Binary files /dev/null and b/src/Freizeichen.App/Assets/Fonts/Oswald-Medium.ttf differ diff --git a/src/Freizeichen.App/Assets/Fonts/Oswald-SemiBold.ttf b/src/Freizeichen.App/Assets/Fonts/Oswald-SemiBold.ttf new file mode 100644 index 0000000..1032a3a Binary files /dev/null and b/src/Freizeichen.App/Assets/Fonts/Oswald-SemiBold.ttf differ diff --git a/src/Freizeichen.App/Assets/Fonts/README.md b/src/Freizeichen.App/Assets/Fonts/README.md new file mode 100644 index 0000000..62ef317 --- /dev/null +++ b/src/Freizeichen.App/Assets/Fonts/README.md @@ -0,0 +1,21 @@ +# Bundled fonts + +All fonts below are licensed under the **SIL Open Font License, Version 1.1** +(), which permits bundling and redistribution +within an application. Each family retains its own copyright and Reserved Font +Name as stated in its upstream `OFL.txt`. + +| File(s) | Family | Copyright | +| -------------------------------------------- | -------------- | ------------------------------------------------------------------------- | +| `Oswald-Medium.ttf`, `Oswald-SemiBold.ttf` | Oswald | Copyright 2016 The Oswald Project Authors (github.com/googlefonts/OswaldFont) | +| `Barlow-*.ttf` | Barlow | Copyright 2017 The Barlow Project Authors (github.com/jpt/barlow) | +| `JetBrainsMono-Regular.ttf`, `-Medium.ttf` | JetBrains Mono | Copyright 2020 The JetBrains Mono Project Authors (github.com/JetBrains/JetBrainsMono) | + +## Notes + +- The Oswald files are **static weight instances** renamed to share the family + name `Oswald` (OS/2 weight class 500 / 600). The upstream variable font is not + used because variable-font weight realization fails in the headless Skia text + backend used by the headless view tests. +- Fonts are embedded via `` and referenced as + `avares://Freizeichen/Assets/Fonts#` in `Theme/Tokens.axaml`. diff --git a/src/Freizeichen.App/Freizeichen.App.csproj b/src/Freizeichen.App/Freizeichen.App.csproj index 740a8cf..609d784 100644 --- a/src/Freizeichen.App/Freizeichen.App.csproj +++ b/src/Freizeichen.App/Freizeichen.App.csproj @@ -15,10 +15,14 @@ - + + + + + diff --git a/src/Freizeichen.App/FreizeichenApp.axaml b/src/Freizeichen.App/FreizeichenApp.axaml index 103ada4..a62eeb1 100644 --- a/src/Freizeichen.App/FreizeichenApp.axaml +++ b/src/Freizeichen.App/FreizeichenApp.axaml @@ -2,8 +2,9 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Class="Freizeichen.App.FreizeichenApp" x:ClassModifier="internal" - RequestedThemeVariant="Default"> + RequestedThemeVariant="Dark"> + diff --git a/src/Freizeichen.App/Program.cs b/src/Freizeichen.App/Program.cs index 5ae5c0a..fe769db 100644 --- a/src/Freizeichen.App/Program.cs +++ b/src/Freizeichen.App/Program.cs @@ -10,6 +10,5 @@ public static void Main(string[] args) => public static AppBuilder BuildAvaloniaApp() => AppBuilder.Configure() - .UsePlatformDetect() - .WithInterFont(); + .UsePlatformDetect(); } diff --git a/src/Freizeichen.App/Theme/Styles.axaml b/src/Freizeichen.App/Theme/Styles.axaml new file mode 100644 index 0000000..948ca7e --- /dev/null +++ b/src/Freizeichen.App/Theme/Styles.axaml @@ -0,0 +1,208 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Freizeichen.App/Theme/Tokens.axaml b/src/Freizeichen.App/Theme/Tokens.axaml new file mode 100644 index 0000000..5d1b445 --- /dev/null +++ b/src/Freizeichen.App/Theme/Tokens.axaml @@ -0,0 +1,85 @@ + + + + + + + avares://Freizeichen/Assets/Fonts#Oswald + avares://Freizeichen/Assets/Fonts#Barlow + avares://Freizeichen/Assets/Fonts#JetBrains Mono + + + + #0B0E13 + #10141C + #141A24 + #1B2330 + #222C3B + + #26303D + #384556 + + #EEF2F8 + #9AA7B8 + #65728580 + + #FF3D2E + #FF5A3C + #C71E12 + + + #F87171 + + + #2DD4E8 + + #37D17C + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + 36 + + diff --git a/src/Freizeichen.App/Views/DialWindow.axaml b/src/Freizeichen.App/Views/DialWindow.axaml index 8f23ef2..7bcfb90 100644 --- a/src/Freizeichen.App/Views/DialWindow.axaml +++ b/src/Freizeichen.App/Views/DialWindow.axaml @@ -7,26 +7,25 @@ Title="Freizeichen – Anrufen" Width="420" SizeToContent="Height" CanResize="False" Topmost="True" - WindowStartupLocation="CenterScreen"> - - - + WindowStartupLocation="CenterScreen" + Background="{StaticResource AppBackgroundBrush}"> + + + - - - - - - -