feat/input-reader
2
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
cea7d87ff8 |
feat: Windows contrast themes followed - every colour the theme's own, the accent its highlight, the charts in its colours; and the title bar, the snackbars and a Danger button read (D91) (beta.35 PR-5) (#370)
* feat: Windows contrast themes followed - every colour the theme's own, by role from WPF UI's four contrast files, the accent its highlight and the highlight's text, the charts in its colours, the Remove button its own button, on and off at once (D91) (beta.35 PR-5) While SystemParameters.HighContrast is on, the light or the dark Fluent theme (as the contrast theme is) lies under Services/ContrastOverlay: every key of WPF UI 4.3.0's HC1, HC2, HCBlack and HCWhite in the user's own SystemColors colour for its role (Services/ContrastRoles: the colour a key has in all four, opaque colours only; ties and placeholders by name), the transparent keys transparent, the 21 accent keys as the highlight and the text on the accent as the highlight's text. No Mica, no SystemThemeWatcher (it would apply WPF UI's files: 84 of 97 colours a red placeholder, 17 brushes that throw). A switch, an edit or turning it off is followed at once. What the App draws itself reads ContrastTheme.Active: ChartPalette.ForContrast, ChartTheme.TextOn, the artwork band, the Import list, the update footer. The Remove button takes the DangerButton style (WPF UI's Danger is a fixed #F44336). Settings > Theme says a contrast theme is in use. Red first: the sweep under four default and two edited themes found the chips at 1.26-1.78:1, the Remove button at 3.06-4.42:1, the badges' black, and the pressed menu item white on white. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: what no sweep rendered reads - the agent's pill on the theme's own fills, every snackbar in the theme's colours, a Danger button's dark text on its red and the theme's own button under a contrast theme (beta.35 PR-5) Measured 2026-11-09 against WPF UI 4.3.0's styles, outside any surface the sweeps render: the title bar's agent pill was a ui:Badge with a bound palette appearance (light theme 2.78, 2.63, 2.16 and 3.68:1), the Success and Caution snackbars white on fixed green and orange (2.78 and 2.16:1 in both themes), and a Danger button white on #F44336 in the dark theme (3.68:1), out of any contrast theme's reach. AgentPill (a Pill on the theme's success, caution and critical fills), the strip's messages all Secondary, and an implicit ui:Button style: a Danger button's text is TextFillColorDarkPrimaryBrush (5.3 and 5.7:1), and the theme's own button while a contrast theme is on, message boxes included. The DangerButton style of the first commit is gone; a bound badge appearance and the other five button appearances are refused. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
b42d94bf1d |
fix(app): page titles read in the dark theme - every page sets the text colour the navigation Frame does not pass (beta.18 PR-1) (#286)
The owner's screenshots of 0.1.0-beta.17 (2026-10-07, dark theme): every page's title and section headings - Dashboard,
Recent sessions, Games, Compare, Pick 2 to 5 sessions, Settings and its groups, Logs - near-black on the dark window.
beta.16's screenshot shows the same.
Cause: a page is shown in WPF UI's NavigationViewContentPresenter, which is a Frame, and Frame.Init sets
InheritanceBehavior.SkipToAppNow - the window's Foreground stops there. A TextBlock that sets no colour falls to the
default, which WPF UI 4.3.0's TextBlockMetadata overrides to Brushes.Black. Cards, grids and controls set their own in
their templates; the bare titles and headings did not (19 texts on six pages, 1.29:1). It came and went: a page on
screen during a theme switch did take the window's new colour, and each navigation makes a new page that does not.
- Pages/*.xaml: every Page root sets Foreground="{DynamicResource TextFillColorPrimaryBrush}".
- AccessibilityTests.EveryPageSetsItsOwnTextColour: every Page root in the App's XAML sets it. Red before: all six.
- PagesLoadTests.EveryTextIsReadableInBothThemes (Dark, Light): every surface hosted as the App hosts it - a page in
the presenter, a window as itself, anything else in an unshown FluentWindow - and every text that shows >= 3:1 over
the colour painted under it. Red before in Dark: the 19 titles and headings at 1.29:1; Light green.
- PagesLoadTests.Hosted puts a page in the presenter, so EveryTextFollowsAThemeSwitch checks the App's real host too.
Until now it laid pages out straight in a window, whose colour they inherited - green over the black titles. Red
before, both ways: a page made after the switch stayed black. It now pairs texts by their place in the tree and
compares what shows (a switch re-applies the template of a DataGrid's collapsed scroll bar and select-all corner).
An Appearance="Secondary" put back on one Settings text still turns it red, both ways.
- Visuals.UnderTheme switches as the App does: the accent resources derived for the theme from Windows' default accent,
then the dictionary, and the application's own resources put back after. The accent is not in a theme dictionary, so
a Light check measured the dark theme's link blue on the light window (1.9:1) - a colour the App never shows.
ContrastTests uses it too; it passed systemAccentColor: true, which reads the machine's own accent palette.
- Docs: 16_WPFUI_SYNTAX (a theming bullet, a Gotchas entry), 08_UI §Contrast (the fifth hole), 14_TESTING (a page is
measured in the Frame; a theme brings its accent), wiki App UI development, CHANGELOG [Unreleased].
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|