Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0cce0ac0ce
|
No files matched your search
+22
-45
@@ -29,14 +29,13 @@ notices Windows shows for it. It draws nothing inside a game, so it cannot make
|
||||
|
||||
| Keys | What they do |
|
||||
|---|---|
|
||||
| **Ctrl+1** … **Ctrl+5** (also with the numeric keypad) | Open Dashboard, Games, Compare, Logs and Settings, and move the keyboard into that page; a screen reader hears its title. |
|
||||
| **Ctrl+1** … **Ctrl+5** (also with the numeric keypad) | Open Dashboard, Games, Compare, Logs and Settings. |
|
||||
| **Alt** or **F10**, then the arrow keys and **Enter** | Move to the menus. **Alt** with a menu's underlined letter opens it (*File*, *Tools*, *Help* in English). |
|
||||
| **Tab** and **Shift+Tab** | Move through a page or a dialog in reading order. |
|
||||
| The **arrow keys**, **Home**, **End**, **Page Up**, **Page Down** | Move inside a list or a table — a game's sessions, the games list, the Compare list, the import checklist. |
|
||||
| **Enter** or **Space** | Press the button, switch or box that has the focus. **Enter** on a game in the list opens its page. |
|
||||
| **Esc** | Closes a dialog the way its **Close** or **Cancel** button does: nothing is changed. A dialog that has no Close button waits for an answer, and the terms window has its own **Decline** and **Accept**. |
|
||||
| **Enter** in the hooking warning | Switches hooking on once the phrase is typed exactly; before that it does nothing. |
|
||||
| On a chart: the **arrow keys**, **Ctrl** with an arrow, **A** | Tab reaches every chart. The arrows move its view, Ctrl with an arrow zooms, A shows all of it again (so does a double-click); the page around it stays put. |
|
||||
|
||||
The same keys are in the user guide, [The screens](guide/07-screens.md#keyboard-and-mouse).
|
||||
|
||||
@@ -44,42 +43,19 @@ The same keys are in the user guide, [The screens](guide/07-screens.md#keyboard-
|
||||
|
||||
- **Every page, menu, dialog and setting can be reached and used with Narrator.** The owner checked this on
|
||||
2026-11-09, keyboard only with the mouse disconnected, on 0.1.0-beta.34 and 0.1.0-alpha.3, and found no fault.
|
||||
- **Every page has headings**: its title is a heading of the first level, each section one of the second, so a screen
|
||||
reader's heading keys move from section to section.
|
||||
- **Every chart says what it is and where its numbers are written as text**, and which keys move it.
|
||||
- **Every button, switch and box that shows no text of its own has a name**, from the same translations as the screen.
|
||||
- **Lists, drop-down options and table cells are read by the words they show**, and a button repeated on each row names
|
||||
its row — *Open: 11/9/2026 14:03*, *Play: Cyberpunk 2077*, *Turn off: Cyberpunk 2077*.
|
||||
- **The frame-rate readout says the game's own frames, the displayed frames and the frame-generation factor together**
|
||||
(*Native 62 FPS, displayed 118 FPS, frame generation ×1.9*) — never the larger number alone; a ray-tracing chip says its
|
||||
value and where it came from (*Ray Tracing: Yes, measured*).
|
||||
- **What appears is said as it appears**: a safety notice (hooking refused, measuring stopped, hooking turned off), the
|
||||
capture agent going away and coming back, an update's steps, a short message at the bottom of the window, a notice on a
|
||||
game's page and a result of **Tools ▸ Database maintenance** — in the words shown, while FrameLedger's window is the
|
||||
active one. While a game has the screen nothing interrupts it; the notice stays in the window, and Windows' own
|
||||
notifications from the icon by the clock are read by the screen reader itself.
|
||||
- **The notices above the page can be read where they are shown**, and the button that answers one says which notice it
|
||||
answers.
|
||||
- **Tab goes from control to control**: pictures, lists and the rows of Settings are not stops of their own.
|
||||
- **Dialogs say they are dialogs**, keep the focus inside them until they close, and then give it back to the control
|
||||
that opened them. A message box opens over FrameLedger's window, never behind it.
|
||||
- **Dialogs say they are dialogs** and keep the focus inside them until they close.
|
||||
|
||||
### Seeing the screen
|
||||
|
||||
- **Light, dark, or the same as Windows** (Settings ▸ Theme). FrameLedger takes every colour from the theme, and every
|
||||
text is measured against what is painted under it, in both themes.
|
||||
- **Windows contrast themes** (Settings ▸ Accessibility ▸ Contrast themes) — Aquatic, Desert, Dusk, Night sky, or one
|
||||
whose colours you changed: every colour in the window becomes one of the theme's, whatever Settings ▸ Theme says, as
|
||||
soon as you turn one on, edit it or turn it off. The charts draw in its colours too, their lines and marks still told
|
||||
apart by pattern, and Settings ▸ Theme says a contrast theme is in use.
|
||||
- **The colour a game's picture lends its page** is used only as far as every text on it still reads, and never under a
|
||||
contrast theme.
|
||||
- **Windows display scaling** at any size, on every screen; **Magnifier** (Windows logo key + Plus) works as with any
|
||||
program.
|
||||
- Labels such as *Hooking on* and *Not installed*, and the ray-tracing chips, always carry their words; a chip that reads
|
||||
*N/A* is also drawn with a dashed edge.
|
||||
- **No chart tells two series apart by colour alone**: its lines are solid, dashed or dotted, its points circles,
|
||||
triangles or squares, its shaded stretches striped or dotted.
|
||||
|
||||
### Languages
|
||||
|
||||
@@ -88,34 +64,35 @@ from the same translations. The documents — the user guide, this page, the leg
|
||||
|
||||
## How it is checked
|
||||
|
||||
- **On every build**, by the project's own tests: what a screen reader is given for every page, window and dialog —
|
||||
every place Tab stops has a name, no list or table item is read by its program name, no text is hidden from a screen
|
||||
reader inside a control, no two buttons in a list share a name; each thing that appears is said once, in its words;
|
||||
every page has one first-level heading and every section title a level; no chart tells two series apart by colour
|
||||
alone; a chart's keys move it and stay its own; every control that shows no text has a name; no colour is written
|
||||
into a screen; every text reads against its background in both themes and after a theme switch, and under Windows'
|
||||
four contrast themes and two edited ones is drawn in the theme's own colours at 4.5:1 or better; **Esc** closes the
|
||||
open dialog without an answer, and a dialog gives the focus back; **Ctrl+1** … **Ctrl+5** open the pages in their
|
||||
order and move the keyboard into them; a page slides in only while Windows' animation effects are on; the program
|
||||
declares it follows each screen's scaling.
|
||||
- **On every build**, by the project's own tests: every control that shows no text has a name; no colour is written
|
||||
into a screen; every text reads against its background in both themes and after a theme switch; **Esc** closes the
|
||||
open dialog without an answer; **Ctrl+1** … **Ctrl+5** open the pages in their order; the program declares it follows
|
||||
each screen's scaling.
|
||||
- **By hand**: the owner's pass of 2026-11-09 above, repeated for each release that changes a screen.
|
||||
- **Not tested yet**: NVDA, JAWS, Voice Access, touch, Windows 10, and other people's PCs. They should work through the
|
||||
same Windows interface Narrator uses, but nobody has checked. Contrast themes are checked by the tests above and have
|
||||
not yet been looked at on a screen.
|
||||
same Windows interface Narrator uses, but nobody has checked.
|
||||
|
||||
## Known limitations
|
||||
|
||||
Each one with what to do instead. A barrier that is not on this list is worth reporting.
|
||||
|
||||
- **A chart's points cannot be read one by one.** A screen reader hears the chart's name and where its numbers are:
|
||||
a session's figures and *Statistics per series* in its summary, the table under the Compare chart, the Sessions table
|
||||
and the list of changes under a trend chart, and **File ▸ Export ▸ Session CSV** or **Session JSON**.
|
||||
- **In the user guide and the other documents the app shows, headings are read as ordinary text**: Windows' document
|
||||
view gives them no heading role. Their links and their order work as on any page.
|
||||
- **The short messages at the bottom of the window close after four seconds**, and cannot be read again once closed. A
|
||||
screen reader is told each one as it appears.
|
||||
- **Charts are pictures.** Tab reaches a chart, but its keys do not work reliably yet and a screen reader cannot read
|
||||
its points or its name. The numbers are written out elsewhere: a session's figures and *Statistics per series* in its
|
||||
summary, the table under the Compare chart, the list of changes under a trend chart, and **File ▸ Export ▸ Session
|
||||
CSV** or **Session JSON**.
|
||||
- **Some names a screen reader hears are wrong.** Items in drop-down lists and several lists can be read by an
|
||||
internal name rather than the text shown; the frame-rate readout, the ray-tracing chips and the text of the notices
|
||||
above the page are not read as text; some buttons in a list all have the same name, such as *Open*.
|
||||
- **Nothing is announced when it appears** — a safety notice, a banner, a short message at the bottom of the window or
|
||||
the result of **Tools ▸ Database maintenance**. A safety notice stays above the page until you answer it.
|
||||
- **Headings are not marked as headings**, so a screen reader's heading keys do not move between the sections of a
|
||||
page.
|
||||
- **Windows contrast themes are not followed.** With Settings ▸ Theme on *System*, a contrast theme can give parts of
|
||||
the window the wrong colours. Choose **Light** or **Dark** there: both keep their contrast.
|
||||
- **The short messages at the bottom of the window close after four seconds.**
|
||||
- **Windows' text size setting** (Settings ▸ Accessibility ▸ Text size) **is not followed.** Use display scaling
|
||||
(Settings ▸ System ▸ Display ▸ Scale) or Magnifier.
|
||||
- **Page changes slide in** even when Windows' animation effects are off.
|
||||
- **Pausing capture is only in the menu of the icon by the clock.**
|
||||
- **The windows Windows itself shows** — choosing a file, the administrator prompt — are Windows', not FrameLedger's.
|
||||
|
||||
|
||||
+23
-1
@@ -35,13 +35,35 @@ numeric core and does not move; the heading is the full version — corrected 20
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Added
|
||||
|
||||
- **An accessibility statement** (owner request 2026-11-09, decision D88). `ACCESSIBILITY.md` says what FrameLedger aims
|
||||
for — WCAG 2.2 at level AA as W3C's WCAG2ICT applies it to desktop software, a goal and not a claim of conformance —
|
||||
what works with the keyboard alone, a screen reader, a contrast theme or Magnifier, how it is checked (the project's
|
||||
tests, and the owner's pass of 2026-11-09: keyboard only and Narrator on 0.1.0-beta.34 and 0.1.0-alpha.3, no fault),
|
||||
what does not work yet and what to do instead, and how a barrier is reported and handled — by severity, with no
|
||||
promised times. The app shows it under **Help ▸ Accessibility**, and after Limitations in the user guide's window; the
|
||||
wiki gets an *Accessibility* page.
|
||||
- **An *Accessibility problem* issue form** (`.github/ISSUE_TEMPLATE/accessibility.yml`) asking what was tried, what
|
||||
happened and what the reporter uses — never anything about the reporter themself — and a user-interface section in the
|
||||
pull-request template. The `accessibility` label exists, and so do `safety` and `priority-high`, which the *Safety gap*
|
||||
form had named since its first day without either existing — so GitHub had never applied them.
|
||||
|
||||
### Changed
|
||||
|
||||
- **Documents corrected**: charts do take focus and keys (`docs/08_UI.md` said neither — `ChartKeyboardTests` measures
|
||||
it); the database-maintenance result's live region announced nothing, since WPF raises one only when the app does; the
|
||||
"no Narrator pass" gap is the owner's pass now, beside what that pass could not show; the open question "Accessibility
|
||||
/ DPI: no design anywhere" is closed; NFR-9 names screen readers and contrast themes (D88–D91). `LIMITATIONS.md` gains an
|
||||
*Accessibility* section and loses its one struck sentence — a screen reader reads struck text as current, so no page
|
||||
the app shows strikes text through. The guide's menu table names its menu on every row, read one row at a time.
|
||||
|
||||
## Releases
|
||||
|
||||
Newest first. Each file holds that release's section exactly as it stood here.
|
||||
|
||||
| Version | Date | Notes |
|
||||
|---|---|---|
|
||||
| `0.1.0-beta.35` | 2026-11-09 | [`docs/changelog/0.1.0-beta.35.md`](docs/changelog/0.1.0-beta.35.md) |
|
||||
| `0.1.0-alpha.3` | 2026-11-06 | [`docs/changelog/0.1.0-alpha.3.md`](docs/changelog/0.1.0-alpha.3.md) |
|
||||
| `0.1.0-beta.34` | 2026-11-06 | [`docs/changelog/0.1.0-beta.34.md`](docs/changelog/0.1.0-beta.34.md) |
|
||||
| `0.1.0-alpha.2` | 2026-11-03 | [`docs/changelog/0.1.0-alpha.2.md`](docs/changelog/0.1.0-alpha.2.md) |
|
||||
|
||||
+4
-3
@@ -5,7 +5,7 @@ hooking on for — and reading the graphics calls the game makes. That is why it
|
||||
resolution, the upscaler, frame generation and ray tracing apart. It is also where its limits come from. This
|
||||
page lists them in plain words; each item links to the document that has the details.
|
||||
|
||||
*Beta software: this page describes version 0.1.0-beta.35.*
|
||||
*Beta software: this page describes version 0.1.0-beta.34.*
|
||||
|
||||
## Games it will not measure
|
||||
|
||||
@@ -207,9 +207,10 @@ you accept the prompt. Turn it on only if you trust everything that runs under y
|
||||
What works with the keyboard alone, a screen reader, a contrast theme or Magnifier, what does not yet, and how to report
|
||||
a barrier is on its own page: [Accessibility](ACCESSIBILITY.md) (in the app: Help ▸ Accessibility). The largest limits:
|
||||
|
||||
- **A chart's points cannot be read one by one.** A screen reader hears its name and where its numbers are written —
|
||||
the session's figures, the tables, **File ▸ Export**; its keys move it.
|
||||
- **Charts are pictures.** A screen reader cannot read their points; the numbers are in the session's figures, the
|
||||
tables and **File ▸ Export**.
|
||||
- **Windows' text size setting is not followed** — use display scaling or Magnifier.
|
||||
- **Windows contrast themes are not followed yet** — choose **Light** or **Dark** in Settings ▸ Theme.
|
||||
|
||||
## Play
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ app too (Help ▸ User guide, Help ▸ Limitations, Help ▸ Accessibility), and
|
||||
|
||||
<!-- accuracy-block:begin -->
|
||||
> ⚠ **What FrameLedger actually measures today — 2026-11-06.** The software is a beta; its latest
|
||||
> **beta is `0.1.0-beta.35`** (2026-11-09), an unsigned installer built from that tag with its
|
||||
> **beta is `0.1.0-beta.34`** (2026-11-06), an unsigned installer built from that tag with its
|
||||
> checksums published beside it (alphas — experimental builds on a prerelease .NET — are published apart). The source holds the desktop app
|
||||
> (library, store import, charts, settings) and the background Agent, which records a session when a
|
||||
> game in the library runs (unless you switched its recording off), injects only into games you enabled
|
||||
@@ -177,7 +177,7 @@ Elevation is **optional — for everything.** Hooked capture is the normal path
|
||||
|
||||
## Install
|
||||
|
||||
> **The latest beta is `v0.1.0-beta.35` (2026-11-09); before it `v0.1.0-beta.34` (2026-11-06), `v0.1.0-beta.33` (2026-11-03), `v0.1.0-beta.32` (2026-10-31), `v0.1.0-beta.31` (2026-10-26), `v0.1.0-beta.30` (2026-10-26), `v0.1.0-beta.29` (2026-10-25), `v0.1.0-beta.28` (2026-10-20), `v0.1.0-beta.27` (2026-10-20), `v0.1.0-beta.26` (2026-10-19), `v0.1.0-beta.25` (2026-10-19), `v0.1.0-beta.24` (2026-10-19), `v0.1.0-beta.23` (2026-10-14), `v0.1.0-beta.22` (2026-10-13), `v0.1.0-beta.21` (2026-10-13), `v0.1.0-beta.20` (2026-10-12), `v0.1.0-beta.19` (2026-10-12), `v0.1.0-beta.18` (2026-10-07), `v0.1.0-beta.17` (2026-10-07), `v0.1.0-beta.16` (2026-10-06), `v0.1.0-beta.15` (2026-10-06), `v0.1.0-beta.14` (2026-10-06), `v0.1.0-beta.13` (2026-10-04), `v0.1.0-beta.12` (2026-10-04), `v0.1.0-beta.11` (2026-10-03), `v0.1.0-beta.10` (2026-09-28), `v0.1.0-beta.9` (2026-09-26), `v0.1.0-beta.8` (2026-09-25), `v0.1.0-beta.7` (2026-09-23), `v0.1.0-beta.6` (2026-09-23), `v0.1.0-beta.5` (2026-09-22), `v0.1.0-beta.4` (2026-09-21), `v0.1.0-beta.3` (2026-09-21), `v0.1.0-beta.2` (2026-09-17) and `v0.1.0-beta.1` (2026-09-16).** They are pre-releases: read the notes of the one you install — `CHANGELOG.md` links each release's own file under `docs/changelog/` — for what it measures, what it does not yet, and how to update, before installing. A source build is `docs/12_BUILD.md`.
|
||||
> **The latest beta is `v0.1.0-beta.34` (2026-11-06); before it `v0.1.0-beta.33` (2026-11-03), `v0.1.0-beta.32` (2026-10-31), `v0.1.0-beta.31` (2026-10-26), `v0.1.0-beta.30` (2026-10-26), `v0.1.0-beta.29` (2026-10-25), `v0.1.0-beta.28` (2026-10-20), `v0.1.0-beta.27` (2026-10-20), `v0.1.0-beta.26` (2026-10-19), `v0.1.0-beta.25` (2026-10-19), `v0.1.0-beta.24` (2026-10-19), `v0.1.0-beta.23` (2026-10-14), `v0.1.0-beta.22` (2026-10-13), `v0.1.0-beta.21` (2026-10-13), `v0.1.0-beta.20` (2026-10-12), `v0.1.0-beta.19` (2026-10-12), `v0.1.0-beta.18` (2026-10-07), `v0.1.0-beta.17` (2026-10-07), `v0.1.0-beta.16` (2026-10-06), `v0.1.0-beta.15` (2026-10-06), `v0.1.0-beta.14` (2026-10-06), `v0.1.0-beta.13` (2026-10-04), `v0.1.0-beta.12` (2026-10-04), `v0.1.0-beta.11` (2026-10-03), `v0.1.0-beta.10` (2026-09-28), `v0.1.0-beta.9` (2026-09-26), `v0.1.0-beta.8` (2026-09-25), `v0.1.0-beta.7` (2026-09-23), `v0.1.0-beta.6` (2026-09-23), `v0.1.0-beta.5` (2026-09-22), `v0.1.0-beta.4` (2026-09-21), `v0.1.0-beta.3` (2026-09-21), `v0.1.0-beta.2` (2026-09-17) and `v0.1.0-beta.1` (2026-09-16).** They are pre-releases: read the notes of the one you install — `CHANGELOG.md` links each release's own file under `docs/changelog/` — for what it measures, what it does not yet, and how to update, before installing. A source build is `docs/12_BUILD.md`.
|
||||
|
||||
1. Download the latest `FrameLedger.App-win-Setup.exe` from [Releases](https://github.com/poli0981/frameledger/releases). It installs into `%LOCALAPPDATA%\FrameLedger.App`; your data stays in `%LOCALAPPDATA%\FrameLedger`, and uninstalling asks before touching it.
|
||||
2. SmartScreen may warn — releases are not code-signed (free, open-source project). Verify the SHA-256 checksum published with each release, then **More info → Run anyway**.
|
||||
|
||||
+13
-115
@@ -3,7 +3,7 @@
|
||||
WPF + **WPF UI (Wpf.Ui, Fluent)**. Shell = `ui:FluentWindow` with custom `ui:TitleBar`, a thin classic **Menu bar** (file-level operations), and a left **`ui:NavigationView`** (`PaneDisplayMode="LeftFluent"`) as primary navigation *(since beta.34, D86, its items use
|
||||
our copy of WPF UI 4.3.0's LeftFluent item template — `FlLeftFluentNavigationViewItemTemplate` in `Styles/FrameLedger.xaml` —
|
||||
whose only change is that the selected page keeps its label; WPF UI's animates it away, and the owner's screenshot of
|
||||
Compare showed the icon alone)*. Light/Dark/System themes via `ApplicationThemeManager` + `SystemThemeWatcher`; Mica backdrop on Windows 11 with automatic solid fallback on Windows 10. *(beta.35, D91: a Windows contrast theme wins over all three while it is on — §Contrast.)* All XAML follows `16_WPFUI_SYNTAX.md` — that doc is mandatory reading before writing views.
|
||||
Compare showed the icon alone)*. Light/Dark/System themes via `ApplicationThemeManager` + `SystemThemeWatcher`; Mica backdrop on Windows 11 with automatic solid fallback on Windows 10. All XAML follows `16_WPFUI_SYNTAX.md` — that doc is mandatory reading before writing views.
|
||||
|
||||
## Shell
|
||||
|
||||
@@ -149,11 +149,7 @@ The Menu sits in its own row **below** the TitleBar (never inside the drag regio
|
||||
|
||||
## Notifications policy
|
||||
|
||||
- **In-app, transient** (rules updated, export done, non-fatal capture warning): `ISnackbarService` snackbar, 4 s — shown
|
||||
only through `IMessageStrip` (`Services/SnackbarStrip`) since beta.35, which says it to a screen reader as it shows it
|
||||
(D89; `AnnouncementsTests.OnlyTheStripShowsASnackbarAndNoXamlSetsALiveSetting`).
|
||||
- **Every one of these is said to a screen reader as it appears (beta.35, owner decision D89)** — §Accessibility, Screen
|
||||
readers.
|
||||
- **In-app, transient** (rules updated, export done, non-fatal capture warning): `ISnackbarService` snackbar, 4 s.
|
||||
- **In-app, persistent** (Agent offline, ~~PawnIO missing,~~ update downloaded, a viewer's folder, the safety notices, *an alpha build* — since 2026-10-31, D74): `ui:InfoBar` banner pinned above content with action button. *(Corrected 2026-10-07: no PawnIO banner was ever built — CPU temperature reads N/A, and Settings ▸ System says it needs the admin mode and PawnIO; the viewer's banner (D52) and the safety notices were missing from the list.)*
|
||||
- **System-level, app possibly minimized** (session saved with "View" action, capture error while in tray, update available): tray balloon/toast via H.NotifyIcon.
|
||||
- One event → exactly one channel; never duplicate the same event across snackbar *and* tray.
|
||||
@@ -883,7 +879,7 @@ Tail view of `ui-*.log` / `agent-*.log` (toggle), level filter, search (`ui:Auto
|
||||
> (`Settings_RemoveUninstalled_Applied`), not at the next session — the detection sweep reads it at every pass. Tests:
|
||||
> `ViewerModeTests.EverySettingTheAgentReadsIsOffInAViewer`, `GuideDocumentsTests.TheSettingsPageOfTheGuideNamesEverySetting`.
|
||||
|
||||
Sections per FR-10 using the WPF UI settings idiom: `ui:CardControl`/`ui:CardExpander` rows with `ToggleSwitch`, `ComboBox`, `ui:NumberBox` (numeric inputs — min session length, sensor interval, retention). Language switch applies immediately (09_I18N). Theme selector (Light/Dark/System) drives `ApplicationThemeManager` (16 §Theming) *(beta.35, D91: a Windows contrast theme wins while it is on, §Contrast, and a line under the selector says so, bound to `ContrastTheme.IsOn` so it comes and goes with the page shown)*. **Capture section (top, most important):** the global **hooking kill switch** (`ToggleSwitch`, prominent) with a one-line summary of what it does; a list of games currently hook-enabled with a per-game revoke; Vulkan layer registration state + Register/Unregister; a link to the safety documentation. Turning the global switch off must take effect immediately, including for the Vulkan layer.
|
||||
Sections per FR-10 using the WPF UI settings idiom: `ui:CardControl`/`ui:CardExpander` rows with `ToggleSwitch`, `ComboBox`, `ui:NumberBox` (numeric inputs — min session length, sensor interval, retention). Language switch applies immediately (09_I18N). Theme selector (Light/Dark/System) drives `ApplicationThemeManager` (16 §Theming). **Capture section (top, most important):** the global **hooking kill switch** (`ToggleSwitch`, prominent) with a one-line summary of what it does; a list of games currently hook-enabled with a per-game revoke; Vulkan layer registration state + Register/Unregister; a link to the safety documentation. Turning the global switch off must take effect immediately, including for the Vulkan layer.
|
||||
|
||||
**System (2026-09-21, FR "show the user's hardware"):** a card above Legal stating this PC as a session's hardware snapshot would record it right now — processor, graphics card, graphics driver, memory, Windows build, primary display — through the same `IHardwareSnapshotSource` the Agent stamps sessions with, read on the thread pool when the page opens, a field that could not be read as N/A, with **Copy** (the same lines as text) and a note that nothing is sent anywhere and what CPU temperature needs. Its own `SystemInfoViewModel`, not `SettingsViewModel`'s. The same snapshot is one tertiary line under the session summary's header (it was loaded for the export and shown nowhere), and `--diag` prints it; the bug bundle's `sysinfo.json` is deliberately NOT given it — its keys are the issue link's prefill.
|
||||
|
||||
@@ -1007,9 +1003,8 @@ Agent section: elevation state with a plain explanation of what elevation *optio
|
||||
(`ScrollViewer.CanContentScroll="False"` on the `Page` — `16_WPFUI_SYNTAX` §Gotchas: until beta.14 the wheel scrolled
|
||||
nothing on five pages, and the Logs tail did not follow the newest line); a scroller nested in a dialog hands the wheel
|
||||
on at its ends (`ui:PassiveScrollViewer`); over a chart a plain wheel scrolls the page and **Ctrl+wheel zooms the chart**
|
||||
(`Charts/ChartWheel`, every plot through `ChartTheme.Attach`) — drag still pans and ~~double-click still resets, as
|
||||
ScottPlot does~~ *(corrected 2026-11-09: ScottPlot's left double-click toggled its render-time benchmark overlay; since
|
||||
beta.35 a double-click shows all of the chart, `ChartTheme.ResetOnDoubleClick`, `ChartKeyboardTests`)*. The import checklist scrolls inside its list and nowhere else, so its intro and its count stay put.
|
||||
(`Charts/ChartWheel`, every plot through `ChartTheme.Attach`) — drag still pans and double-click still resets, as
|
||||
ScottPlot does. The import checklist scrolls inside its list and nowhere else, so its intro and its count stay put.
|
||||
|
||||
## Accessibility
|
||||
|
||||
@@ -1030,26 +1025,14 @@ the requirement was one bullet under §UX rules, and nothing checked it.
|
||||
|
||||
| Keys | Does | Where |
|
||||
|---|---|---|
|
||||
| **Ctrl+1 … Ctrl+5** (and the numeric keypad's 1–5) | Dashboard · Games · Compare · Logs · Settings — and since beta.35 the page's first control takes the focus once it is shown, its title (the page's first-level heading) said to a screen reader; before, the focus stayed where it was, often on the page that had just gone | `MainWindow` `InputBindings` → `MainWindowViewModel.NavigateToCommand` → `ShellShortcuts`, then `Services/PageFocus` (the shell tells it each page shown, from `NavigationView.Navigated`) |
|
||||
| **Ctrl+1 … Ctrl+5** (and the numeric keypad's 1–5) | Dashboard · Games · Compare · Logs · Settings | `MainWindow` `InputBindings` → `MainWindowViewModel.NavigateToCommand` → `ShellShortcuts` |
|
||||
| **Alt**, **F10** | Focuses the menu bar; arrows and Enter walk File / Tools / Help | WPF `Menu`, nothing custom |
|
||||
| **Alt** + a menu's access key | Opens that menu — `_File` `_Tools` `_Help`; `_Tệp` `_Công cụ` `Trợ _giúp`; `ファイル(_F)` `ツール(_T)` `ヘルプ(_H)` *(row added 2026-11-09: the keys existed since P3 and this table did not name them)* | the `Menu_*` strings' `_` |
|
||||
| **Tab / Shift+Tab** | Moves through a page in reading order | layout order; no `TabIndex` overrides |
|
||||
| **Arrows, Home/End, Page Up/Down** | Move within a `DataGrid` (Sessions, Compare picker, Import checklist) | `DataGrid` defaults |
|
||||
| On a focused chart: **arrows**, **Ctrl**+arrow, **A** *(beta.35, D90)* | Pan, zoom, show all — ScottPlot's keys; the key is then the chart's, so the page neither scrolls nor moves the focus on (Tab still leaves) | `Charts/ChartPlot`, `Charts/ChartKeys` |
|
||||
| **Esc** | Closes the open `ContentDialog` or `MessageBox` with no result — the same as its Close/Cancel button | `DialogKeyboard`, one class handler per dialog type registered at start-up |
|
||||
| **Enter** | In the consent dialog's phrase box: enables hooking once the phrase is typed exactly, does nothing before (beta.30, D69); elsewhere in a `ContentDialog`, the default button | WPF's default button (`ConsentPrompt`: `DefaultButton = Primary`) and `ConsentDialogContent.SwallowsEnter` |
|
||||
|
||||
**Focus after a dialog, and motion (beta.35).** A `ContentDialog` gives the focus back to the control that opened it: WPF
|
||||
UI 4.3.0's `ContentDialogHostController` stores `Keyboard.FocusedElement` when the dialog opens and focuses it again, at
|
||||
`DispatcherPriority.Input`, when it closes — the App adds nothing, and
|
||||
`FocusAndMotionTests.AContentDialogGivesTheFocusBackToTheControlThatOpenedIt` holds it (a first measurement said
|
||||
otherwise; it ran on a thread with no dispatcher context, where the dialog's own `finally` never resumed). A WPF UI
|
||||
`MessageBox` sets no owner — null before and after it is shown — so `Services/MessageBoxes` gives it the App's active
|
||||
window: it opens over it and hands the focus back to it, not to another program; every box goes through it
|
||||
(`EveryMessageBoxGoesThroughMessageBoxes`). A page slides in only while Windows' animation effects are on
|
||||
(`SystemParameters.ClientAreaAnimation`, followed as it changes): `Services/PageMotion` sets the `NavigationView`'s
|
||||
`Transition` to `None` while they are off, where WPF UI 4.3.0 played `FadeInWithSlide` whatever they were.
|
||||
|
||||
**Esc is the Close button, never the primary one.** On the consent dialog (FR-2.1) that is ~~"Keep it off"~~ "Keep hooking
|
||||
off" *(the button's text, corrected 2026-10-07)*: nothing is
|
||||
stamped. A dialog that offers no Close button is not dismissed by Esc, and the Legal Gate (FR-11) is a window of its own
|
||||
@@ -1071,54 +1054,11 @@ handled key — so whether Esc alone would close a dialog through `IsCancel` is
|
||||
— corrected 2026-10-04): every `Button`, `ToggleButton`, `ToggleSwitch`, `CheckBox`, `RadioButton`, `ComboBox`,
|
||||
`TextBox`, `NumberBox`, `PasswordBox`, `Slider` and `HyperlinkButton` in the App's XAML either has content or a name. A new
|
||||
unnamed one is red.
|
||||
- **What a screen reader is given, swept on every surface (beta.35, D88).** `PagesLoadTests.Automation` hosts every page,
|
||||
window, dialog and control as the App hosts it, every tab shown in turn, and reads the UI Automation tree WPF builds — the
|
||||
tree Narrator reads: **no Tab stop without an automation peer** (a plain `Control`, WPF UI's `Image`, `Card` and
|
||||
`CardControl` take the focus with no peer or an empty name), **no item named by its type** (WPF names a list's, a
|
||||
drop-down's and a grid row's item by `ToString()`, and a template column's cell, which has no text of its own, by
|
||||
`Item: <row>, Column Display Index: n`), **every focusable control named**, **no shown text hidden in a template** (a
|
||||
`TextBlock` whose templated parent is not a `ContentPresenter` is no control element), and **no two buttons in a list
|
||||
sharing a name**. All five went red on `main` first — the type-named items filled 190 lines over the surfaces and their
|
||||
tabs, the silent stops 37, and the safety InfoBar's title and message were hidden — and the fixes are: every item type speaks (`ToString()` through `Services/SpokenText`: `Choice` its
|
||||
label, a notice its title and text, a document page its title, a session row its date, length and tier…); the display-only
|
||||
controls (`FpsReadout`, `TriStateChip`, `ChangeBadge`) have a `Controls/SpokenTextAutomationPeer` — a Text element named
|
||||
by their words, no children — and leave the tab order; a template column names its cells through
|
||||
`Controls/CellName` (a cell style based on WPF UI's `DefaultDataGridCellStyle`, an empty cell read as *empty*); a row's
|
||||
button names its row (*Open: …*, *Play: …*, *Turn off: …*); the App's InfoBar template draws its title and message through
|
||||
`ContentPresenter`s; implicit styles take a plain `ItemsControl`, WPF UI's `Image` and `CardControl` out of the tab order;
|
||||
a `CardExpander`'s expand button is named after its header (`Controls/ExpanderToggleName` — WPF UI 4.3.0 leaves it
|
||||
unnamed). **The FPS readout says rule 6 aloud**: *Native 62 FPS, displayed 118 FPS, frame generation ×1.9*, a steady factor
|
||||
with its share, a stand-alone number with its qualifier (`FpsPresentation.Spoken`). `ScreenReaderNamesTests` holds each
|
||||
piece.
|
||||
- **Headings (beta.35, owner decision D90).** A page's title (`FontTypography="Title"`) is
|
||||
`AutomationProperties.HeadingLevel="Level1"`, a section title (`Subtitle`) `Level2`; a `Subtitle` that shows a value — the
|
||||
Dashboard's three figures, a stat card's value, the FPS readout's line — says `None` on purpose.
|
||||
`AccessibilityTests.EveryTitleAndSubtitleDeclaresAHeadingLevel` (every Title and Subtitle declares one),
|
||||
`PagesLoadTests.EveryPageHasOneFirstLevelHeadingItsTitle`. A rendered document's headings (the guide, LIMITATIONS, this
|
||||
statement, the legal texts) cannot be: a `FlowDocument` `Paragraph` has no automation peer, so it has no heading level to
|
||||
give — stated in `ACCESSIBILITY.md` §Known limitations.
|
||||
- **Charts (beta.35, D90).** Every plot is a `Charts/ChartPlot` — ScottPlot's `WpfPlot` with a peer: an Image whose
|
||||
localized type is *chart*, named by its `AutomationProperties.Name` (`A11y_Chart_*`), its help text where its numbers are
|
||||
as text (`A11y_ChartData_*`) and its keys (`A11y_Chart_Keys`); no children. Its focus is drawn with WPF UI's
|
||||
`DefaultControlFocusVisualStyle`. **No two series of a chart differ by colour alone** (`Charts/ChartPatterns`: lines
|
||||
cycle solid / dashed / dotted / densely dashed, then take markers; point series cycle circle / triangle / square /
|
||||
diamond; the power and thermal limit spans are striped and dotted) — `PagesLoadTests.NoChartTellsTwoSeriesApartByColourAlone`
|
||||
reads every chart's legend on every surface and the Compare chart with five sessions.
|
||||
- **What appears is said as it appears (beta.35, owner decision D89).** `Services/IAnnouncer`, over UI Automation's
|
||||
notification event in `Services/UiaAnnouncer` — the one place the App raises it, on its **active** window only (a game
|
||||
that has the screen is never interrupted; the tray's Windows notifications cover a hidden window) and only when a
|
||||
screen reader listens (`AutomationPeer.ListenerExists`). An **Alert** (`ImportantAll`, every one read): a safety notice as
|
||||
it arrives (`SafetyNotices`), a warning in the strip, the capture agent going offline, a game page's refusal or warning.
|
||||
A **Status** (`MostRecent` per activity, a newer one replacing one not yet read): the strip's info and success, the agent
|
||||
back (`A11y_Agent_Connected`), an update's step (`Services/ShellAnnouncements` says a *change* only — the first state is
|
||||
read with the window, a download's percent ticks are one step, a rebuilt window re-reads the same state silently), a
|
||||
game page's success, every Database maintenance result line. The words are the window's, in its language.
|
||||
`AnnouncementsTests`, `DatabaseMaintenanceViewModelTests.AResultIsSaidToAScreenReaderAsItAppears`.
|
||||
- ~~Status lines that change after an action (the Database maintenance result) are `AutomationProperties.LiveSetting="Polite"`.~~
|
||||
- Status lines that change after an action (the Database maintenance result) are `AutomationProperties.LiveSetting="Polite"`.
|
||||
*(Corrected 2026-11-09: this announces nothing. WPF raises `LiveRegionChanged` only when the app raises it — "you
|
||||
explicitly raise an event", Microsoft's* What's new in accessibility *for 4.7.1 — and `TextBlockAutomationPeer` raises
|
||||
none (dotnet/wpf); the App raised no automation event anywhere. The setting marks the line as a live region and no
|
||||
more. It came out the same day, for the announcement above; no XAML may set one.)*
|
||||
more.)*
|
||||
|
||||
### Contrast
|
||||
|
||||
@@ -1201,45 +1141,6 @@ theme's background, as it was before; the badge and the list carry its informati
|
||||
> under it, in both themes. `EveryTextFollowsAThemeSwitch` hosts its pages in the presenter too since, and went red with
|
||||
> them: a page made after a switch stayed black. All three went red on the unfixed XAML before they went green.
|
||||
|
||||
> **Windows contrast themes, followed (beta.35, owner decision D91).** WPF UI 4.3.0 cannot be asked to do it:
|
||||
> `ApplicationTheme.HighContrast` names no dictionary; its four high-contrast files (HC1 Dusk, HC2 Night sky, HCBlack
|
||||
> Aquatic, HCWhite Desert) each hold 84 red `#FFFF0000` placeholders among 97 colours and 17 brushes that throw when the
|
||||
> file is read alone; their colours are Windows 11's defaults, not the user's; and they put the window text on the accent.
|
||||
> So while `SystemParameters.HighContrast` is on, `Services/WpfThemeApplier` applies the light or the dark Fluent theme as
|
||||
> the contrast theme is (by its window colour), with no Mica and no `SystemThemeWatcher`, and `Services/ContrastOverlay`
|
||||
> over it: every key of those four files in the user's colour for its role (`Services/ContrastRoles` — a key's role is the
|
||||
> colour it has in all four, opaque colours only, because inside the App a brush that throws alone falls back to the
|
||||
> Fluent theme's translucent fill: `MenuBarItemBackgroundPressed` read as the white of the window text, and a pressed menu
|
||||
> item was white on white; ties and placeholders by the key's name), the keys transparent there transparent, three
|
||||
> Fluent-only keys by role, the 21 accent keys WPF UI writes into the application's resources as the highlight, and the
|
||||
> text on the accent as the highlight's text. The colours are `SystemColors` (`ContrastPalette.FromSystem`) — the user's
|
||||
> own, edited or not, Windows 10's as well — and turning a theme on, editing it or turning it off is followed at once
|
||||
> (`SystemContrastSource`). What the App draws itself reads `ContrastTheme.Active`: the charts (`ChartPalette.ForContrast`,
|
||||
> the theme's colours only, the series told apart by `ChartPatterns`), a badge's text (`ChartTheme.TextOn`, the theme's
|
||||
> colour that reads best on the fill), the mix bar, the artwork band (no tint), the Import list (no dimmed rows), the
|
||||
> unsigned-update footer (the secondary text style, not an opacity). WPF UI's Danger button paints a fixed `#F44336` in its
|
||||
> style, out of any resource's reach, so every `ui:Button` takes the App's implicit style (`Styles/FrameLedger.xaml`): a
|
||||
> Danger button is the theme's own button while one is on, the message boxes' Delete included. Held by `ContrastThemeTests` — the four files still placeholders; every key a role or
|
||||
> transparent, none red; the roles the same over either Fluent theme; with each default theme's own colours the overlay
|
||||
> is WPF UI's colours key for key, the text on the accent apart; an edited theme's colours reach every key; every Fluent
|
||||
> colour key covered; every resource the App reads resolves; `ThemePlan`; the applier on and off at once — and
|
||||
> `PagesLoadTests.EveryTextIsInTheContrastThemesColoursAndReadable`: every surface rendered under the four default themes
|
||||
> and two edited ones, every text the theme's colour on the theme's colour at 4.5:1 or better. It went red first on the
|
||||
> chips (window text on the highlight, 1.26–1.78:1), the Remove button (3.06–4.42:1 on `#F44336`) and the badges' black.
|
||||
|
||||
> **A sixth hole, closed 2026-11-09 (beta.35), found by measuring what no sweep renders.** The title bar and the snackbars
|
||||
> are no surface, and the 3:1 sweep let 3.68:1 pass. The capture agent's pill was a `ui:Badge` whose appearance was
|
||||
> BOUND — Success, Info, Caution, Danger, WPF UI's `Palette*Brush` under `BadgeForeground` — so `ContrastTests`, which reads
|
||||
> literal attributes, never saw it: in the light theme 2.78, 2.63, 2.16 and 3.68:1. It is `AgentPill` now (a `Pill` on
|
||||
> `SystemFillColor{Success,Caution,Critical}BackgroundBrush`, the theme's text), and a bound badge appearance is refused.
|
||||
> WPF UI's Success and Caution snackbars are fixed colours under white in both themes, 2.78:1 and 2.16:1: the strip shows
|
||||
> every message as Secondary, the theme's, 13.97:1 and 16.53:1, its icon saying the kind. And a Danger button's text was
|
||||
> the theme's button text on `#F44336` — white in the dark theme, 3.68:1: the App's implicit button style puts
|
||||
> `TextFillColorDarkPrimaryBrush` there, 5.3:1 and 5.7:1. `ContrastThemeTests.TheTitleBarsMarksReadInEveryState`,
|
||||
> `ADangerButtonReadsInBothThemesAndIsTheThemesOwnButtonUnderAContrastTheme`,
|
||||
> `NoButtonOrBadgeTakesAnAppearanceThatPaintsAFixedColour` and
|
||||
> `AnnouncementsTests.EveryMessageOfTheStripIsDrawnInTheThemesOwnColours` hold the three.
|
||||
|
||||
### DPI
|
||||
|
||||
`app.manifest` declares Per-Monitor V2 (`AccessibilityTests.TheManifestIsPerMonitorV2`). A chart reads the pointer
|
||||
@@ -1250,22 +1151,19 @@ ScottPlot reads once when the control is made, before it has a window.
|
||||
|
||||
- ~~ScottPlot plots are not keyboard-operable (no focus, no pan/zoom by keys).~~ *(Corrected 2026-11-09, measured by
|
||||
`ChartKeyboardTests` in a window off the screen: a plot takes focus — ScottPlot's control is focusable and a Tab stop —
|
||||
and the keys ScottPlot reads reach it: the arrows pan, Ctrl with an arrow zooms, A shows all of it. ~~What it is not is
|
||||
and the keys ScottPlot reads reach it: the arrows pan, Ctrl with an arrow zooms, A shows all of it. What it is not is
|
||||
usable: it has no automation peer, so Narrator says nothing on reaching it, and it marks no key handled, so the page
|
||||
around it acts on the same arrow too.~~ Since beta.35 it has a peer and keeps its keys, §Screen readers.)* A chart's
|
||||
points are still not read one by one. The numbers behind them are on the
|
||||
around it acts on the same arrow too.)* The numbers behind them are on the
|
||||
session summary's stat cards and in File ▸ Export (CSV/JSON); the hardware-change markers' text is WPF text in the
|
||||
list under each trend chart (beta.30).
|
||||
- ~~No screen-reader pass with Narrator has been done; the names above are necessary, not proven sufficient. That pass
|
||||
is the owner's.~~ **The owner's pass, 2026-11-09: keyboard only with the mouse disconnected, and Narrator, on
|
||||
0.1.0-beta.34 and 0.1.0-alpha.3 — every page, menu, dialog and setting reached and used, no fault.**
|
||||
- **What that pass could not show**, found the same day by measuring the UI Automation tree WPF builds (in memory, on
|
||||
.NET 10.0.14 — not by listening): ~~a drop-down's items are named by a record's printed form (`Choice { Value = dark,
|
||||
.NET 10.0.14 — not by listening): a drop-down's items are named by a record's printed form (`Choice { Value = dark,
|
||||
Label = Dark }`) and plain lists' items by their type; a control with no automation peer that still takes focus — a
|
||||
chart, the FPS readout, the RT/PT/RR chips, the game's artwork — is a Tab stop Narrator says nothing about; text inside
|
||||
a control template (the safety notices' title and message, the readout, the chips) is hidden from the control view;
|
||||
nothing is announced; no text is a heading; several charts tell series apart by colour alone~~ *(closed the same day,
|
||||
§Screen readers above)*; ~~page transitions play with Windows' animation effects off~~ *(not since beta.35,
|
||||
§Keyboard)*; ~~Windows contrast themes are not
|
||||
followed~~ *(followed since beta.35, D91 — §Contrast)*. `ACCESSIBILITY.md` §Known limitations
|
||||
nothing is announced; no text is a heading; several charts tell series apart by colour alone; page transitions play
|
||||
with Windows' animation effects off; Windows contrast themes are not followed. `ACCESSIBILITY.md` §Known limitations
|
||||
states each to users with what to do instead.
|
||||
+1
-54
@@ -62,7 +62,6 @@ private static readonly IHost _host = Host.CreateDefaultBuilder()
|
||||
Theme rules:
|
||||
- Manual Light/Dark: `ApplicationThemeManager.Apply(ApplicationTheme.Dark)`.
|
||||
- System: `SystemThemeWatcher.Watch(mainWindow)` — call it in the window's `Loaded` handler (needs an HWND), and unwatch when switching to manual.
|
||||
- A Windows contrast theme (beta.35, D91): wins over all three while it is on, and is never left to the watcher, which would apply WPF UI's own high-contrast files (§Gotchas). `Services/ThemePlan.For` is the table, `Services/WpfThemeApplier` applies it.
|
||||
- Persist the choice in `settings`; re-apply before the main window shows to avoid a flash. **Measured 2026-09-13: this is a correctness rule, not a cosmetic one** — `ApplicationThemeManager.Apply(theme, backdrop, updateAccent: true)` is what registers the `SystemAccentColor*` resources the control templates `StaticResource` at first Measure; a `FluentWindow` shown before any `Apply` throws `XamlParseException: Cannot find resource named 'SystemAccentColorPrimary'`. The shell applies the theme in its constructor before `InitializeComponent()` and again from `Loaded` for the watcher.
|
||||
- Subscribe `ApplicationThemeManager.Changed` once, centrally, to re-theme ScottPlot (below).
|
||||
|
||||
@@ -173,22 +172,6 @@ Native `Menu`, `TabControl`, `ComboBox`, `Slider`~~, `ListView`~~ are fine — t
|
||||
WCAG contrast, black in both themes. The chart reads `ChartTheme.Current` at every render; the WPF chip in the list
|
||||
(`Controls/ChangeBadge`) follows a switch through the same resource reference as `ArtTint` and `FgMixBar`
|
||||
(`ChartPalette.ForBackground`). No colour in XAML.
|
||||
- Third exception (beta.35, D91): **a Windows contrast theme's colours**, read from `SystemColors` in one place
|
||||
(`Services/ContrastPalette.FromSystem`) and laid over the theme by `Services/ContrastOverlay` — never written in XAML. A
|
||||
colour the App works out itself reads `Services.ContrastTheme.Active` first (the charts, the badges, the artwork band);
|
||||
XAML that must change with it binds `{Binding Path=(services:ContrastTheme.IsOn)}`, a static property WPF hears through
|
||||
its `StaticPropertyChanged` event.
|
||||
- **`ui:Button Appearance="Danger"` / `Info` / `Success` / `Caution` / `Dark` / `Light` paint fixed colours** — values in
|
||||
WPF UI 4.3.0's button style (`#F44336` for Danger), not resources, so no theme and no contrast theme reaches them, under
|
||||
the theme's button text (white on the red in the dark theme, 3.68:1). Danger is the one the App uses: its implicit
|
||||
`ui:Button` style (`Styles/FrameLedger.xaml`) puts the theme's dark text on the red, and the theme's own button under a
|
||||
contrast theme — message boxes' buttons included. The other five are refused
|
||||
(`ContrastThemeTests.NoButtonOrBadgeTakesAnAppearanceThatPaintsAFixedColour`).
|
||||
- **A snackbar's appearances are fixed colours too** (`ISnackbarService.Show`): Success, Caution, Info, Danger, Primary,
|
||||
Dark and Light are values under white or black text — Success 2.78:1, Caution 2.16:1 in both themes. Only Secondary is
|
||||
the theme's: `Services/SnackbarStrip`, the one place a snackbar is shown, uses it for every message.
|
||||
- **A `ui:Badge` with a BOUND palette appearance** is the same hole as a literal one, and no XAML scan of literals sees it
|
||||
(the agent's pill, beta.35: `AgentPill` now). A bound badge appearance is refused by the same test.
|
||||
|
||||
## FlowDocument (rendered documents, beta.12)
|
||||
|
||||
@@ -232,12 +215,7 @@ var result = await box.ShowDialogAsync(); // Wpf.Ui.Controls.MessageBoxResult.Pr
|
||||
|
||||
⚠ Name clash with `System.Windows.MessageBox` — in App code, `using MessageBox = Wpf.Ui.Controls.MessageBox;` ~~and ban the System one (BannedSymbols/analyzer note)~~ *(corrected 2026-10-04: nothing bans it. Three paths use the Win32 box on purpose — the crash dialog, the startup-failure dialog and the uninstall question — because they run when the shell's dialog host cannot be trusted. Use the WPF UI one everywhere else.)*
|
||||
- Rich in-flow dialogs: `IContentDialogService` (host wired in MainWindow — a `ui:ContentDialogHost`, since 4.3.0 marks `SetDialogHost(ContentPresenter)` obsolete).
|
||||
- Transient in-app: ~~`ISnackbarService.Show(title, message, ControlAppearance.Success, new SymbolIcon(SymbolRegular.Checkmark24), TimeSpan.FromSeconds(4))`~~
|
||||
`IMessageStrip` (`Info` / `Success` / `Warn`) — `Services/SnackbarStrip` is the one caller of `ISnackbarService.Show`, and
|
||||
says each message to a screen reader (beta.35, D89). A view model never holds `ISnackbarService`.
|
||||
- A change a screen reader must hear goes through `IAnnouncer` (`Services/UiaAnnouncer`, UI Automation's notification
|
||||
event). **`AutomationProperties.LiveSetting` alone says nothing in WPF**: the app must raise `LiveRegionChanged` itself,
|
||||
and no XAML of the App's sets one (beta.35).
|
||||
- Transient in-app: `ISnackbarService.Show(title, message, ControlAppearance.Success, new SymbolIcon(SymbolRegular.Checkmark24), TimeSpan.FromSeconds(4))`.
|
||||
- System/tray notifications: H.NotifyIcon only (08_UI §Notifications policy).
|
||||
|
||||
## ScottPlot theme sync
|
||||
@@ -254,15 +232,6 @@ On startup and on `ApplicationThemeManager.Changed`: for every live plot set fig
|
||||
> `Add.HorizontalSpan` for the ribbon, `Add.Bars` over `Statistics.Histogram.WithBinCount`, `Add.ScatterLine`
|
||||
> for the percentile curve, a series' `Axes.YAxis = plot.Axes.Right` for the sensor overlay.
|
||||
>
|
||||
> **Accessible charts, beta.35 (D90).** Every plot in XAML is `charts:ChartPlot` (a `WpfPlot` subclass; ScottPlot's
|
||||
> default style and input stay) with `AutomationProperties.Name` and `HelpText` from `A11y_Chart_*` / `A11y_ChartData_*`.
|
||||
> `ChartTheme.Attach` adds `Charts/ChartKeys` (arrows and A marked handled after ScottPlot's class handler has acted — an
|
||||
> instance handler runs after it) and `ResetOnDoubleClick` (`DoubleLeftClickBenchmark(false)` and a `DoubleClickResponse` on
|
||||
> the left button that autoscales). A series takes `ChartPatterns.Line` / `Points` / `Hatch` by its index — a new series
|
||||
> without one is red in `NoChartTellsTwoSeriesApartByColourAlone`. Under a Windows contrast theme `ChartTheme.Current` is
|
||||
> `ChartPalette.ForContrast(ContrastTheme.Active)` — the theme's window under every plot, its text, link, highlight,
|
||||
> button text and disabled text for the rest — and the patterns carry the series apart (D91).
|
||||
>
|
||||
> **The trend's change markers, beta.30 (D70):** `Charts/ChangeMarkerPlottable`, an `IPlottable` + `IRenderLast` added
|
||||
> with `Add.Plottable` (which assigns no axes: the chart sets `Axes.XAxis`/`YAxis` itself), draws the dashed lines in
|
||||
> `Render` — clipped to the data area — and the numbered badges in `RenderLast`, after the panels and unclipped, in a
|
||||
@@ -283,13 +252,6 @@ On startup and on `ApplicationThemeManager.Changed`: for every live plot set fig
|
||||
- [ ] **`WpfPlot.DisplayScale` is read once, in the constructor**, from `VisualTreeHelper.GetDpi` before the control has
|
||||
a window. Read a pointer with `GetPlotPixelPosition(e)` (the element's DPI now); ScottPlot's pixels are device
|
||||
pixels while no `Plot.ScaleFactor` is set, and none is.
|
||||
- [ ] **WPF UI 4.3.0's high-contrast theme cannot be applied as it is** (beta.35, D91). `ApplicationTheme.HighContrast` has
|
||||
no dictionary (the watcher picks HC1/HC2/HCBlack/HCWhite by Windows' theme name); each of those holds 84 `#FFFF0000`
|
||||
placeholders among 97 colours and 17 brushes (`SystemFillColor*Brush`, `MenuBar*`) that throw when the file is read
|
||||
alone — inside the App their forward references fall back to the application's resources and read as the Fluent
|
||||
theme's fills; their colours are Windows 11's defaults, not the user's; their text on the accent is the window text.
|
||||
Never let `SystemThemeWatcher` watch while a contrast theme is on: it would apply them. The App reads them for each
|
||||
key's role only (§Theming & brushes; `08_UI` §Contrast).
|
||||
- [ ] `SystemThemeWatcher.Watch` after HWND exists (`Loaded`), not in the constructor — but `ApplicationThemeManager.Apply(…, updateAccent: true)` BEFORE the first window's XAML loads, or the accent resources are missing at first Measure (§App bootstrap).
|
||||
- [ ] Menu row lives **outside** `ui:TitleBar` (its area is the drag region; a Menu inside becomes undraggable/unclickable territory).
|
||||
- [ ] Don't set `AllowsTransparency`/`WindowStyle` on `FluentWindow` — it manages its own chrome.
|
||||
@@ -304,21 +266,6 @@ On startup and on `ApplicationThemeManager.Changed`: for every live plot set fig
|
||||
bar with no exit, which is exactly how the safety notices shipped (2026-09-14). `Styles/FrameLedger.xaml` carries
|
||||
the upstream template plus one presenter column; `PagesLoadTests.TheInfoBarTemplateRendersItsContent` renders both
|
||||
templates and turns red when upstream gains a presenter, which is when the copy comes out.
|
||||
- [ ] **What a screen reader is given is the UI Automation tree, and WPF builds it with four holes** (beta.35, D88;
|
||||
`PagesLoadTests.Automation` sweeps every surface for each). (1) **A control with no automation peer** — a plain `Control`
|
||||
or `ContentControl`, WPF UI's `Image`, `Card`, `Badge`, `InfoBar` (measured on .NET 10.0.14) — is skipped by the tree; if
|
||||
it is also focusable (a `Control` is, by default) it is a Tab stop Narrator says nothing about. Give a display-only
|
||||
control a peer (`Controls/SpokenTextAutomationPeer`) and take it out of the tab order; `ui:CardControl` has a peer with an
|
||||
empty name even with a string `Header` — the App's implicit style takes it out of the tab order. (2) **A list's,
|
||||
drop-down's or grid row's item is named by its `ToString()`**: a record's is its printed form (`Choice { Value = dark,
|
||||
Label = Dark }`), a class's its full type name. Every item type overrides it (`Services/SpokenText` builds the words).
|
||||
(3) **A `TextBlock` written straight into a `ControlTemplate` is no control element** (`TextBlockAutomationPeer`: not when
|
||||
its templated parent is something other than a `ContentPresenter`): draw a template's text through a `ContentPresenter`
|
||||
(the App's InfoBar template), or give the control a peer that says it. (4) **A `DataGridTemplateColumn`'s cell has no text
|
||||
of its own**, so WPF names it `Item: <row>, Column Display Index: n`: name it with `controls:CellName.Path` (a cell style
|
||||
based on `DefaultDataGridCellStyle`, the one WPF UI's grid gives every cell). Also: a plain `ItemsControl` is focusable
|
||||
(the App's implicit style says no), and WPF UI's `CardExpander` leaves its expand button (`ExpanderToggleButton`)
|
||||
unnamed (`Controls/ExpanderToggleName`, set by the App's implicit CardExpander style).
|
||||
- [ ] **WPF UI 4.3.0 keys its DataGrid parts' styles and defines no implicit one** (`DefaultDataGridRowStyle`,
|
||||
`DefaultDataGridCellStyle`, `DefaultDataGridColumnHeaderStyle`, handed to the grid by its implicit `DataGrid` style's
|
||||
`RowStyle`/`CellStyle`/`ColumnHeaderStyle` setters). A local `RowStyle` replaces WPF UI's; based on
|
||||
|
||||
+76
-80
@@ -73,7 +73,6 @@ owner-only items stay below; the history of every train, the passed owner-only i
|
||||
| `§beta.31` | [`handoff/history/0.1.0-beta.31.md`](handoff/history/0.1.0-beta.31.md) |
|
||||
| `§beta.32` | [`handoff/history/0.1.0-beta.32.md`](handoff/history/0.1.0-beta.32.md) |
|
||||
| `§beta.33` | [`handoff/history/0.1.0-beta.33.md`](handoff/history/0.1.0-beta.33.md) |
|
||||
| `§beta.34` | [`handoff/history/0.1.0-beta.34.md`](handoff/history/0.1.0-beta.34.md) |
|
||||
| `§Owner-only`, an open item | [§Owner-only](#owner-only--no-pr-can-close-these) below |
|
||||
| `§Owner-only`, a passed item (3, 12, 14–19) | [`handoff/owner-only-passed.md`](handoff/owner-only-passed.md) |
|
||||
| `§Traps`, `§Two corrections carried forward` | [`handoff/traps.md`](handoff/traps.md) |
|
||||
@@ -81,76 +80,92 @@ owner-only items stay below; the history of every train, the passed owner-only i
|
||||
|
||||
---
|
||||
|
||||
## **START HERE** — 2026-11-09, 0.1.0-beta.35: accessibility — a statement, what a screen reader is given and told, headings and charts, contrast themes, focus
|
||||
## **START HERE** — 2026-11-06, 0.1.0-beta.34: DLSS 5 and DLSS 4.5 from what the game and the driver did; filters; Games at once
|
||||
|
||||
*Status is `docs/changelog/0.1.0-beta.35.md`; this is what no other file carries.* The owner: "Bạn lên plan và thêm
|
||||
phiên bản mới (nếu thực sự cần) cho mục accessibility: 1. đọc docs, check, sync và sửa, cập nhật thêm file
|
||||
ACCESSIBILITY.md vào đúng vị trí. 2. Check các Accessibility đã có, đề xuất thêm accessibility nếu cần. 3. Đã dùng: bàn
|
||||
phím only (tắt chuột) và narrators, không lỗi." — plan accessibility, with a new version if it is really needed: read,
|
||||
check, sync and fix the documents and add `ACCESSIBILITY.md` where it belongs; check what exists and propose more; the
|
||||
owner had used the keyboard alone, mouse disconnected, and Narrator, with no fault. With opensource.guide's
|
||||
accessibility practices and the open-source-accessibility toolkit's `ACCESSIBILITY.md` template (MIT: its structure,
|
||||
not its text). #366 (the statement, D88), #367 (names and peers), #368 (announcements, D89), #369 (headings and charts,
|
||||
D90), #370 (contrast themes, D91, and three contrast holes outside them), #371 (focus and motion) and this release; no alpha (D92).
|
||||
*Status is `docs/changelog/0.1.0-beta.34.md`; this is what no other file carries.* The owner asked for seven things, the
|
||||
usual train: (1) how DLSS 5 Neural Rendering is detected on Hogwarts Legacy (Neural Rendering on in the game), and its
|
||||
version; (2) under the NVIDIA App's *Dynamic* multi frame generation the label read DLSS 4, though Dynamic and ×6 exist
|
||||
only in DLSS 4.5 (Phantom Blade Zero); (3) filters on Games and Compare; (4) the Compare page's layout, from a
|
||||
screenshot; (5) the documents and the tested-games list, from the database; (6) switching to Games stalled 0.5–1.5 s;
|
||||
(7) a language change landed on the last content page instead of Settings. And while planning: "Bạn check Streamline các
|
||||
bản gần đây có gì thay đổi và sửa luôn nếu thật sự cần nhé." — check what changed in recent Streamline versions and fix it
|
||||
if really needed. #356 (two fixes from a self-review of #351 and #352), #357 (D83), #358 (D84, Streamline `v2.14.16`),
|
||||
#359 (items 6 and 7), #360 (items 3 and 4, D85, D86), #361 (item 5) and this release; `0.1.0-alpha.3` follows (D87) —
|
||||
the owner's screenshot is of an alpha, so the alpha is how these reach the owner's PC.
|
||||
|
||||
**Decisions (asked while planning, do not re-ask):**
|
||||
|
||||
- **D88 — the accessibility statement**: `ACCESSIBILITY.md` at the repository's root, in the App under Help ▸
|
||||
Accessibility and on the wiki. WCAG 2.2 at level AA, as W3C's WCAG2ICT applies it to desktop software, is a goal and
|
||||
never a claim; a report is handled by severity, with no promised times; the owner's pass of 2026-11-09 — keyboard only
|
||||
and Narrator, on 0.1.0-beta.34 and 0.1.0-alpha.3, no fault — is its first evidence by hand.
|
||||
- **D89 — what appears is said to a screen reader**: UI Automation notifications for a safety notice, the agent's and
|
||||
the update's banners, every snackbar, a game page's notice and Database maintenance's results, only while
|
||||
FrameLedger's window is the active one.
|
||||
- **D90 — headings and charts**: a page's title is a heading of level 1, a section's title level 2; every chart is
|
||||
named with where its numbers are written; no chart tells two series apart by colour alone.
|
||||
- **D91 — Windows contrast themes are followed**, whatever Settings ▸ Theme says.
|
||||
- **D92 — beta.35 in this train and no alpha**; alpha.4 is the move to .NET 11's release (SDK `11.0.100`, packages
|
||||
`11.0.0`), a task of its own after 2026-11-10.
|
||||
- **D83 — Dynamic frame generation is DLSS 4.5's**: the owner's rule, "Dynamic and ×6 exist only in DLSS 4.5". The
|
||||
evidence is the game's driver profile setting Dynamic (`NGX_DLSSG_MODE` = 4) **and** the driver reporting its
|
||||
frame-generation override applied in the game's process (`FG_MODE` in its FG word), in a session where DLSS
|
||||
Frame Generation was identified (`fg_mode = dlssg`; its factor need not have been counted); a state measured at ×5 or more still ranks first, and a *Fixed* multiplier names nothing by itself
|
||||
(amends D64). The driver's `frameGenerationMode` — 3 under Dynamic and 1 under Fixed in every session read, and unnamed
|
||||
by NVIDIA — is recorded in `spike-notes` §26, not keyed on.
|
||||
- **D84 — DLSS 5 is the session's generation where its neural rendering was measured running**: the Overlay decodes
|
||||
`kFeatureDLSS_NR` in its `slEvaluateFeature` detour and the Agent keeps its share of the Streamline batches
|
||||
(`sessions.dlss_nr_pct`, schema 0022) — *DLSS 5 (neural rendering on N % of rendered frames)*; loaded and seen not
|
||||
running, *runtime loaded, not seen running*; where nothing could tell, *runtime loaded*, as before (amends D64).
|
||||
- **D85 — the filters**: Games — store, engine, state, installed, played; Compare — game, tier, frame generation, no
|
||||
period; Compare lists every session (it listed the newest 200).
|
||||
- **D86 — the left pane's selected item keeps its label**: our copy of WPF UI 4.3.0's LeftFluent item template, whose
|
||||
`IsActive` trigger animated it away.
|
||||
- **D87 — alpha.3 right after beta.34**, on RC3: the train reaches it before .NET 11's release on 2026-11-10.
|
||||
|
||||
Streamline was re-vendored at `v2.14.16` on the owner's instruction above, not as a decision of its own. The wording of
|
||||
the Disclaimer 2.13 and the Privacy Policy 2.14, and the tested-games list (D35), were approved with the plan (D36).
|
||||
|
||||
**Choices made here:**
|
||||
|
||||
- **A contrast theme is the user's colours by role**, not WPF UI's high-contrast files (84 red placeholders among 97
|
||||
colours, 17 brushes that throw, Windows 11's defaults) and not a hand list of keys: every key of the four files takes
|
||||
the colour of the role it has in all of them, opaque colours only (`ContrastRoles`), over the light or the dark Fluent
|
||||
theme as the contrast theme is; the text on the accent is the highlight's text, the App's choice.
|
||||
- **What must change while it is shown binds `ContrastTheme.IsOn`**, a static property WPF hears through
|
||||
`StaticPropertyChanged`: the implicit button style, the Settings line. The charts, the badges and the artwork band read
|
||||
`ContrastTheme.Active` when they draw.
|
||||
- **The snackbars lost their green and orange** (white on fixed colours, 2.16–2.78:1 in both themes): every message is
|
||||
Secondary, its icon saying the kind. **The agent's pill is a `Pill` on the theme's fills**, no longer a badge.
|
||||
- **A content dialog's focus is WPF UI's**: its host stores and restores the focused element; a test pins it. Message
|
||||
boxes get the App's active window as owner (`MessageBoxes`), which WPF UI's leaves null.
|
||||
- **A page shortcut focuses the page's first control and says its first level-1 heading** (`PageFocus`); a click in the
|
||||
pane leaves the focus where WPF UI puts it.
|
||||
- **Left as limitations, with what to do instead** (`ACCESSIBILITY.md` §Known limitations): a chart's points one by
|
||||
one, headings inside the documents the App shows (a FlowDocument paragraph has no peer), the snackbars' four seconds,
|
||||
Windows' text size, pausing only from the tray.
|
||||
- **Neural rendering's share is over the Streamline batches**, not every present: a generated frame evaluates nothing,
|
||||
and a title that never drains a batch reads *nothing could tell* (null), never 0 %.
|
||||
- **A writer older than beta.34 is told apart by its family bit**, `FL_HOOK_SL_NEURAL_RENDERING` (bit 12), published with
|
||||
the detour — an old Overlay's silence leaves `dlss_nr_pct` null instead of a measured 0 %; no layout change.
|
||||
- **The Games page is the window's**, kept by our own page provider (`WindowPageCache`), not `NavigationCacheMode`: WPF UI
|
||||
4.3.0 reads that only when neither a service provider nor a page provider is set, and `SetNavigationControl` sets one
|
||||
(`16_WPFUI_SYNTAX` §Navigation). One per window, so a language change's window builds its own.
|
||||
- **The cards come before the executable checks** — 39 of the owner's 41 Steam games are on a USB drive that sleeps — and
|
||||
each card gets its *Not installed* pill when its check answers.
|
||||
- **The pane's item template is a copy changed in one place**, reading WPF UI's own `NavigationViewConstants.xaml`: before
|
||||
the WPF UI pin moves, the upstream template is read again.
|
||||
|
||||
**Measured on the way:** the UI Automation tree WPF builds, on .NET 10.0.14 — items named by `ToString()`, peerless
|
||||
focusable controls, a template's text hidden from the control view, template cells read as *Item: …* (`16_WPFUI_SYNTAX`
|
||||
§Gotchas); WPF UI 4.3.0's high-contrast files, its Button, Badge and Snackbar appearances (fixed colours, the ratios
|
||||
above), its message box's missing owner and its content dialog host's focus restore; ScottPlot 5.1.59's keys (focusable,
|
||||
none marked handled) and its double-click benchmark.
|
||||
**Measured on the way:** the owner's DLSS sessions of 2026-11-01 → 11-06, the driver's frame-generation numbering and
|
||||
Streamline's `v2.12.0` → `v2.14.16` changes are `spike-notes` §26 (the ledger read read-only; the vendored copy was
|
||||
`v2.12.0` byte for byte); the Games page before and after is §27 (first cards 822–830 ms → 10–15 ms with the first
|
||||
executable check held 800 ms; a revisit 181–215 ms → 15–16 ms). The neural-rendering decode costs nothing measurable in
|
||||
the detour and 0.14–0.19 ns on the present's feature byte (#358's body; NFR-1's budget is 1 µs per present).
|
||||
|
||||
**Traps met on the way:**
|
||||
|
||||
- **A `ContentDialog` test needs the dispatcher's context.** `ContentDialog.ShowAsync` takes the dialog out of its host
|
||||
in a `finally` after an await; on a test thread with no `DispatcherSynchronizationContext` that never resumes on the UI
|
||||
thread, the dialog stays in its host and the focus on its button — a first measurement concluded WPF UI kept the focus
|
||||
there; it does not.
|
||||
- **A test that listens to a static event hears every test's**: subscribe inside the one STA work item.
|
||||
- **Inside the App, a brush that throws when WPF UI's file is read alone falls back to the application's resources**, the
|
||||
Fluent theme's translucent fills: `MenuBarItemBackgroundPressed` read as the window text's white. Count only opaque
|
||||
colours as evidence.
|
||||
- **WPF calls a resource reference's callback when a merged dictionary changes, even for an equal value** (Aquatic's
|
||||
window is the dark theme's `#202020`): no second signal was needed, measured and pinned.
|
||||
- **A forward `StaticResource` in a style dictionary fails only when that resource is first used** — `AgentPill`
|
||||
`BasedOn` `Pill`, placed above it: the dictionary loaded, the style threw when found.
|
||||
- **Python's `"\b"` in a non-raw string is a backspace** — it went into a C# regex twice; write regexes raw.
|
||||
- **`RenderTargetBitmap.Render(child)` draws the child at its offset**: sample a child's pixel through its parent.
|
||||
- **`notice-check` reads the tracked tree**: a file deleted from the working tree but not from the index fails it with
|
||||
*Could not find file* — after every build and test had passed (#360's first local gate). Stage the change
|
||||
(`git add -A`) before the gate.
|
||||
- **A new hook family bit belongs in the native token test's exact mask** (`guard_test.cpp`), and a new Streamline fact
|
||||
in the 0xF00D case's list of facts it must not light — #358's first gate (`0x100f` against `15`).
|
||||
- **WPF UI 4.3.0**: `NavigationCacheMode` is ignored once a page provider is set; `INavigationService.SetNavigationControl`
|
||||
hands the NavigationView the container's provider, so ours is set after it; LeftFluent's item template collapses the
|
||||
selected item's label.
|
||||
- **Microsoft.Data.Sqlite's async methods run synchronously**: a read awaited on the UI thread blocks it — `Task.Run` it.
|
||||
|
||||
**Owner-only:** item 32 — beta.35 on real hardware.
|
||||
**Owner-only:** item 30 — beta.34 on real hardware.
|
||||
|
||||
### 0.1.0-alpha.3 — the third alpha, the same day (D87)
|
||||
|
||||
`alpha` takes main at this pull request — `v0.1.0-beta.34` and these notes, no other change — by a merge commit, as
|
||||
`13_CI_CD` §The alpha line says. One file the switch holds moved on main — `legal/THIRD_PARTY_NOTICES.md`, its
|
||||
Streamline row (#358) — on a line the switch does not touch (the switch changes the *Transitive* row), so the merge
|
||||
takes both without a conflict (`git merge-tree` before the pull request); main's package set did not move, and the
|
||||
switch stays the first alpha's (SDK `11.0.100-rc.3.26522.148`, the three packages at `11.0.0-rc.3.26522.148`, the same
|
||||
NuGet licence texts) — the train reached it before .NET 11's release. Its gate on the 11 SDK must pass before the pull
|
||||
request into `alpha` is merged by
|
||||
hand (the branch has no auto-merge); the release runs from the signed tag `v0.1.0-alpha.3` on `alpha`, with its delta
|
||||
from alpha.2. Its notes are `docs/changelog/0.1.0-alpha.3.md`, which open with the experimental-build warning. It is
|
||||
the first alpha whose ledger moves (schema 22): the copy it makes first is the database as alpha.2 left it, and going
|
||||
back is to the newest beta, which opens schema 22.
|
||||
|
||||
- **The next alpha moves to .NET 11's release**: from 2026-11-10 the switch is SDK `11.0.100` and the packages `11.0.0`,
|
||||
and RC3 is out of support — move the alpha even if no beta comes.
|
||||
|
||||
**Owner-only:** item 31 — the third alpha on real hardware.
|
||||
|
||||
|
||||
## Owner-only — no PR can close these
|
||||
@@ -381,20 +396,6 @@ none marked handled) and its double-click benchmark.
|
||||
window shows the Disclaimer 2.13, the Privacy Policy 2.14 and the Alpha notice with its box again, and Accept waits for
|
||||
the tick. (c) `%LOCALAPPDATA%\FrameLedger\backups\ledger-before-0.1.0-alpha.3.db` exists beside alpha.2's, and opens;
|
||||
the ledger it left is at schema 22. (d) Item 30's checks, on the alpha.
|
||||
32. **beta.35 on real hardware** (D88–D91). (a) **The update from beta.34** (or alpha.3's): no terms window, the ledger
|
||||
unchanged. (b) **Narrator**: a safety notice is read as it appears; the agent's banner going and coming; Tools ▸
|
||||
Database maintenance ▸ Check reads its result; a short message at the bottom is read; **H** moves between each page's
|
||||
title and its sections; Settings ▸ Theme's options read their words; the Sessions table's cells read their values;
|
||||
Tab to a chart says its name and where its numbers are, and its arrows, Ctrl+arrows and A move it without scrolling
|
||||
the page; a double-click shows all of it. (c) **Contrast themes**: Aquatic and Desert, and one with an edited colour
|
||||
(Windows 10 if at hand) — every page, a dialog, the title bar's agent pill, a short message, a chart; turned on and
|
||||
off with FrameLedger open, it follows at once; Settings ▸ Theme shows its line. (d) **Ctrl+1 … Ctrl+5** put the
|
||||
keyboard in the page and Narrator says its title. (e) **Animation effects off** (Settings ▸ Accessibility ▸ Visual
|
||||
effects): no page slides in. (f) **Remove** on a game's page: the box opens over the window, its Cancel puts the focus
|
||||
back on Remove; the light theme's agent pill and a *done* message read clearly. (g) Help ▸ Accessibility shows the
|
||||
statement. (h) The 35 `ja` strings this release adds, all marked `review`: `Menu_Help_Accessibility`,
|
||||
`Accessibility_Title`, `Settings_Theme_ContrastOn` and 32 `A11y_*` (the names, the chart names and keys, the
|
||||
announcements).
|
||||
**Answered 2026-08-05, do not re-ask:** remove `gameguard` and keep `guard` (approved
|
||||
over a red `Rules` gate, with the reasoning recorded in the merge commit); vendor NVAPI
|
||||
headers **and** `amd64/nvapi64.lib`; Windows 11 is the **measurement scope** only —
|
||||
@@ -490,17 +491,12 @@ Where each owner decision is recorded — the file and its section, and a label
|
||||
| D79 | [`05_DETECTION.md`](05_DETECTION.md) §Platform signatures & metadata | the platform is "Xbox" (`xbox`), in full: import, artwork, Play, capture, detection, docs and legal |
|
||||
| D80 | [`08_UI.md`](08_UI.md) §Games | Play on an Xbox game always activates its package, in both modes; the Agent answers `PackagedGame` and records it in attach mode |
|
||||
| D81 | [`20_OPEN_QUESTIONS.md`](20_OPEN_QUESTIONS.md) §G | title lists stay keyed by Steam id; an Xbox copy is matched by everything but that entry |
|
||||
| D82 | [`handoff/history/0.1.0-beta.33.md`](handoff/history/0.1.0-beta.33.md) | alpha.2 right after beta.33; on RC3 unless the train reaches it after .NET 11 ships (then SDK 11.0.100, packages 11.0.0) |
|
||||
| D82 | [`HANDOFF.md`](HANDOFF.md) §START HERE | alpha.2 right after beta.33; on RC3 unless the train reaches it after .NET 11 ships (then SDK 11.0.100, packages 11.0.0) |
|
||||
| D83 | [`05_DETECTION.md`](05_DETECTION.md) §DLSS generation | the NVIDIA App's Dynamic frame generation, reported applied by the driver in a session where DLSS Frame Generation was identified, is DLSS 4.5 (amends D64) |
|
||||
| D84 | [`05_DETECTION.md`](05_DETECTION.md) §DLSS generation | DLSS 5 heads the DLSS line where its neural rendering was measured running (`kFeatureDLSS_NR`, `dlss_nr_pct`); loaded only reads "runtime loaded" (amends D64) |
|
||||
| D85 | [`08_UI.md`](08_UI.md) §Games, §Compare | filters: Games — store, engine, state, installed, played; Compare — game, tier, frame generation (no period); Compare lists every session |
|
||||
| D86 | [`08_UI.md`](08_UI.md) (the shell) | the left pane's selected item keeps its label: our copy of WPF UI 4.3.0's LeftFluent item template |
|
||||
| D87 | [`handoff/history/0.1.0-beta.34.md`](handoff/history/0.1.0-beta.34.md) | alpha.3 right after beta.34, on RC3 (before .NET 11's release, 2026-11-10) |
|
||||
| D88 | [`../ACCESSIBILITY.md`](../ACCESSIBILITY.md) | the accessibility statement at the root, under Help ▸ Accessibility and on the wiki: WCAG 2.2 AA through WCAG2ICT is a goal, never a claim; reports by severity, no promised times |
|
||||
| D89 | [`08_UI.md`](08_UI.md) §Screen readers | what appears is said to a screen reader — notices, the agent's and the update's banners, the snackbars, a game page's notice, Database maintenance's results — while FrameLedger's window is active |
|
||||
| D90 | [`08_UI.md`](08_UI.md) §Screen readers | page titles heading 1, section titles heading 2; every chart named with where its numbers are; no series told apart by colour alone |
|
||||
| D91 | [`08_UI.md`](08_UI.md) §Contrast | Windows contrast themes are followed, whatever Settings ▸ Theme says |
|
||||
| D92 | [`HANDOFF.md`](HANDOFF.md) §START HERE | beta.35 in this train, no alpha; alpha.4 is the move to .NET 11's release (SDK 11.0.100, packages 11.0.0), a task of its own after 2026-11-10 |
|
||||
| D87 | [`HANDOFF.md`](HANDOFF.md) §START HERE | alpha.3 right after beta.34, on RC3 (before .NET 11's release, 2026-11-10) |
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -1,91 +0,0 @@
|
||||
<!-- Moved from CHANGELOG.md's [Unreleased] when 0.1.0-beta.35 was cut, 2026-11-09 (D66). CHANGELOG.md lists every release. -->
|
||||
|
||||
## [0.1.0-beta.35] - 2026-11-09
|
||||
|
||||
**The thirty-fifth pre-release: accessibility.** An accessibility statement (Help ▸ Accessibility); a screen reader
|
||||
that reads every control and value in its words and is told what appears; headings and charts it can use; Windows
|
||||
contrast themes followed; the keyboard following a page shortcut, and a message box opening over the window. And three
|
||||
places where text read below WCAG's 4.5:1 in a Fluent theme, found on the way: the agent's pill, two kinds of short
|
||||
message, a destructive button. The same unsigned installer: verify its hash against `SHA256SUMS.txt`, then *More info →
|
||||
Run anyway*.
|
||||
|
||||
**Updating from `0.1.0-beta.34`:** Help ▸ Check for updates, then *Restart to update* with no game running. The legal
|
||||
texts keep their versions, so nothing is shown for you to accept; the ledger stays at schema 22 and the detection rules
|
||||
at `2026.11.2`. Nothing about capture or measurement changes.
|
||||
|
||||
### Added␍
|
||||
␍
|
||||
- **An accessibility statement** (owner request 2026-11-09, decision D88). `ACCESSIBILITY.md` says what FrameLedger aims␍
|
||||
for — WCAG 2.2 at level AA as W3C's WCAG2ICT applies it to desktop software, a goal and not a claim of conformance —␍
|
||||
what works with the keyboard alone, a screen reader, a contrast theme or Magnifier, how it is checked (the project's␍
|
||||
tests, and the owner's pass of 2026-11-09: keyboard only and Narrator on 0.1.0-beta.34 and 0.1.0-alpha.3, no fault),␍
|
||||
what does not work yet and what to do instead, and how a barrier is reported and handled — by severity, with no␍
|
||||
promised times. The app shows it under **Help ▸ Accessibility**, and after Limitations in the user guide's window; the␍
|
||||
wiki gets an *Accessibility* page.␍
|
||||
- **An *Accessibility problem* issue form** (`.github/ISSUE_TEMPLATE/accessibility.yml`) asking what was tried, what␍
|
||||
happened and what the reporter uses — never anything about the reporter themself — and a user-interface section in the␍
|
||||
pull-request template. The `accessibility` label exists, and so do `safety` and `priority-high`, which the *Safety gap*␍
|
||||
form had named since its first day without either existing — so GitHub had never applied them.␍
|
||||
␍
|
||||
- **A screen reader reads what the window shows** (decision D88's goal; measured in the UI Automation tree WPF builds on␍
|
||||
every page, window and dialog, every tab — `PagesLoadTests.Automation`). Drop-down options were read as an internal␍
|
||||
record (*Choice { Value = dark, Label = Dark }*), lists and table rows by their program names, table cells drawn by a␍
|
||||
template as *Item: …, Column Display Index: n*, and the terms window's list by each document's whole text; each now␍
|
||||
reads the words it shows, and an empty cell reads *empty*. The frame-rate readout says Native, Displayed and the␍
|
||||
factor together (CLAUDE.md rule 6, in speech), a ray-tracing chip its value and where it came from, a change badge its␍
|
||||
number. The safety notices' title and message reach a screen reader (they were hidden inside the notice's template),␍
|
||||
and the notice's button says which notice it answers. A button repeated on each row names its row (*Open: …*, *Play:␍
|
||||
…*, *Turn off: …*). Tab no longer stops on pictures, lists, Settings' rows, the FPS readout, the chips or the dialog␍
|
||||
host, where it found nothing to say; an expander's button is named after its header.␍
|
||||
␍
|
||||
- **A screen reader is told what appears** (owner decision D89): a safety notice as it arrives, the capture agent going␍
|
||||
offline and coming back, an update's steps (not each percent), every short message at the bottom of the window, a␍
|
||||
notice on a game's page and each result of Tools ▸ Database maintenance — in the words shown, and only while␍
|
||||
FrameLedger's window is the active one, so a game that has the screen is never interrupted. The database line's live␍
|
||||
region, which announced nothing, is gone.␍
|
||||
␍
|
||||
- **Headings and charts a screen reader can use** (owner decision D90). Every page's title is a first-level heading and␍
|
||||
each section title a second-level one, so a screen reader's heading keys move between sections. Every chart says what␍
|
||||
it is and where its numbers are written as text; its keys — arrows to move, Ctrl with an arrow to zoom, A to see all of␍
|
||||
it — now stay with the chart instead of also scrolling the page or moving the focus on, and its focus is drawn. No␍
|
||||
chart tells two series apart by colour alone any more: Compare's five sessions, the GPU's temperature and its hot spot,␍
|
||||
the two kinds of stutter, the two lows and the two limits each have their own line pattern, marker or hatch.␍
|
||||
␍
|
||||
- **Windows contrast themes are followed** (owner decision D91). With a contrast theme on — Aquatic, Desert, Dusk, Night␍
|
||||
sky, or one whose colours were edited, on Windows 10 or 11 — every colour in FrameLedger's windows is one of that␍
|
||||
theme's, whatever Settings ▸ Theme says, and it changes the moment the theme is turned on, edited or turned off;␍
|
||||
Settings ▸ Theme says so under its box. Before, *System* could apply WPF UI's own high-contrast files, most of whose␍
|
||||
colours are a red placeholder, and the next window opened put the light or the dark theme back. The charts draw in the␍
|
||||
theme's colours, their patterns telling the series apart; the frame-generation, ray-tracing and upscaler chips are the␍
|
||||
theme's highlight and its text (WPF UI's files put the window text there, 1.26–1.78:1); a destructive button is the␍
|
||||
theme's own button; a pressed menu item is no longer white on white; nothing is drawn translucent, and a game's picture␍
|
||||
lends its page no colour, as before.␍
|
||||
␍
|
||||
- **The keyboard follows a page shortcut.** **Ctrl+1** … **Ctrl+5** now move the focus into the page they open — its␍
|
||||
first control — and a screen reader hears the page's title; before, the focus stayed where it was, often on the page␍
|
||||
that had just gone, and Tab began again at the top of the window.␍
|
||||
- **Pages no longer slide in while Windows' animation effects are off** (Settings ▸ Accessibility ▸ Visual effects),␍
|
||||
followed as the setting changes.␍
|
||||
␍
|
||||
### Fixed␍
|
||||
␍
|
||||
- **A message box opens over FrameLedger's window** — Remove game, Delete sessions, the database's and the update's␍
|
||||
questions. It had no owner, so it could fall behind the window it came from and, closing, give the focus to another␍
|
||||
program; it is owned by the window that opened it now, and the focus comes back there.␍
|
||||
- **A double-click on a chart shows all of it again**, as the user guide said; it toggled ScottPlot's render-time overlay.␍
|
||||
- **The capture agent's state in the title bar reads in the light theme.** It was drawn on WPF UI's fixed green, blue,␍
|
||||
orange and red under white — 2.78, 2.63, 2.16 and 3.68:1 — and is on the theme's own success, caution and critical␍
|
||||
fills now, as the notices are; its words say the state.␍
|
||||
- **The short messages at the bottom of the window read.** A *done* or a *warning* message was white on a fixed green or␍
|
||||
orange, 2.78:1 and 2.16:1 in both themes; every message is in the theme's colours now, its icon saying which kind.␍
|
||||
- **A destructive button's label reads in the dark theme** — Remove on a game's page, Delete in the confirmations: the␍
|
||||
theme's dark text on the red, 5.3:1 and 5.7:1, where white read 3.68:1.␍
|
||||
␍
|
||||
### Changed␍
|
||||
␍
|
||||
- **Documents corrected**: charts do take focus and keys (`docs/08_UI.md` said neither — `ChartKeyboardTests` measures␍
|
||||
it); the database-maintenance result's live region announced nothing, since WPF raises one only when the app does; the␍
|
||||
"no Narrator pass" gap is the owner's pass now, beside what that pass could not show; the open question "Accessibility␍
|
||||
/ DPI: no design anywhere" is closed; NFR-9 names screen readers and contrast themes (D88–D91). `LIMITATIONS.md` gains an␍
|
||||
*Accessibility* section and loses its one struck sentence — a screen reader reads struck text as current, so no page␍
|
||||
the app shows strikes text through. The guide's menu table names its menu on every row, read one row at a time.
|
||||
@@ -1,90 +0,0 @@
|
||||
# HANDOFF history — 0.1.0-beta.34
|
||||
|
||||
*Moved verbatim from `docs/HANDOFF.md` when 0.1.0-beta.35 was cut, 2026-11-09 (owner decision D66); `docs/HANDOFF.md` §How this file is split lists every part. Nothing below was edited, so its "below" and "above" mean HANDOFF.md as it stood.*
|
||||
|
||||
## **START HERE** — 2026-11-06, 0.1.0-beta.34: DLSS 5 and DLSS 4.5 from what the game and the driver did; filters; Games at once
|
||||
|
||||
*Status is `docs/changelog/0.1.0-beta.34.md`; this is what no other file carries.* The owner asked for seven things, the
|
||||
usual train: (1) how DLSS 5 Neural Rendering is detected on Hogwarts Legacy (Neural Rendering on in the game), and its
|
||||
version; (2) under the NVIDIA App's *Dynamic* multi frame generation the label read DLSS 4, though Dynamic and ×6 exist
|
||||
only in DLSS 4.5 (Phantom Blade Zero); (3) filters on Games and Compare; (4) the Compare page's layout, from a
|
||||
screenshot; (5) the documents and the tested-games list, from the database; (6) switching to Games stalled 0.5–1.5 s;
|
||||
(7) a language change landed on the last content page instead of Settings. And while planning: "Bạn check Streamline các
|
||||
bản gần đây có gì thay đổi và sửa luôn nếu thật sự cần nhé." — check what changed in recent Streamline versions and fix it
|
||||
if really needed. #356 (two fixes from a self-review of #351 and #352), #357 (D83), #358 (D84, Streamline `v2.14.16`),
|
||||
#359 (items 6 and 7), #360 (items 3 and 4, D85, D86), #361 (item 5) and this release; `0.1.0-alpha.3` follows (D87) —
|
||||
the owner's screenshot is of an alpha, so the alpha is how these reach the owner's PC.
|
||||
|
||||
**Decisions (asked while planning, do not re-ask):**
|
||||
|
||||
- **D83 — Dynamic frame generation is DLSS 4.5's**: the owner's rule, "Dynamic and ×6 exist only in DLSS 4.5". The
|
||||
evidence is the game's driver profile setting Dynamic (`NGX_DLSSG_MODE` = 4) **and** the driver reporting its
|
||||
frame-generation override applied in the game's process (`FG_MODE` in its FG word), in a session where DLSS
|
||||
Frame Generation was identified (`fg_mode = dlssg`; its factor need not have been counted); a state measured at ×5 or more still ranks first, and a *Fixed* multiplier names nothing by itself
|
||||
(amends D64). The driver's `frameGenerationMode` — 3 under Dynamic and 1 under Fixed in every session read, and unnamed
|
||||
by NVIDIA — is recorded in `spike-notes` §26, not keyed on.
|
||||
- **D84 — DLSS 5 is the session's generation where its neural rendering was measured running**: the Overlay decodes
|
||||
`kFeatureDLSS_NR` in its `slEvaluateFeature` detour and the Agent keeps its share of the Streamline batches
|
||||
(`sessions.dlss_nr_pct`, schema 0022) — *DLSS 5 (neural rendering on N % of rendered frames)*; loaded and seen not
|
||||
running, *runtime loaded, not seen running*; where nothing could tell, *runtime loaded*, as before (amends D64).
|
||||
- **D85 — the filters**: Games — store, engine, state, installed, played; Compare — game, tier, frame generation, no
|
||||
period; Compare lists every session (it listed the newest 200).
|
||||
- **D86 — the left pane's selected item keeps its label**: our copy of WPF UI 4.3.0's LeftFluent item template, whose
|
||||
`IsActive` trigger animated it away.
|
||||
- **D87 — alpha.3 right after beta.34**, on RC3: the train reaches it before .NET 11's release on 2026-11-10.
|
||||
|
||||
Streamline was re-vendored at `v2.14.16` on the owner's instruction above, not as a decision of its own. The wording of
|
||||
the Disclaimer 2.13 and the Privacy Policy 2.14, and the tested-games list (D35), were approved with the plan (D36).
|
||||
|
||||
**Choices made here:**
|
||||
|
||||
- **Neural rendering's share is over the Streamline batches**, not every present: a generated frame evaluates nothing,
|
||||
and a title that never drains a batch reads *nothing could tell* (null), never 0 %.
|
||||
- **A writer older than beta.34 is told apart by its family bit**, `FL_HOOK_SL_NEURAL_RENDERING` (bit 12), published with
|
||||
the detour — an old Overlay's silence leaves `dlss_nr_pct` null instead of a measured 0 %; no layout change.
|
||||
- **The Games page is the window's**, kept by our own page provider (`WindowPageCache`), not `NavigationCacheMode`: WPF UI
|
||||
4.3.0 reads that only when neither a service provider nor a page provider is set, and `SetNavigationControl` sets one
|
||||
(`16_WPFUI_SYNTAX` §Navigation). One per window, so a language change's window builds its own.
|
||||
- **The cards come before the executable checks** — 39 of the owner's 41 Steam games are on a USB drive that sleeps — and
|
||||
each card gets its *Not installed* pill when its check answers.
|
||||
- **The pane's item template is a copy changed in one place**, reading WPF UI's own `NavigationViewConstants.xaml`: before
|
||||
the WPF UI pin moves, the upstream template is read again.
|
||||
|
||||
**Measured on the way:** the owner's DLSS sessions of 2026-11-01 → 11-06, the driver's frame-generation numbering and
|
||||
Streamline's `v2.12.0` → `v2.14.16` changes are `spike-notes` §26 (the ledger read read-only; the vendored copy was
|
||||
`v2.12.0` byte for byte); the Games page before and after is §27 (first cards 822–830 ms → 10–15 ms with the first
|
||||
executable check held 800 ms; a revisit 181–215 ms → 15–16 ms). The neural-rendering decode costs nothing measurable in
|
||||
the detour and 0.14–0.19 ns on the present's feature byte (#358's body; NFR-1's budget is 1 µs per present).
|
||||
|
||||
**Traps met on the way:**
|
||||
|
||||
- **`notice-check` reads the tracked tree**: a file deleted from the working tree but not from the index fails it with
|
||||
*Could not find file* — after every build and test had passed (#360's first local gate). Stage the change
|
||||
(`git add -A`) before the gate.
|
||||
- **A new hook family bit belongs in the native token test's exact mask** (`guard_test.cpp`), and a new Streamline fact
|
||||
in the 0xF00D case's list of facts it must not light — #358's first gate (`0x100f` against `15`).
|
||||
- **WPF UI 4.3.0**: `NavigationCacheMode` is ignored once a page provider is set; `INavigationService.SetNavigationControl`
|
||||
hands the NavigationView the container's provider, so ours is set after it; LeftFluent's item template collapses the
|
||||
selected item's label.
|
||||
- **Microsoft.Data.Sqlite's async methods run synchronously**: a read awaited on the UI thread blocks it — `Task.Run` it.
|
||||
|
||||
**Owner-only:** item 30 — beta.34 on real hardware.
|
||||
|
||||
### 0.1.0-alpha.3 — the third alpha, the same day (D87)
|
||||
|
||||
`alpha` takes main at this pull request — `v0.1.0-beta.34` and these notes, no other change — by a merge commit, as
|
||||
`13_CI_CD` §The alpha line says. One file the switch holds moved on main — `legal/THIRD_PARTY_NOTICES.md`, its
|
||||
Streamline row (#358) — on a line the switch does not touch (the switch changes the *Transitive* row), so the merge
|
||||
takes both without a conflict (`git merge-tree` before the pull request); main's package set did not move, and the
|
||||
switch stays the first alpha's (SDK `11.0.100-rc.3.26522.148`, the three packages at `11.0.0-rc.3.26522.148`, the same
|
||||
NuGet licence texts) — the train reached it before .NET 11's release. Its gate on the 11 SDK must pass before the pull
|
||||
request into `alpha` is merged by
|
||||
hand (the branch has no auto-merge); the release runs from the signed tag `v0.1.0-alpha.3` on `alpha`, with its delta
|
||||
from alpha.2. Its notes are `docs/changelog/0.1.0-alpha.3.md`, which open with the experimental-build warning. It is
|
||||
the first alpha whose ledger moves (schema 22): the copy it makes first is the database as alpha.2 left it, and going
|
||||
back is to the newest beta, which opens schema 22.
|
||||
|
||||
- **The next alpha moves to .NET 11's release**: from 2026-11-10 the switch is SDK `11.0.100` and the packages `11.0.0`,
|
||||
and RC3 is out of support — move the alpha even if no beta comes.
|
||||
|
||||
**Owner-only:** item 31 — the third alpha on real hardware.
|
||||
@@ -72,8 +72,7 @@ correct it by hand — your correction is labelled as yours.
|
||||
shows the same. *Sessions at a glance* numbers the same days the same way.
|
||||
- **Compare** (in the navigation on the left) — pick sessions, even of different games, and see them side by side.
|
||||
|
||||
To look closer, hold **Ctrl** and turn the mouse wheel over a chart to zoom, drag to pan, and double-click to see all of
|
||||
it again — or Tab to the chart and use the arrow keys, **Ctrl** with an arrow to zoom, and **A**. The
|
||||
To look closer, hold **Ctrl** and turn the mouse wheel over a chart to zoom, drag to pan, and double-click to reset. The
|
||||
wheel alone scrolls the page.
|
||||
|
||||
## Export
|
||||
|
||||
+3
-5
@@ -133,14 +133,12 @@ is ready.
|
||||
|
||||
## Keyboard and mouse
|
||||
|
||||
- **Ctrl+1** … **Ctrl+5** open Dashboard, Games, Compare, Logs and Settings, and put the keyboard in that page.
|
||||
- **Ctrl+1** … **Ctrl+5** open Dashboard, Games, Compare, Logs and Settings.
|
||||
- **Alt** or **F10** moves to the menus; **Alt** with a menu's underlined letter opens it (**Alt+F**, **Alt+T** and
|
||||
**Alt+H** for File, Tools and Help in English).
|
||||
- **Esc** closes a dialog the way its Close or Cancel button does.
|
||||
- Over a chart, **Ctrl** and the mouse wheel zoom, dragging pans, and a double-click shows all of it again. The wheel
|
||||
alone scrolls the page.
|
||||
- **Tab** reaches a chart; then the **arrow keys** move its view, **Ctrl** with an arrow zooms, and **A** shows all of it
|
||||
again.
|
||||
- Over a chart, **Ctrl** and the mouse wheel zoom, dragging pans, and a double-click resets. The wheel alone scrolls the
|
||||
page.
|
||||
|
||||
What works with the keyboard alone, a screen reader or a contrast theme — and what does not yet — is on its own page:
|
||||
[Accessibility](../ACCESSIBILITY.md) (Help ▸ Accessibility).
|
||||
@@ -41,7 +41,7 @@ The link under them, *Read what the hook does and does not do*, opens the safety
|
||||
|
||||
| Setting | What it does | Default |
|
||||
|---|---|---|
|
||||
| **Theme** | Follow system, Light or Dark. Applies at once. While a Windows contrast theme is on, FrameLedger uses that theme's colours whatever you choose here, and says so under the box. | Follow system |
|
||||
| **Theme** | Follow system, Light or Dark. Applies at once. | Follow system |
|
||||
| **Language** | English, Tiếng Việt or 日本語. The window is rebuilt in the new language at once, and stays on Settings (since 0.1.0-beta.34; before, it could open on the last game you looked at). | English |
|
||||
|
||||
## Games
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
HTML comments are not part of the block.
|
||||
-->
|
||||
> ⚠ **What FrameLedger actually measures today — 2026-11-06.** The software is a beta; its latest
|
||||
> **beta is `0.1.0-beta.35`** (2026-11-09), an unsigned installer built from that tag with its
|
||||
> **beta is `0.1.0-beta.34`** (2026-11-06), an unsigned installer built from that tag with its
|
||||
> checksums published beside it (alphas — experimental builds on a prerelease .NET — are published apart). The source holds the desktop app
|
||||
> (library, store import, charts, settings) and the background Agent, which records a session when a
|
||||
> game in the library runs (unless you switched its recording off), injects only into games you enabled
|
||||
|
||||
+1
-1
@@ -116,7 +116,7 @@ Frame timing is derived from high-resolution timestamps taken at the moment the
|
||||
|
||||
<!-- accuracy-block:begin -->
|
||||
> ⚠ **What FrameLedger actually measures today — 2026-11-06.** The software is a beta; its latest
|
||||
> **beta is `0.1.0-beta.35`** (2026-11-09), an unsigned installer built from that tag with its
|
||||
> **beta is `0.1.0-beta.34`** (2026-11-06), an unsigned installer built from that tag with its
|
||||
> checksums published beside it (alphas — experimental builds on a prerelease .NET — are published apart). The source holds the desktop app
|
||||
> (library, store import, charts, settings) and the background Agent, which records a session when a
|
||||
> game in the library runs (unless you switched its recording off), injects only into games you enabled
|
||||
|
||||
@@ -329,7 +329,6 @@ public partial class App : System.Windows.Application
|
||||
builder.Services.AddSingleton(appearance);
|
||||
builder.Services.AddSingleton(registered);
|
||||
builder.Services.AddSingleton(closePolicy);
|
||||
builder.Services.AddSingleton<IContrastSource, SystemContrastSource>(); // beta.35 (D91): a contrast theme wins
|
||||
builder.Services.AddSingleton<IThemeApplier, WpfThemeApplier>();
|
||||
|
||||
// The Agent link, the Run entry, the Agent's maintenance flags and the updater: a viewer's composition holds none of
|
||||
@@ -379,7 +378,6 @@ public partial class App : System.Windows.Application
|
||||
services.AddSingleton<TrayViewModel>();
|
||||
services.AddSingleton<TrayHost>();
|
||||
services.AddTransient<MainWindow>();
|
||||
services.AddSingleton<PageFocus>(); // beta.35: Ctrl+1…5 put the keyboard in the page they open
|
||||
services.AddSingleton<MainWindowViewModel>();
|
||||
services.AddSingleton<ILanguageFollower>(static sp => sp.GetRequiredService<TrayHost>());
|
||||
services.AddSingleton<ILanguageFollower>(static sp => sp.GetRequiredService<MainWindowViewModel>());
|
||||
@@ -400,7 +398,6 @@ public partial class App : System.Windows.Application
|
||||
services.AddSingleton<IGamePicker, GamePicker>();
|
||||
services.AddSingleton<IConfirmations, Confirmations>();
|
||||
services.AddSingleton<AddGameFlow>();
|
||||
services.AddSingleton<IAnnouncer, UiaAnnouncer>(); // beta.35 (D89): what appears is said to a screen reader
|
||||
services.AddSingleton<IMessageStrip, SnackbarStrip>();
|
||||
services.AddSingleton<IEditGamePrompt, EditGamePrompt>();
|
||||
|
||||
|
||||
@@ -27,7 +27,4 @@ public sealed record ChangeMarker(int Number, DateTimeOffset At, IReadOnlyList<s
|
||||
|
||||
/// <summary>The tooltip near the marker: the number and the day, then the changes.</summary>
|
||||
public string ToolTipText => string.Format(CultureInfo.CurrentCulture, Strings.Trend_Change_Heading_Format, NumberText, DateText) + Environment.NewLine + Text;
|
||||
|
||||
/// <summary>The row as a screen reader reads it (beta.35, D88): its number — the chart's badge — the day and the changes.</summary>
|
||||
public override string ToString() => string.Format(CultureInfo.CurrentCulture, Strings.A11y_ChangeMarker_Format, NumberText, DateText, SpokenText.List([.. Lines]));
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
using System.Windows.Input;
|
||||
using ScottPlot.WPF;
|
||||
|
||||
namespace FrameLedger.App.Charts;
|
||||
|
||||
/// <summary>
|
||||
/// The keys of a chart that has the focus (beta.35, D90). ScottPlot reads them — the arrows move the view, Ctrl with an arrow
|
||||
/// zooms, A shows all of it — and marks none handled, so the page around a chart acted on the same arrow too: it scrolled,
|
||||
/// or moved the focus on, and a pan lasted one keypress (<c>ChartKeyboardTests</c>). After ScottPlot has acted, these keys
|
||||
/// are the chart's alone; Tab and every other key go on as before.
|
||||
/// </summary>
|
||||
public static class ChartKeys
|
||||
{
|
||||
/// <summary>Whether a key that reached a focused chart is the chart's: an arrow (with or without Ctrl, Shift or Alt) or A.</summary>
|
||||
public static bool IsTheCharts(Key key) => key is Key.Left or Key.Right or Key.Up or Key.Down or Key.A;
|
||||
|
||||
/// <summary>
|
||||
/// Keeps the chart's keys from the page. An instance handler runs after the class's own — ScottPlot's
|
||||
/// <c>OnKeyDown</c> — so the plot has already moved when the key is marked.
|
||||
/// </summary>
|
||||
public static void Attach(WpfPlot control)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(control);
|
||||
control.KeyDown += static (_, e) =>
|
||||
{
|
||||
if (IsTheCharts(e.Key))
|
||||
{
|
||||
e.Handled = true;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -62,26 +62,8 @@ public sealed record ChartPalette(
|
||||
/// element drawn in the chart colours follows a theme switch: a resource reference to <c>ApplicationBackgroundColor</c>,
|
||||
/// read here (<c>FgMixBar</c>, <c>ChangeBadge</c>).
|
||||
/// </summary>
|
||||
public static ChartPalette ForBackground(System.Windows.Media.Color background) => Services.ContrastTheme.Active is { } contrast
|
||||
? ForContrast(contrast)
|
||||
: For(Services.ColorMath.Luminance(background) < 0.5 ? ApplicationTheme.Dark : ApplicationTheme.Light);
|
||||
|
||||
/// <summary>
|
||||
/// The palette under a Windows contrast theme (beta.35, D91): only the theme's own colours — the window under every plot,
|
||||
/// its text for the axes and the first series, then the link, the highlight, the button text and the disabled text in
|
||||
/// turn — the series told apart by their patterns as well (<see cref="ChartPatterns"/>), since a contrast theme has few.
|
||||
/// </summary>
|
||||
public static ChartPalette ForContrast(Services.ContrastPalette contrast)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(contrast);
|
||||
Color window = ChartTheme.ToScottPlot(contrast.Window);
|
||||
Color text = ChartTheme.ToScottPlot(contrast.WindowText);
|
||||
Color link = ChartTheme.ToScottPlot(contrast.HotTrack);
|
||||
Color highlight = ChartTheme.ToScottPlot(contrast.Highlight);
|
||||
Color button = ChartTheme.ToScottPlot(contrast.ButtonText);
|
||||
Color gray = ChartTheme.ToScottPlot(contrast.GrayText);
|
||||
return new ChartPalette(window, window, text, gray, text, link, highlight, link, text, link, highlight, highlight, text, button, gray, button);
|
||||
}
|
||||
public static ChartPalette ForBackground(System.Windows.Media.Color background) =>
|
||||
For(Services.ColorMath.Luminance(background) < 0.5 ? ApplicationTheme.Dark : ApplicationTheme.Light);
|
||||
|
||||
/// <summary>A palette from any dictionary carrying the keys (the tests hand in a parsed file).</summary>
|
||||
public static ChartPalette FromDictionary(ResourceDictionary dictionary)
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
using ScottPlot;
|
||||
using ScottPlot.Plottables;
|
||||
|
||||
namespace FrameLedger.App.Charts;
|
||||
|
||||
/// <summary>
|
||||
/// No two series of one chart told apart by colour alone (beta.35, D90; WCAG 2.2 1.4.1): a chart's lines cycle through the
|
||||
/// line patterns, its point series through the marker shapes, its shaded spans through the hatches — as the latency chart
|
||||
/// already drew its average dashed and its 95th percentile dotted. A reader who does not tell the palette's red from its
|
||||
/// green, and a Windows contrast theme with a handful of colours, still tell the series apart. <c>ChartPatternsTests</c>
|
||||
/// reads every chart's legend for two entries that differ by colour only.
|
||||
/// </summary>
|
||||
public static class ChartPatterns
|
||||
{
|
||||
/// <summary>The line patterns, in the order a chart's lines take them.</summary>
|
||||
public static IReadOnlyList<LinePattern> Lines { get; } = [LinePattern.Solid, LinePattern.Dashed, LinePattern.Dotted, LinePattern.DenselyDashed];
|
||||
|
||||
/// <summary>The marker shapes, in the order a chart's point series take them; the fifth and later lines carry one too.</summary>
|
||||
public static IReadOnlyList<MarkerShape> Markers { get; } = [MarkerShape.FilledCircle, MarkerShape.FilledTriangleUp, MarkerShape.FilledSquare, MarkerShape.FilledDiamond, MarkerShape.OpenCircle];
|
||||
|
||||
/// <summary>The pattern of a chart's <paramref name="index"/>th line, and from the fifth on a marker beside it.</summary>
|
||||
public static void Line(Scatter line, int index)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(line);
|
||||
line.LinePattern = Lines[index % Lines.Count];
|
||||
if (index >= Lines.Count)
|
||||
{
|
||||
line.MarkerShape = Markers[(index / Lines.Count - 1) % Markers.Count];
|
||||
line.MarkerSize = 6;
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Line(Scatter, int)"/>
|
||||
public static void Line(SignalXY line, int index)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(line);
|
||||
line.LinePattern = Lines[index % Lines.Count];
|
||||
if (index >= Lines.Count)
|
||||
{
|
||||
line.MarkerShape = Markers[(index / Lines.Count - 1) % Markers.Count];
|
||||
line.MarkerSize = 6;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>The marker of a chart's <paramref name="index"/>th point series.</summary>
|
||||
public static void Points(Scatter points, int index)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(points);
|
||||
points.MarkerShape = Markers[index % Markers.Count];
|
||||
}
|
||||
|
||||
/// <summary>The hatch of a chart's <paramref name="index"/>th kind of shaded span: stripes, then dots, then a checker.</summary>
|
||||
public static IHatch Hatch(int index) => (index % 3) switch
|
||||
{
|
||||
0 => new ScottPlot.Hatches.Striped(),
|
||||
1 => new ScottPlot.Hatches.Dots(),
|
||||
_ => new ScottPlot.Hatches.Checker(),
|
||||
};
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Automation.Peers;
|
||||
using ScottPlot.WPF;
|
||||
|
||||
namespace FrameLedger.App.Charts;
|
||||
|
||||
/// <summary>
|
||||
/// The App's chart (beta.35, D90): ScottPlot's <see cref="WpfPlot"/> with a voice. ScottPlot's control is a Tab stop with no
|
||||
/// automation peer, so a screen reader reached every chart and said nothing. This one is an Image a screen reader names —
|
||||
/// the chart's <c>AutomationProperties.Name</c> — whose help text says where its numbers are written as text and which keys
|
||||
/// move it (<see cref="ChartKeys"/>). Everything else is ScottPlot's: the subclass keeps its default style and its input.
|
||||
/// </summary>
|
||||
public sealed class ChartPlot : WpfPlot
|
||||
{
|
||||
public ChartPlot()
|
||||
{
|
||||
// The keyboard's focus is drawn as on every other control (WPF UI's focus rectangle), not left to ScottPlot's surface.
|
||||
SetResourceReference(FocusVisualStyleProperty, "DefaultControlFocusVisualStyle");
|
||||
}
|
||||
|
||||
protected override AutomationPeer OnCreateAutomationPeer() => new ChartPlotAutomationPeer(this);
|
||||
|
||||
/// <summary>A chart to a screen reader: an image named by the chart, with where its numbers are and its keys as help.</summary>
|
||||
private sealed class ChartPlotAutomationPeer(ChartPlot owner) : FrameworkElementAutomationPeer(owner)
|
||||
{
|
||||
protected override AutomationControlType GetAutomationControlTypeCore() => AutomationControlType.Image;
|
||||
|
||||
protected override string GetLocalizedControlTypeCore() => Strings.A11y_Chart_ControlType;
|
||||
|
||||
protected override string GetClassNameCore() => nameof(ChartPlot);
|
||||
|
||||
protected override string GetHelpTextCore()
|
||||
{
|
||||
string where = AutomationProperties.GetHelpText(Owner);
|
||||
return string.IsNullOrWhiteSpace(where) ? Strings.A11y_Chart_Keys : where + " " + Strings.A11y_Chart_Keys;
|
||||
}
|
||||
|
||||
protected override List<AutomationPeer>? GetChildrenCore() => null;
|
||||
}
|
||||
}
|
||||
@@ -2,8 +2,6 @@
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
using ScottPlot;
|
||||
using ScottPlot.Interactivity;
|
||||
using ScottPlot.Interactivity.UserActionResponses;
|
||||
using ScottPlot.WPF;
|
||||
using Wpf.Ui.Appearance;
|
||||
|
||||
@@ -20,8 +18,8 @@ public static class ChartTheme
|
||||
private static readonly Lock _lock = new();
|
||||
private static bool _subscribed;
|
||||
|
||||
/// <summary>The palette of the theme WPF UI has applied — or, under a Windows contrast theme, of its colours (beta.35, D91).</summary>
|
||||
public static ChartPalette Current => Services.ContrastTheme.Active is { } contrast ? ChartPalette.ForContrast(contrast) : ChartPalette.For(ApplicationThemeManager.GetAppTheme());
|
||||
/// <summary>The palette of the theme WPF UI has applied.</summary>
|
||||
public static ChartPalette Current => ChartPalette.For(ApplicationThemeManager.GetAppTheme());
|
||||
|
||||
/// <summary>Colours one plot for the current theme; the series keep their own palette colours.</summary>
|
||||
public static void Apply(Plot plot)
|
||||
@@ -48,8 +46,7 @@ public static class ChartTheme
|
||||
ArgumentException.ThrowIfNullOrWhiteSpace(path);
|
||||
Color figure = plot.FigureBackground.Color;
|
||||
Color data = plot.DataBackground.Color;
|
||||
Color window = Services.ContrastTheme.Active is { } contrast ? ToScottPlot(contrast.Window)
|
||||
: ApplicationThemeManager.GetAppTheme() == ApplicationTheme.Light ? Color.FromHex("#F3F3F3") : Color.FromHex("#202020");
|
||||
Color window = ApplicationThemeManager.GetAppTheme() == ApplicationTheme.Light ? Color.FromHex("#F3F3F3") : Color.FromHex("#202020");
|
||||
try
|
||||
{
|
||||
plot.FigureBackground.Color = Over(figure, window);
|
||||
@@ -71,12 +68,6 @@ public static class ChartTheme
|
||||
internal static Color TextOn(Color fill)
|
||||
{
|
||||
System.Windows.Media.Color under = ToWpf(fill);
|
||||
if (Services.ContrastTheme.Active is { } contrast)
|
||||
{
|
||||
// beta.35 (D91): under a contrast theme the text is one of its colours too — the one that reads best on the fill.
|
||||
return ToScottPlot(contrast.Colors.MaxBy(c => Services.ColorMath.Contrast(c, under)));
|
||||
}
|
||||
|
||||
return Services.ColorMath.Contrast(System.Windows.Media.Colors.Black, under) >= Services.ColorMath.Contrast(System.Windows.Media.Colors.White, under)
|
||||
? Colors.Black
|
||||
: Colors.White;
|
||||
@@ -85,9 +76,6 @@ public static class ChartTheme
|
||||
/// <summary>A chart colour as WPF's.</summary>
|
||||
internal static System.Windows.Media.Color ToWpf(Color c) => System.Windows.Media.Color.FromArgb(c.A, c.R, c.G, c.B);
|
||||
|
||||
/// <summary>A WPF colour as ScottPlot draws it (a contrast theme's colours, beta.35).</summary>
|
||||
internal static Color ToScottPlot(System.Windows.Media.Color c) => new(c.R, c.G, c.B, c.A);
|
||||
|
||||
/// <summary>Source-over: <paramref name="top"/> composited on an opaque <paramref name="under"/>.</summary>
|
||||
internal static Color Over(Color top, Color under)
|
||||
{
|
||||
@@ -106,8 +94,6 @@ public static class ChartTheme
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(control);
|
||||
ChartWheel.Attach(control);
|
||||
ChartKeys.Attach(control);
|
||||
ResetOnDoubleClick(control);
|
||||
lock (_lock)
|
||||
{
|
||||
_live.RemoveAll(static w => !w.TryGetTarget(out _));
|
||||
@@ -122,24 +108,6 @@ public static class ChartTheme
|
||||
Apply(control.Plot);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// beta.35 (D90): a double-click shows all of the chart, as the guide always said. ScottPlot's left double-click toggled
|
||||
/// its render-time overlay — a developer's benchmark — and A and a middle click were the only ways back.
|
||||
/// </summary>
|
||||
internal static void ResetOnDoubleClick(WpfPlot control)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(control);
|
||||
control.UserInputProcessor.DoubleLeftClickBenchmark(false);
|
||||
if (!control.UserInputProcessor.UserActionResponses.OfType<DoubleClickResponse>().Any())
|
||||
{
|
||||
control.UserInputProcessor.UserActionResponses.Add(new DoubleClickResponse(StandardMouseButtons.Left, static (plotControl, _) =>
|
||||
{
|
||||
plotControl.Plot.Axes.AutoScale();
|
||||
plotControl.Refresh();
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
private static void OnThemeChanged(ApplicationTheme theme, System.Windows.Media.Color accent)
|
||||
{
|
||||
WpfPlot[] plots;
|
||||
|
||||
@@ -4,9 +4,8 @@
|
||||
<UserControl x:Class="FrameLedger.App.Charts.CompareChart"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:charts="clr-namespace:FrameLedger.App.Charts"
|
||||
xmlns:res="clr-namespace:FrameLedger.App"
|
||||
xmlns:sp="clr-namespace:ScottPlot.WPF;assembly=ScottPlot.WPF"
|
||||
MinHeight="300">
|
||||
<!-- 08_UI §Compare: overlaid percentile curves; the tier legend is stamped on the plot when tiers are mixed (FR-6.2). -->
|
||||
<charts:ChartPlot x:Name="Plot" AutomationProperties.Name="{x:Static res:Strings.A11y_Chart_Compare}" AutomationProperties.HelpText="{x:Static res:Strings.A11y_ChartData_Compare}" />
|
||||
<sp:WpfPlot x:Name="Plot" />
|
||||
</UserControl>
|
||||
@@ -42,7 +42,6 @@ public partial class CompareChart : UserControl
|
||||
Scatter line = plot.Add.ScatterLine(curve.Xs, curve.Ys, palette[DrawnCurves % palette.Length]);
|
||||
line.LineWidth = 2;
|
||||
line.LegendText = curve.Label;
|
||||
ChartPatterns.Line(line, DrawnCurves); // beta.35 (D90): five sessions, five patterns — never colour alone
|
||||
DrawnCurves++;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
|
||||
xmlns:charts="clr-namespace:FrameLedger.App.Charts"
|
||||
xmlns:res="clr-namespace:FrameLedger.App"
|
||||
xmlns:sp="clr-namespace:ScottPlot.WPF;assembly=ScottPlot.WPF"
|
||||
MinHeight="240">
|
||||
<!-- FR-5.1: the FPS histogram and the percentile curve, side by side; the note says what the histogram's range left out (beta.8). -->
|
||||
<Grid>
|
||||
@@ -19,8 +18,8 @@
|
||||
<ColumnDefinition Width="12" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<charts:ChartPlot x:Name="Histogram" AutomationProperties.Name="{x:Static res:Strings.A11y_Chart_Histogram}" AutomationProperties.HelpText="{x:Static res:Strings.A11y_ChartData_Summary}" Grid.Column="0" />
|
||||
<charts:ChartPlot x:Name="Percentiles" AutomationProperties.Name="{x:Static res:Strings.A11y_Chart_Percentiles}" AutomationProperties.HelpText="{x:Static res:Strings.A11y_ChartData_Summary}" Grid.Column="2" />
|
||||
<sp:WpfPlot x:Name="Histogram" Grid.Column="0" />
|
||||
<sp:WpfPlot x:Name="Percentiles" Grid.Column="2" />
|
||||
<ui:TextBlock x:Name="Note" Grid.Row="1" Grid.ColumnSpan="3" Margin="0,4,0,0" Style="{StaticResource TertiaryText}" TextWrapping="Wrap" Visibility="Collapsed" />
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -94,7 +94,6 @@ public partial class DistributionChart : UserControl
|
||||
Scatter low = plot.Add.ScatterPoints(new[] { x }, new[] { fps }, ChartTheme.Current.Stutter);
|
||||
low.MarkerSize = 7;
|
||||
low.LegendText = pointOne ? Strings.Summary_Stat_P01Low : Strings.Summary_Stat_P1Low;
|
||||
ChartPatterns.Points(low, pointOne ? 2 : 0); // beta.35 (D90): the 1% low a circle, the 0.1% low a square
|
||||
}
|
||||
|
||||
// The axis is 0–100 whatever the curve covers: AutoScale first, then the X limits (AutoScale afterwards undid them).
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
|
||||
xmlns:charts="clr-namespace:FrameLedger.App.Charts"
|
||||
xmlns:res="clr-namespace:FrameLedger.App"
|
||||
xmlns:sp="clr-namespace:ScottPlot.WPF;assembly=ScottPlot.WPF"
|
||||
MinHeight="260">
|
||||
<!-- 08_UI §Session summary / FR-5.1: the frametime timeline, min/max decimated (FR-5.3); zoom and pan are ScottPlot's —
|
||||
zoom with Ctrl+wheel since beta.14, a plain wheel scrolls the page (ChartWheel).
|
||||
@@ -17,6 +16,6 @@
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<ui:TextBlock x:Name="Note" Grid.Row="0" Margin="0,0,0,4" Style="{StaticResource TertiaryText}" TextWrapping="Wrap" Visibility="Collapsed" />
|
||||
<charts:ChartPlot x:Name="Plot" AutomationProperties.Name="{x:Static res:Strings.A11y_Chart_Frametime}" AutomationProperties.HelpText="{x:Static res:Strings.A11y_ChartData_Summary}" Grid.Row="1" />
|
||||
<sp:WpfPlot x:Name="Plot" Grid.Row="1" />
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -115,7 +115,7 @@ public partial class FrametimeChart : UserControl
|
||||
DrawPresents(plot, p);
|
||||
}
|
||||
|
||||
DrawSeries(plot, _series.AppTimesS, _series.AppFrameTimesMs, p.Native, generating ? Strings.Chart_Series_AppFrames : Strings.Chart_Series_Presents, 0);
|
||||
DrawSeries(plot, _series.AppTimesS, _series.AppFrameTimesMs, p.Native, generating ? Strings.Chart_Series_AppFrames : Strings.Chart_Series_Presents);
|
||||
DrawStutter(plot, p);
|
||||
if (_sensors && _series.SensorsAligned)
|
||||
{
|
||||
@@ -128,7 +128,7 @@ public partial class FrametimeChart : UserControl
|
||||
Plot.Refresh();
|
||||
}
|
||||
|
||||
private void DrawSeries(ScottPlot.Plot plot, double[] xs, double[] ys, Color color, string label, int index)
|
||||
private void DrawSeries(ScottPlot.Plot plot, double[] xs, double[] ys, Color color, string label)
|
||||
{
|
||||
if (xs.Length == 0)
|
||||
{
|
||||
@@ -140,7 +140,6 @@ public partial class FrametimeChart : UserControl
|
||||
SignalXY line = plot.Add.SignalXY(dx, dy, color);
|
||||
line.LineWidth = 1;
|
||||
line.LegendText = label;
|
||||
ChartPatterns.Line(line, index); // beta.35 (D90): the frames solid, the displayed ones dashed
|
||||
}
|
||||
|
||||
/// <summary>Every present but those after a gap, whose stored interval is 0 — not a frame, and it was drawn as a 0 ms one.</summary>
|
||||
@@ -148,7 +147,7 @@ public partial class FrametimeChart : UserControl
|
||||
{
|
||||
// beta.23: the decoded series carries the line (SeriesDigest), so the Displayed toggle no longer walks every present.
|
||||
(double[] xs, double[] ys) = _series!.Digest?.Presents ?? SeriesDigest.PresentsWithoutGaps(_series.TimesS, _series.FrameTimesMs, _series.Gap);
|
||||
DrawSeries(plot, xs, ys, p.Displayed, Strings.Chart_Series_Displayed, 1);
|
||||
DrawSeries(plot, xs, ys, p.Displayed, Strings.Chart_Series_Displayed);
|
||||
}
|
||||
|
||||
private void DrawStutter(ScottPlot.Plot plot, ChartPalette p)
|
||||
@@ -175,11 +174,11 @@ public partial class FrametimeChart : UserControl
|
||||
(pso ? psoYs : ys).Add(_series.AppFrameTimesMs[i]);
|
||||
}
|
||||
|
||||
AddMarkers(plot, xs, ys, p.Stutter, Strings.Chart_Series_Stutter, 0);
|
||||
AddMarkers(plot, psoXs, psoYs, p.StutterPso, Strings.Chart_Series_StutterPso, 1);
|
||||
AddMarkers(plot, xs, ys, p.Stutter, Strings.Chart_Series_Stutter);
|
||||
AddMarkers(plot, psoXs, psoYs, p.StutterPso, Strings.Chart_Series_StutterPso);
|
||||
}
|
||||
|
||||
private void AddMarkers(ScottPlot.Plot plot, List<double> xs, List<double> ys, Color color, string label, int index)
|
||||
private void AddMarkers(ScottPlot.Plot plot, List<double> xs, List<double> ys, Color color, string label)
|
||||
{
|
||||
if (xs.Count == 0)
|
||||
{
|
||||
@@ -192,7 +191,6 @@ public partial class FrametimeChart : UserControl
|
||||
markers.LineWidth = 0;
|
||||
markers.MarkerSize = 5;
|
||||
markers.LegendText = label;
|
||||
ChartPatterns.Points(markers, index); // beta.35 (D90): a stutter a circle, a shader-compile stutter a triangle
|
||||
}
|
||||
|
||||
private void DrawSegments(ScottPlot.Plot plot, ChartPalette p)
|
||||
|
||||
@@ -4,9 +4,8 @@
|
||||
<UserControl x:Class="FrameLedger.App.Charts.LatencyChart"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:charts="clr-namespace:FrameLedger.App.Charts"
|
||||
xmlns:res="clr-namespace:FrameLedger.App"
|
||||
xmlns:sp="clr-namespace:ScottPlot.WPF;assembly=ScottPlot.WPF"
|
||||
MinHeight="240">
|
||||
<!-- 08_UI §Games › Latency (Tier 1 + Reflex only): the PC latency timeline with the stored avg / p95 lines. -->
|
||||
<charts:ChartPlot x:Name="Plot" AutomationProperties.Name="{x:Static res:Strings.A11y_Chart_Latency}" AutomationProperties.HelpText="{x:Static res:Strings.A11y_ChartData_Latency}" />
|
||||
<sp:WpfPlot x:Name="Plot" />
|
||||
</UserControl>
|
||||
@@ -6,11 +6,11 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
|
||||
xmlns:res="clr-namespace:FrameLedger.App"
|
||||
xmlns:charts="clr-namespace:FrameLedger.App.Charts">
|
||||
xmlns:sp="clr-namespace:ScottPlot.WPF;assembly=ScottPlot.WPF">
|
||||
<!-- 08_UI §Session summary (beta.14, D49): the render scale over the session, as steps; a line saying it was not measured
|
||||
where the upscaler's parameters never were. -->
|
||||
<Grid>
|
||||
<charts:ChartPlot x:Name="Plot" AutomationProperties.Name="{x:Static res:Strings.A11y_Chart_RenderScale}" AutomationProperties.HelpText="{x:Static res:Strings.A11y_ChartData_Summary}" />
|
||||
<sp:WpfPlot x:Name="Plot" />
|
||||
<ui:TextBlock x:Name="NotMeasured" Style="{StaticResource SecondaryText}" TextWrapping="Wrap" VerticalAlignment="Center" HorizontalAlignment="Center"
|
||||
Text="{x:Static res:Strings.Chart_RenderScale_NotMeasured}" Visibility="Collapsed" />
|
||||
</Grid>
|
||||
|
||||
@@ -6,21 +6,21 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
|
||||
xmlns:res="clr-namespace:FrameLedger.App"
|
||||
xmlns:charts="clr-namespace:FrameLedger.App.Charts">
|
||||
xmlns:sp="clr-namespace:ScottPlot.WPF;assembly=ScottPlot.WPF">
|
||||
<!-- 08_UI §Games › Sensors: temperatures / load / power; then video memory and memory, each with THIS GAME's own figure
|
||||
and the whole graphics card's / whole PC's as SEPARATE, differently-labelled series (beta.12, D43). -->
|
||||
<StackPanel>
|
||||
<ui:TextBlock FontTypography="BodyStrong" Text="{x:Static res:Strings.Sensors_Temps_Header}" />
|
||||
<charts:ChartPlot x:Name="Temps" AutomationProperties.Name="{x:Static res:Strings.A11y_Chart_Temps}" AutomationProperties.HelpText="{x:Static res:Strings.A11y_ChartData_Summary}" Height="240" Margin="0,6,0,0" />
|
||||
<sp:WpfPlot x:Name="Temps" Height="240" Margin="0,6,0,0" />
|
||||
<ui:TextBlock Margin="0,12,0,0" FontTypography="BodyStrong" Text="{x:Static res:Strings.Sensors_Vram_Header}" />
|
||||
<charts:ChartPlot x:Name="Vram" AutomationProperties.Name="{x:Static res:Strings.A11y_Chart_Vram}" AutomationProperties.HelpText="{x:Static res:Strings.A11y_ChartData_Summary}" Height="220" Margin="0,6,0,0" />
|
||||
<sp:WpfPlot x:Name="Vram" Height="220" Margin="0,6,0,0" />
|
||||
<ui:TextBlock Margin="0,12,0,0" FontTypography="BodyStrong" Text="{x:Static res:Strings.Sensors_Ram_Header}" />
|
||||
<charts:ChartPlot x:Name="Ram" AutomationProperties.Name="{x:Static res:Strings.A11y_Chart_Ram}" AutomationProperties.HelpText="{x:Static res:Strings.A11y_ChartData_Summary}" Height="220" Margin="0,6,0,0" />
|
||||
<sp:WpfPlot x:Name="Ram" Height="220" Margin="0,6,0,0" />
|
||||
<!-- beta.14 (D49): the card's clocks (MHz) and fan (RPM, right axis), with the ticks its power limit or heat held it
|
||||
back shaded. Collapsed when the session stored none of them. -->
|
||||
<StackPanel x:Name="ClocksSection">
|
||||
<ui:TextBlock Margin="0,12,0,0" FontTypography="BodyStrong" Text="{x:Static res:Strings.Sensors_Clocks_Header}" />
|
||||
<charts:ChartPlot x:Name="Clocks" AutomationProperties.Name="{x:Static res:Strings.A11y_Chart_Clocks}" AutomationProperties.HelpText="{x:Static res:Strings.A11y_ChartData_Summary}" Height="220" Margin="0,6,0,0" />
|
||||
<sp:WpfPlot x:Name="Clocks" Height="220" Margin="0,6,0,0" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
@@ -153,9 +153,6 @@ public partial class SensorsChart : UserControl
|
||||
{
|
||||
VerticalSpan span = plot.Add.VerticalSpan(from, to, color.WithAlpha(0.18));
|
||||
span.LineWidth = 0;
|
||||
// beta.35 (D90): the power limit striped, the thermal limit dotted — they were red and orange shading only.
|
||||
span.FillHatch = ChartPatterns.Hatch(string.Equals(name, SensorSeriesCatalog.GpuPowerLimit, StringComparison.Ordinal) ? 0 : 1);
|
||||
span.FillHatchColor = color.WithAlpha(0.55);
|
||||
if (drawn++ == 0)
|
||||
{
|
||||
span.LegendText = label;
|
||||
@@ -281,8 +278,6 @@ public partial class SensorsChart : UserControl
|
||||
Scatter line = plot.Add.ScatterLine(xs, ys, color);
|
||||
line.LineWidth = 1;
|
||||
line.LegendText = label;
|
||||
// beta.35 (D90): the plot's lines in turn take the patterns — the GPU's temperature and its hot spot were green and red.
|
||||
ChartPatterns.Line(line, plot.GetPlottables().OfType<Scatter>().Count() - 1);
|
||||
if (axis is not null)
|
||||
{
|
||||
line.Axes.YAxis = axis;
|
||||
|
||||
@@ -4,9 +4,8 @@
|
||||
<UserControl x:Class="FrameLedger.App.Charts.TrendChart"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:charts="clr-namespace:FrameLedger.App.Charts"
|
||||
xmlns:res="clr-namespace:FrameLedger.App"
|
||||
xmlns:sp="clr-namespace:ScottPlot.WPF;assembly=ScottPlot.WPF"
|
||||
MinHeight="260">
|
||||
<!-- 08_UI §Games › Trend: the metric over date with hardware-change markers (FR-6.3). -->
|
||||
<charts:ChartPlot x:Name="Plot" AutomationProperties.Name="{x:Static res:Strings.A11y_Chart_Trend}" AutomationProperties.HelpText="{x:Static res:Strings.A11y_ChartData_Sessions}" />
|
||||
<sp:WpfPlot x:Name="Plot" />
|
||||
</UserControl>
|
||||
@@ -146,7 +146,7 @@ public partial class TrendChart : UserControl
|
||||
continue;
|
||||
}
|
||||
|
||||
hollow += AddLine(plot, line, palette[i % palette.Length], p.Data, isRight, i);
|
||||
hollow += AddLine(plot, line, palette[i % palette.Length], p.Data, isRight);
|
||||
onRight += isRight ? 1 : 0;
|
||||
drawn.AddRange(line.Points);
|
||||
}
|
||||
@@ -171,7 +171,7 @@ public partial class TrendChart : UserControl
|
||||
}
|
||||
|
||||
/// <summary>One line, its hollow points, against the left or the right axis; how many were hollow.</summary>
|
||||
private static int AddLine(ScottPlot.Plot plot, TrendLine line, Color color, Color hollowColor, bool isRight, int index)
|
||||
private static int AddLine(ScottPlot.Plot plot, TrendLine line, Color color, Color hollowColor, bool isRight)
|
||||
{
|
||||
double[] xs = [.. line.Points.Select(static t => t.At.LocalDateTime.ToOADate())];
|
||||
double[] ys = [.. line.Points.Select(static t => t.Value)];
|
||||
@@ -179,9 +179,6 @@ public partial class TrendChart : UserControl
|
||||
scatter.LineWidth = 2;
|
||||
scatter.MarkerSize = 7;
|
||||
scatter.LegendText = isRight ? line.Label + " ▸" : line.Label;
|
||||
// beta.35 (D90): each metric its own pattern and, since every trend line shows its points, its own marker
|
||||
ChartPatterns.Line(scatter, index);
|
||||
ChartPatterns.Points(scatter, index);
|
||||
if (isRight)
|
||||
{
|
||||
scatter.Axes.YAxis = plot.Axes.Right;
|
||||
|
||||
@@ -96,7 +96,7 @@ public static class ArtTint
|
||||
return;
|
||||
}
|
||||
|
||||
if (GetColor(band) is { } dominant && !SystemParameters.HighContrast && Services.ContrastTheme.Active is null && BandColour(band, dominant) is { } colour)
|
||||
if (GetColor(band) is { } dominant && !SystemParameters.HighContrast && BandColour(band, dominant) is { } colour)
|
||||
{
|
||||
var brush = new SolidColorBrush(colour);
|
||||
brush.Freeze();
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace FrameLedger.App.Controls;
|
||||
|
||||
/// <summary>
|
||||
/// beta.35 (D88): the words a screen reader reads for a template column's cells. A <c>DataGridTemplateColumn</c>'s cell has no
|
||||
/// text of its own — its template draws it — so WPF names it <c>Item: FrameLedger.App.ViewModels.SessionItemViewModel, Column
|
||||
/// Display Index: 3</c>. Set on the column, <see cref="PathProperty"/> gives every cell of it the row's text at that path as its
|
||||
/// name, through a cell style based on WPF UI's own (<c>DefaultDataGridCellStyle</c>, the one its DataGrid gives every cell), so
|
||||
/// the cells look as they did.
|
||||
/// </summary>
|
||||
public static class CellName
|
||||
{
|
||||
/// <summary>The key of WPF UI 4.3.0's cell style, which its DataGrid sets as <c>CellStyle</c>.</summary>
|
||||
public const string WpfUiCellStyleKey = "DefaultDataGridCellStyle";
|
||||
|
||||
public static readonly DependencyProperty PathProperty = DependencyProperty.RegisterAttached(
|
||||
"Path", typeof(string), typeof(CellName), new PropertyMetadata(null, OnPathChanged));
|
||||
|
||||
public static string? GetPath(DataGridColumn column)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(column);
|
||||
return (string?)column.GetValue(PathProperty);
|
||||
}
|
||||
|
||||
public static void SetPath(DataGridColumn column, string? value)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(column);
|
||||
column.SetValue(PathProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The cell style that names a cell by the row's text at <paramref name="path"/>, based on <paramref name="basedOn"/>. An
|
||||
/// empty text is read as the word for empty: a cell WPF finds no text in is named by its fallback again.
|
||||
/// </summary>
|
||||
public static Style Named(string path, Style? basedOn)
|
||||
{
|
||||
ArgumentException.ThrowIfNullOrWhiteSpace(path);
|
||||
var style = new Style(typeof(DataGridCell), basedOn);
|
||||
style.Setters.Add(new Setter(AutomationProperties.NameProperty, new Binding(path) { Mode = BindingMode.OneWay, Converter = SaysEmpty.Instance }));
|
||||
return style;
|
||||
}
|
||||
|
||||
/// <summary>A cell's text, or the word for empty when there is none.</summary>
|
||||
public static string Spoken(object? value) => value?.ToString() is { } text && !string.IsNullOrWhiteSpace(text) ? text : Strings.A11y_Empty;
|
||||
|
||||
private sealed class SaysEmpty : IValueConverter
|
||||
{
|
||||
public static readonly SaysEmpty Instance = new();
|
||||
|
||||
public object Convert(object? value, Type targetType, object? parameter, System.Globalization.CultureInfo culture) => Spoken(value);
|
||||
|
||||
public object ConvertBack(object? value, Type targetType, object? parameter, System.Globalization.CultureInfo culture) => Binding.DoNothing;
|
||||
}
|
||||
|
||||
private static void OnPathChanged(DependencyObject element, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
if (element is DataGridColumn column && e.NewValue is string { Length: > 0 } path)
|
||||
{
|
||||
column.CellStyle = Named(path, column.CellStyle ?? System.Windows.Application.Current?.TryFindResource(WpfUiCellStyleKey) as Style);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
using System.Globalization;
|
||||
using System.Windows;
|
||||
using System.Windows.Automation.Peers;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Media;
|
||||
using FrameLedger.App.Charts;
|
||||
@@ -42,10 +40,6 @@ public sealed class ChangeBadge : Control
|
||||
set => SetValue(TextProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>beta.35 (D88): the badge in words — "Change 1" — the number that links the row to the chart's badge.</summary>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Performance", "CA1863:Use 'CompositeFormat'", Justification = "the format string is a resource that follows the UI culture, which changes at runtime")]
|
||||
protected override AutomationPeer OnCreateAutomationPeer() => new SpokenTextAutomationPeer(this, () => string.Format(CultureInfo.CurrentCulture, Strings.A11y_Change_Format, Text));
|
||||
|
||||
/// <summary>The palette for the theme the element's resources hold now; the applied theme's when none is reachable.</summary>
|
||||
internal ChartPalette Palette() => GetValue(_themeProperty) is Color background ? ChartPalette.ForBackground(background) : ChartTheme.Current;
|
||||
|
||||
|
||||
@@ -1,101 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Globalization;
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
|
||||
namespace FrameLedger.App.Controls;
|
||||
|
||||
/// <summary>
|
||||
/// beta.35 (D88): WPF UI 4.3.0's <c>CardExpander</c> draws its expand button, the template part <c>ExpanderToggleButton</c>,
|
||||
/// apart from its header and with no name, so a screen reader reached a Tab stop it could only call "toggle button". Set on
|
||||
/// every CardExpander by the App's implicit style, this names that button after the header — its text, or the first line of
|
||||
/// text a composed header shows — once the template exists.
|
||||
/// </summary>
|
||||
[SuppressMessage("Performance", "CA1863:Use 'CompositeFormat'", Justification = "the format string is a resource that follows the UI culture, which changes at runtime")]
|
||||
public static class ExpanderToggleName
|
||||
{
|
||||
/// <summary>The template part WPF UI's CardExpander template names its expand button.</summary>
|
||||
public const string PartName = "ExpanderToggleButton";
|
||||
|
||||
public static readonly DependencyProperty IsEnabledProperty = DependencyProperty.RegisterAttached(
|
||||
"IsEnabled", typeof(bool), typeof(ExpanderToggleName), new PropertyMetadata(false, OnIsEnabledChanged));
|
||||
|
||||
public static bool GetIsEnabled(DependencyObject element)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(element);
|
||||
return (bool)element.GetValue(IsEnabledProperty);
|
||||
}
|
||||
|
||||
public static void SetIsEnabled(DependencyObject element, bool value)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(element);
|
||||
element.SetValue(IsEnabledProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>The words for an expander's header: the text itself, or the first non-empty text a composed header holds.</summary>
|
||||
public static string? HeaderText(object? header) => header switch
|
||||
{
|
||||
string text when !string.IsNullOrWhiteSpace(text) => text,
|
||||
DependencyObject element => FirstText(element),
|
||||
_ => null,
|
||||
};
|
||||
|
||||
/// <summary>Names the expander's button now, if its template has been applied; false while it has not.</summary>
|
||||
public static bool TryName(Control expander)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(expander);
|
||||
if (expander.Template?.FindName(PartName, expander) is not ToggleButton toggle)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (HeaderText((expander as HeaderedContentControl)?.Header) is { } header)
|
||||
{
|
||||
AutomationProperties.SetName(toggle, string.Format(CultureInfo.CurrentCulture, Strings.A11y_ToggleSection_Format, header));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private static void OnIsEnabledChanged(DependencyObject element, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
if (element is not Control expander || e.NewValue is not true || TryName(expander))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// The template is applied in the first measure; name the button after the first layout that made it.
|
||||
void OnLayoutUpdated(object? sender, EventArgs args)
|
||||
{
|
||||
if (TryName(expander))
|
||||
{
|
||||
expander.LayoutUpdated -= OnLayoutUpdated;
|
||||
}
|
||||
}
|
||||
|
||||
expander.LayoutUpdated += OnLayoutUpdated;
|
||||
}
|
||||
|
||||
private static string? FirstText(DependencyObject root)
|
||||
{
|
||||
if (root is TextBlock { Text.Length: > 0 } text)
|
||||
{
|
||||
return text.Text;
|
||||
}
|
||||
|
||||
foreach (object child in LogicalTreeHelper.GetChildren(root))
|
||||
{
|
||||
if (child is DependencyObject element && FirstText(element) is { } found)
|
||||
{
|
||||
return found;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ui:TextBlock Grid.Row="0" FontTypography="Title" AutomationProperties.HeadingLevel="Level1" Text="{Binding ViewModel.StepText}" />
|
||||
<ui:TextBlock Grid.Row="0" FontTypography="Title" Text="{Binding ViewModel.StepText}" />
|
||||
|
||||
<!-- Step 1: the Legal Gate. -->
|
||||
<Grid Grid.Row="1" Margin="0,12,0,0" Visibility="{Binding ViewModel.IsLegalStep, Converter={StaticResource BoolToVis}}">
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
using System.Windows;
|
||||
using System.Windows.Automation.Peers;
|
||||
using System.Windows.Controls;
|
||||
using FrameLedger.App.Services;
|
||||
|
||||
@@ -26,7 +25,4 @@ public sealed class FpsReadout : Control
|
||||
get => (FpsReadoutModel)GetValue(ModelProperty);
|
||||
set => SetValue(ModelProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>beta.35 (D88): the readout in words — Native, Displayed and the factor together (rule 6) — and the tooltip's text as help.</summary>
|
||||
protected override AutomationPeer OnCreateAutomationPeer() => new SpokenTextAutomationPeer(this, () => Model?.SpokenText, () => Model?.QualifierTooltip);
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
using System.Windows;
|
||||
using System.Windows.Automation.Peers;
|
||||
|
||||
namespace FrameLedger.App.Controls;
|
||||
|
||||
/// <summary>
|
||||
/// The voice of a control that only shows something (beta.35, D88) — the FPS readout, a ray-tracing chip, a change badge.
|
||||
/// A plain <c>Control</c> has no automation peer, and WPF hides the text in its template from the control view, so a
|
||||
/// screen reader was given nothing for these. This peer is a Text element named by what the control says in words, with
|
||||
/// no children, so the template's pieces are not read a second time.
|
||||
/// </summary>
|
||||
/// <param name="owner">The control.</param>
|
||||
/// <param name="name">Its words, read when the screen reader asks; the control's own <c>AutomationProperties.Name</c> wins.</param>
|
||||
/// <param name="help">More words, where the eye has a tooltip; optional.</param>
|
||||
public sealed class SpokenTextAutomationPeer(FrameworkElement owner, Func<string?> name, Func<string?>? help = null) : FrameworkElementAutomationPeer(owner)
|
||||
{
|
||||
protected override AutomationControlType GetAutomationControlTypeCore() => AutomationControlType.Text;
|
||||
|
||||
protected override string GetClassNameCore() => Owner.GetType().Name;
|
||||
|
||||
protected override string GetNameCore()
|
||||
{
|
||||
string own = base.GetNameCore();
|
||||
return own.Length > 0 ? own : name() ?? string.Empty;
|
||||
}
|
||||
|
||||
protected override string GetHelpTextCore()
|
||||
{
|
||||
string own = base.GetHelpTextCore();
|
||||
return own.Length > 0 ? own : help?.Invoke() ?? string.Empty;
|
||||
}
|
||||
|
||||
protected override List<AutomationPeer>? GetChildrenCore() => null;
|
||||
}
|
||||
@@ -2,7 +2,6 @@
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
using System.Windows;
|
||||
using System.Windows.Automation.Peers;
|
||||
using System.Windows.Controls;
|
||||
using FrameLedger.App.ViewModels;
|
||||
|
||||
@@ -25,7 +24,4 @@ public sealed class TriStateChip : Control
|
||||
get => (TriStateChipModel?)GetValue(ModelProperty);
|
||||
set => SetValue(ModelProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>beta.35 (D88): the chip in words, with where its value came from — the tooltip's to the eye.</summary>
|
||||
protected override AutomationPeer OnCreateAutomationPeer() => new SpokenTextAutomationPeer(this, () => Model?.AccessibleName);
|
||||
}
|
||||
@@ -63,7 +63,7 @@
|
||||
<DockPanel Margin="0,12,0,0">
|
||||
<ui:ProgressRing Width="16" Height="16" Margin="0,0,8,0" DockPanel.Dock="Left" IsIndeterminate="True"
|
||||
Visibility="{Binding IsBusy, Converter={StaticResource BoolToVis}}" />
|
||||
<ui:TextBlock MaxWidth="680" HorizontalAlignment="Left" Text="{Binding Status}" TextWrapping="Wrap" />
|
||||
<ui:TextBlock MaxWidth="680" HorizontalAlignment="Left" AutomationProperties.LiveSetting="Polite" Text="{Binding Status}" TextWrapping="Wrap" />
|
||||
</DockPanel>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
@@ -6,7 +6,6 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
|
||||
xmlns:vm="clr-namespace:FrameLedger.App.ViewModels"
|
||||
xmlns:controls="clr-namespace:FrameLedger.App.Controls"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
d:DataContext="{d:DesignInstance Type=vm:ImportReviewViewModel}"
|
||||
@@ -42,14 +41,14 @@
|
||||
<DataGrid.RowStyle>
|
||||
<Style TargetType="DataGridRow" BasedOn="{StaticResource DefaultDataGridRowStyle}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsDimmed}" Value="True">
|
||||
<DataTrigger Binding="{Binding IsExisting}" Value="True">
|
||||
<Setter Property="Opacity" Value="0.55" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</DataGrid.RowStyle>
|
||||
<DataGrid.Columns>
|
||||
<DataGridTemplateColumn Width="40" controls:CellName.Path="Name">
|
||||
<DataGridTemplateColumn Width="40">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<CheckBox MinWidth="0" Padding="0" HorizontalAlignment="Center" IsEnabled="{Binding CanImport}"
|
||||
@@ -61,7 +60,7 @@
|
||||
<DataGridTextColumn Header="{x:Static vm:ImportReviewViewModel.ColumnPlatform}" Binding="{Binding PlatformText}" IsReadOnly="True" Width="Auto" />
|
||||
<DataGridTextColumn Header="{x:Static vm:ImportReviewViewModel.ColumnName}" Binding="{Binding Name}" IsReadOnly="True" Width="2*" />
|
||||
<DataGridTextColumn Header="{x:Static vm:ImportReviewViewModel.ColumnExe}" Binding="{Binding ExeText}" IsReadOnly="True" Width="3*" />
|
||||
<DataGridTextColumn Header="{x:Static vm:ImportReviewViewModel.ColumnNote}" Binding="{Binding Note}" IsReadOnly="True" Width="Auto" controls:CellName.Path="Note" />
|
||||
<DataGridTextColumn Header="{x:Static vm:ImportReviewViewModel.ColumnNote}" Binding="{Binding Note}" IsReadOnly="True" Width="Auto" />
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
<DockPanel Grid.Row="3">
|
||||
|
||||
@@ -53,10 +53,10 @@
|
||||
Content="{x:Static res:Strings.Alpha_Badge}"
|
||||
ToolTip="{Binding ViewModel.AlphaBadgeTooltip}"
|
||||
Visibility="{Binding ViewModel.IsAlpha, Mode=OneTime, Converter={StaticResource BoolToVis}}" />
|
||||
<!-- beta.35: the theme's own fills under its text, never WPF UI's palette badge (Styles/FrameLedger.xaml, AgentPill). -->
|
||||
<Border DataContext="{Binding ViewModel}" Style="{StaticResource AgentPill}">
|
||||
<TextBlock Foreground="{DynamicResource TextFillColorPrimaryBrush}" Text="{Binding AgentStatusText}" />
|
||||
</Border>
|
||||
<ui:Badge Margin="0,0,12,0"
|
||||
VerticalAlignment="Center"
|
||||
Appearance="{Binding ViewModel.AgentStatusAppearance}"
|
||||
Content="{Binding ViewModel.AgentStatusText}" />
|
||||
</StackPanel>
|
||||
</ui:TitleBar.TrailingContent>
|
||||
</ui:TitleBar>
|
||||
@@ -155,7 +155,6 @@
|
||||
Severity="{Binding Severity}"
|
||||
Title="{Binding Title}">
|
||||
<ui:Button Appearance="Secondary"
|
||||
AutomationProperties.HelpText="{Binding AccessibleName}"
|
||||
Command="{Binding DataContext.ViewModel.DismissNoticeCommand, RelativeSource={RelativeSource AncestorType=Window}}"
|
||||
CommandParameter="{Binding}"
|
||||
Content="{Binding ActionText}" />
|
||||
@@ -194,6 +193,6 @@
|
||||
</ui:NavigationView>
|
||||
|
||||
<ui:SnackbarPresenter x:Name="SnackbarPresenter" Grid.Row="3" VerticalAlignment="Bottom" />
|
||||
<ui:ContentDialogHost x:Name="DialogHost" Grid.Row="3" Focusable="False" />
|
||||
<ui:ContentDialogHost x:Name="DialogHost" Grid.Row="3" />
|
||||
</Grid>
|
||||
</ui:FluentWindow>
|
||||
@@ -2,7 +2,6 @@
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
using System.Windows.Threading;
|
||||
using FrameLedger.App.Services;
|
||||
using FrameLedger.App.ViewModels;
|
||||
@@ -20,8 +19,6 @@ namespace FrameLedger.App;
|
||||
/// </summary>
|
||||
public partial class MainWindow : FluentWindow
|
||||
{
|
||||
private readonly PageMotion _motion;
|
||||
|
||||
public MainWindow(
|
||||
MainWindowViewModel viewModel,
|
||||
INavigationService navigation,
|
||||
@@ -29,8 +26,7 @@ public partial class MainWindow : FluentWindow
|
||||
IContentDialogService dialogs,
|
||||
INavigationViewPageProvider pages,
|
||||
IThemeApplier theme,
|
||||
AppearanceSettings appearance,
|
||||
PageFocus pageFocus)
|
||||
AppearanceSettings appearance)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(navigation);
|
||||
ArgumentNullException.ThrowIfNull(snackbar);
|
||||
@@ -38,7 +34,6 @@ public partial class MainWindow : FluentWindow
|
||||
ArgumentNullException.ThrowIfNull(pages);
|
||||
ArgumentNullException.ThrowIfNull(theme);
|
||||
ArgumentNullException.ThrowIfNull(appearance);
|
||||
ArgumentNullException.ThrowIfNull(pageFocus);
|
||||
|
||||
ViewModel = viewModel ?? throw new ArgumentNullException(nameof(viewModel));
|
||||
DataContext = this;
|
||||
@@ -60,17 +55,6 @@ public partial class MainWindow : FluentWindow
|
||||
|
||||
Loaded += (_, _) => theme.Apply(appearance.Theme, this);
|
||||
TimeNavigations();
|
||||
|
||||
// beta.35: a page slides in only while Windows' animation effects are on, followed while the window lives; and the
|
||||
// page a shortcut opens takes the keyboard (PageFocus) — the shell says which page is shown after every navigation.
|
||||
_motion = PageMotion.Follow(RootNavigation);
|
||||
RootNavigation.Navigated += (_, e) =>
|
||||
{
|
||||
if (e.Page is FrameworkElement page)
|
||||
{
|
||||
pageFocus.Shown(page);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -94,10 +78,4 @@ public partial class MainWindow : FluentWindow
|
||||
}
|
||||
|
||||
public MainWindowViewModel ViewModel { get; }
|
||||
|
||||
protected override void OnClosed(EventArgs e)
|
||||
{
|
||||
_motion.Dispose();
|
||||
base.OnClosed(e);
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,6 @@
|
||||
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
|
||||
xmlns:res="clr-namespace:FrameLedger.App"
|
||||
xmlns:vm="clr-namespace:FrameLedger.App.ViewModels"
|
||||
xmlns:controls="clr-namespace:FrameLedger.App.Controls"
|
||||
xmlns:charts="clr-namespace:FrameLedger.App.Charts"
|
||||
Title="{x:Static res:Strings.Compare_Header}"
|
||||
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
||||
@@ -15,7 +14,7 @@
|
||||
<!-- 08_UI §Compare: the picker (2–5, cross-game), the overlaid percentile curves, the stat table; FR-6.2's guard is the view model's. -->
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
||||
<StackPanel Style="{StaticResource PageRoot}">
|
||||
<ui:TextBlock FontTypography="Title" AutomationProperties.HeadingLevel="Level1" Text="{x:Static vm:CompareViewModel.Header}" />
|
||||
<ui:TextBlock FontTypography="Title" Text="{x:Static vm:CompareViewModel.Header}" />
|
||||
<ui:TextBlock Margin="0,16,0,0" Style="{StaticResource SecondaryText}" TextWrapping="Wrap" Text="{x:Static vm:CompareViewModel.EmptyText}"
|
||||
Visibility="{Binding ViewModel.IsEmpty, Converter={StaticResource BoolToVis}}" />
|
||||
|
||||
@@ -44,7 +43,7 @@
|
||||
<!-- beta.34: the selection bar beside what it acts on - it sat at the window's far right, a full width away from the list. -->
|
||||
<StackPanel Margin="0,8,0,0" Orientation="Horizontal"
|
||||
Visibility="{Binding ViewModel.IsEmpty, Converter={StaticResource InverseBoolToVis}}">
|
||||
<ui:TextBlock Margin="0,0,16,0" VerticalAlignment="Center" FontTypography="Subtitle" AutomationProperties.HeadingLevel="Level2" Text="{x:Static vm:CompareViewModel.PickHeader}" />
|
||||
<ui:TextBlock Margin="0,0,16,0" VerticalAlignment="Center" FontTypography="Subtitle" Text="{x:Static vm:CompareViewModel.PickHeader}" />
|
||||
<ui:TextBlock Margin="0,0,16,0" VerticalAlignment="Center" Style="{StaticResource SecondaryText}" Text="{Binding ViewModel.SelectedText}" />
|
||||
<ui:Button Margin="0,0,8,0" Appearance="Secondary" Command="{Binding ViewModel.ClearSelectionCommand}"
|
||||
Content="{x:Static vm:CompareViewModel.ClearSelectionText}" />
|
||||
@@ -63,7 +62,7 @@
|
||||
<DataGrid.Columns>
|
||||
<!-- A template column, not DataGridCheckBoxColumn: that one's element style is WPF's own, an Aero2 box on the Fluent grid; MinWidth 0
|
||||
and no padding, or WPF UI's CheckBox (MinWidth 120, padding 11) draws a sliver of the box in 40 px (beta.14). -->
|
||||
<DataGridTemplateColumn Width="40" controls:CellName.Path="Label">
|
||||
<DataGridTemplateColumn Width="40">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate DataType="{x:Type vm:CompareCandidateViewModel}">
|
||||
<CheckBox MinWidth="0" Padding="0" HorizontalAlignment="Center" AutomationProperties.Name="{Binding Label}"
|
||||
@@ -75,7 +74,7 @@
|
||||
<DataGridTextColumn Header="{x:Static res:Strings.Compare_Col_Date}" Binding="{Binding DateText}" SortMemberPath="StartedAt" IsReadOnly="True" Width="Auto" MinWidth="150" />
|
||||
<DataGridTextColumn Header="{x:Static res:Strings.Compare_Col_Tier}" Binding="{Binding TierText}" IsReadOnly="True" Width="Auto" MinWidth="64" />
|
||||
<DataGridTextColumn Header="{x:Static res:Strings.Compare_Col_Fps}" Binding="{Binding ReadoutLine}" IsReadOnly="True" Width="Auto" MinWidth="220" />
|
||||
<DataGridTemplateColumn Header="{x:Static res:Strings.Compare_Col_MidSession}" IsReadOnly="True" Width="Auto" MinWidth="150" SortMemberPath="SettingsChangedMidSession" controls:CellName.Path="SettingsChangedText">
|
||||
<DataGridTemplateColumn Header="{x:Static res:Strings.Compare_Col_MidSession}" IsReadOnly="True" Width="Auto" MinWidth="150" SortMemberPath="SettingsChangedMidSession">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate DataType="{x:Type vm:CompareCandidateViewModel}">
|
||||
<StackPanel Margin="4,0" Orientation="Horizontal" VerticalAlignment="Center">
|
||||
@@ -87,7 +86,7 @@
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<!-- the filler: the width the columns above do not need, so they stay together on a wide window -->
|
||||
<DataGridTemplateColumn Width="*" CanUserSort="False" CanUserResize="False" IsReadOnly="True" controls:CellName.Path="Label" />
|
||||
<DataGridTemplateColumn Width="*" CanUserSort="False" CanUserResize="False" IsReadOnly="True" />
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
|
||||
@@ -101,12 +100,12 @@
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<ui:TextBlock Grid.Column="0" FontTypography="Subtitle" AutomationProperties.HeadingLevel="Level2" Text="{x:Static vm:CompareViewModel.CurvesHeader}" />
|
||||
<ui:TextBlock Grid.Column="0" FontTypography="Subtitle" Text="{x:Static vm:CompareViewModel.CurvesHeader}" />
|
||||
<ui:Button Grid.Column="1" Click="OnExportPng" Content="{x:Static vm:CompareViewModel.ExportPngText}" />
|
||||
</Grid>
|
||||
<charts:CompareChart x:Name="Chart" Margin="0,6,0,0" Height="340" />
|
||||
|
||||
<ui:TextBlock Margin="0,16,0,0" FontTypography="Subtitle" AutomationProperties.HeadingLevel="Level2" Text="{x:Static vm:CompareViewModel.TableHeader}" />
|
||||
<ui:TextBlock Margin="0,16,0,0" FontTypography="Subtitle" Text="{x:Static vm:CompareViewModel.TableHeader}" />
|
||||
<!-- the header row: the metric column's own header, then one label per compared session - laid out as every row
|
||||
below is (a 140-px metric cell, then the sessions sharing the rest), so each label sits over its column;
|
||||
beta.34: it spread over the whole width, the 140 px included, and drifted left of its values. -->
|
||||
|
||||
@@ -13,13 +13,13 @@
|
||||
ScrollViewer.CanContentScroll="False">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
||||
<StackPanel Style="{StaticResource PageRoot}">
|
||||
<ui:TextBlock FontTypography="Title" AutomationProperties.HeadingLevel="Level1" Text="{x:Static vm:DashboardViewModel.Header}" />
|
||||
<ui:TextBlock FontTypography="Title" Text="{x:Static vm:DashboardViewModel.Header}" />
|
||||
|
||||
<!-- 08_UI §Dashboard: the live capture cards — one per running session since beta.28 (the owner, 2026-10-20: two or
|
||||
more games at once), hooked sessions first — fed by SessionStarted / SessionProgress / SessionHeld /
|
||||
SessionCompleted. A session recorded without measuring (Tier 2) shows why, and no readout (2026-09-23). -->
|
||||
<StackPanel Margin="0,16,0,0" Orientation="Horizontal">
|
||||
<ui:TextBlock FontTypography="Subtitle" AutomationProperties.HeadingLevel="Level2" Text="{x:Static vm:LiveCaptureViewModel.Header}" />
|
||||
<ui:TextBlock FontTypography="Subtitle" Text="{x:Static vm:LiveCaptureViewModel.Header}" />
|
||||
<Border Style="{StaticResource Pill}" Visibility="{Binding ViewModel.LiveCountText, Converter={StaticResource NullToCollapsed}}">
|
||||
<TextBlock Foreground="{DynamicResource TextFillColorPrimaryBrush}" Text="{Binding ViewModel.LiveCountText}" />
|
||||
</Border>
|
||||
@@ -77,19 +77,19 @@
|
||||
<ui:Card Margin="0,0,6,0">
|
||||
<StackPanel>
|
||||
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{x:Static vm:DashboardViewModel.TotalsGames}" />
|
||||
<ui:TextBlock FontTypography="Subtitle" AutomationProperties.HeadingLevel="None" Text="{Binding ViewModel.GamesTrackedText}" />
|
||||
<ui:TextBlock FontTypography="Subtitle" Text="{Binding ViewModel.GamesTrackedText}" />
|
||||
</StackPanel>
|
||||
</ui:Card>
|
||||
<ui:Card Margin="6,0,6,0">
|
||||
<StackPanel>
|
||||
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{x:Static vm:DashboardViewModel.TotalsPlaytime}" />
|
||||
<ui:TextBlock FontTypography="Subtitle" AutomationProperties.HeadingLevel="None" Text="{Binding ViewModel.PlaytimeText}" />
|
||||
<ui:TextBlock FontTypography="Subtitle" Text="{Binding ViewModel.PlaytimeText}" />
|
||||
</StackPanel>
|
||||
</ui:Card>
|
||||
<ui:Card Margin="6,0,0,0">
|
||||
<StackPanel>
|
||||
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{x:Static vm:DashboardViewModel.TotalsThisWeek}" />
|
||||
<ui:TextBlock FontTypography="Subtitle" AutomationProperties.HeadingLevel="None" Text="{Binding ViewModel.ThisWeekText}" />
|
||||
<ui:TextBlock FontTypography="Subtitle" Text="{Binding ViewModel.ThisWeekText}" />
|
||||
</StackPanel>
|
||||
</ui:Card>
|
||||
</UniformGrid>
|
||||
@@ -97,7 +97,7 @@
|
||||
<!-- 08_UI §Dashboard: the Agent status card. Every value reads N/A until the Agent answered. -->
|
||||
<ui:Card Margin="0,12,0,0" HorizontalAlignment="Stretch">
|
||||
<StackPanel>
|
||||
<ui:TextBlock FontTypography="Subtitle" AutomationProperties.HeadingLevel="Level2" Margin="0,0,0,12" Text="{x:Static vm:DashboardViewModel.AgentHeader}" />
|
||||
<ui:TextBlock FontTypography="Subtitle" Margin="0,0,0,12" Text="{x:Static vm:DashboardViewModel.AgentHeader}" />
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
@@ -128,14 +128,14 @@
|
||||
</ui:Card>
|
||||
|
||||
<!-- recent sessions -->
|
||||
<ui:TextBlock Margin="0,20,0,0" FontTypography="Subtitle" AutomationProperties.HeadingLevel="Level2" Text="{x:Static vm:DashboardViewModel.RecentHeader}" />
|
||||
<ui:TextBlock Margin="0,20,0,0" FontTypography="Subtitle" Text="{x:Static vm:DashboardViewModel.RecentHeader}" />
|
||||
<ui:TextBlock Margin="0,8,0,0" Style="{StaticResource SecondaryText}" TextWrapping="Wrap"
|
||||
Text="{x:Static vm:DashboardViewModel.EmptyText}"
|
||||
Visibility="{Binding ViewModel.RecentEmpty, Converter={StaticResource BoolToVis}}" />
|
||||
<ItemsControl Margin="0,8,0,0" ItemsSource="{Binding ViewModel.Recent}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type vm:RecentSessionViewModel}">
|
||||
<ui:CardAction Margin="0,0,0,6" IsChevronVisible="True" AutomationProperties.Name="{Binding AccessibleName}"
|
||||
<ui:CardAction Margin="0,0,0,6" IsChevronVisible="True"
|
||||
Command="{Binding DataContext.ViewModel.OpenSessionCommand, RelativeSource={RelativeSource AncestorType=Page}}"
|
||||
CommandParameter="{Binding}">
|
||||
<Grid>
|
||||
|
||||
@@ -74,8 +74,6 @@
|
||||
Visibility="{Binding ViewModel.ArtCover, Converter={StaticResource NullToCollapsed}}">
|
||||
<ui:Image.Style>
|
||||
<Style TargetType="ui:Image" BasedOn="{StaticResource DefaultImageStyle}">
|
||||
<!-- beta.35 (D88): a picture, not a stop for Tab (the App's implicit ui:Image style says so for the others) -->
|
||||
<Setter Property="Focusable" Value="False" />
|
||||
<Setter Property="Width" Value="120" />
|
||||
<Setter Property="Height" Value="180" />
|
||||
<Style.Triggers>
|
||||
@@ -93,7 +91,7 @@
|
||||
</ui:Image.Style>
|
||||
</ui:Image>
|
||||
<StackPanel Grid.Column="1">
|
||||
<ui:TextBlock FontTypography="Title" AutomationProperties.HeadingLevel="Level1" Text="{Binding ViewModel.Name}" />
|
||||
<ui:TextBlock FontTypography="Title" Text="{Binding ViewModel.Name}" />
|
||||
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{Binding ViewModel.Subtitle}" />
|
||||
<ui:TextBlock Style="{StaticResource TertiaryText}" TextTrimming="CharacterEllipsis" Text="{Binding ViewModel.ExecutableText}" ToolTip="{Binding ViewModel.ExecutableText}" />
|
||||
<ui:InfoBar Margin="0,6,0,0" IsClosable="False" Severity="Warning"
|
||||
@@ -316,7 +314,7 @@
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Header="{x:Static res:Strings.Sessions_Col_Date}" Binding="{Binding DateText}" />
|
||||
<DataGridTextColumn Header="{x:Static res:Strings.Sessions_Col_Duration}" Binding="{Binding DurationText}" />
|
||||
<DataGridTemplateColumn Header="{x:Static res:Strings.Sessions_Col_Tier}" controls:CellName.Path="TierText">
|
||||
<DataGridTemplateColumn Header="{x:Static res:Strings.Sessions_Col_Tier}">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate DataType="{x:Type vm:SessionItemViewModel}">
|
||||
<Border Style="{StaticResource Pill}" Margin="0" ToolTip="{Binding TierTooltip}">
|
||||
@@ -325,21 +323,21 @@
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTemplateColumn Header="{x:Static res:Strings.Sessions_Col_Native}" controls:CellName.Path="NativeText">
|
||||
<DataGridTemplateColumn Header="{x:Static res:Strings.Sessions_Col_Native}">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate DataType="{x:Type vm:SessionItemViewModel}">
|
||||
<TextBlock Text="{Binding NativeText}" ToolTip="{Binding FpsTooltip}" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTemplateColumn Header="{x:Static res:Strings.Sessions_Col_Displayed}" controls:CellName.Path="DisplayedText">
|
||||
<DataGridTemplateColumn Header="{x:Static res:Strings.Sessions_Col_Displayed}">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate DataType="{x:Type vm:SessionItemViewModel}">
|
||||
<TextBlock Text="{Binding DisplayedText}" ToolTip="{Binding FpsTooltip}" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTemplateColumn Header="{x:Static res:Strings.Sessions_Col_Fg}" controls:CellName.Path="FgText">
|
||||
<DataGridTemplateColumn Header="{x:Static res:Strings.Sessions_Col_Fg}">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate DataType="{x:Type vm:SessionItemViewModel}">
|
||||
<TextBlock Text="{Binding FgText}" ToolTip="{Binding FpsTooltip}" />
|
||||
@@ -351,14 +349,14 @@
|
||||
<DataGridTextColumn Header="{x:Static res:Strings.Sessions_Col_Resolution}" Binding="{Binding ResolutionText}" />
|
||||
<DataGridTextColumn Header="{x:Static res:Strings.Sessions_Col_GpuTemp}" Binding="{Binding GpuTempText}" />
|
||||
<!-- beta.12 (D43): the game's own memory, both tiers; mean, the shared / working-set / commit peaks in the tooltip -->
|
||||
<DataGridTemplateColumn Header="{x:Static res:Strings.Sessions_Col_GameVram}" controls:CellName.Path="GameVramText">
|
||||
<DataGridTemplateColumn Header="{x:Static res:Strings.Sessions_Col_GameVram}">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate DataType="{x:Type vm:SessionItemViewModel}">
|
||||
<TextBlock Text="{Binding GameVramText}" ToolTip="{Binding GameVramTooltip}" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTemplateColumn Header="{x:Static res:Strings.Sessions_Col_GameRam}" controls:CellName.Path="GameRamText">
|
||||
<DataGridTemplateColumn Header="{x:Static res:Strings.Sessions_Col_GameRam}">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate DataType="{x:Type vm:SessionItemViewModel}">
|
||||
<TextBlock Text="{Binding GameRamText}" ToolTip="{Binding GameRamTooltip}" />
|
||||
@@ -367,14 +365,14 @@
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTextColumn Header="{x:Static res:Strings.Sessions_Col_Api}" Binding="{Binding ApiText}" />
|
||||
<!-- beta.10: both tiers; the tooltip carries every share, the window, the back buffer and the source -->
|
||||
<DataGridTemplateColumn Header="{x:Static res:Strings.Sessions_Col_Display}" controls:CellName.Path="DisplayModeText">
|
||||
<DataGridTemplateColumn Header="{x:Static res:Strings.Sessions_Col_Display}">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate DataType="{x:Type vm:SessionItemViewModel}">
|
||||
<TextBlock Text="{Binding DisplayModeText}" ToolTip="{Binding DisplayModeTooltip}" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTemplateColumn controls:CellName.Path="FeaturesText">
|
||||
<DataGridTemplateColumn>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate DataType="{x:Type vm:SessionItemViewModel}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
@@ -385,7 +383,7 @@
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTemplateColumn Header="{x:Static res:Strings.Sessions_Col_Exit}" controls:CellName.Path="ExitText">
|
||||
<DataGridTemplateColumn Header="{x:Static res:Strings.Sessions_Col_Exit}">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate DataType="{x:Type vm:SessionItemViewModel}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
@@ -396,11 +394,11 @@
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTextColumn Header="{x:Static res:Strings.Sessions_Col_Tags}" Binding="{Binding TagsText}" controls:CellName.Path="TagsText" />
|
||||
<DataGridTemplateColumn controls:CellName.Path="OpenName">
|
||||
<DataGridTextColumn Header="{x:Static res:Strings.Sessions_Col_Tags}" Binding="{Binding TagsText}" />
|
||||
<DataGridTemplateColumn>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate DataType="{x:Type vm:SessionItemViewModel}">
|
||||
<ui:Button Appearance="Secondary" Padding="8,2" Content="{x:Static res:Strings.Summary_Open}" AutomationProperties.Name="{Binding OpenName}"
|
||||
<ui:Button Appearance="Secondary" Padding="8,2" Content="{x:Static res:Strings.Summary_Open}"
|
||||
Command="{Binding DataContext.ViewModel.OpenSessionCommand, RelativeSource={RelativeSource AncestorType=Page}}"
|
||||
CommandParameter="{Binding}" />
|
||||
</DataTemplate>
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<ui:TextBlock Grid.Column="0" FontTypography="Title" AutomationProperties.HeadingLevel="Level1" Text="{Binding ViewModel.HeaderText}" />
|
||||
<ui:TextBlock Grid.Column="0" FontTypography="Title" Text="{Binding ViewModel.HeaderText}" />
|
||||
<ui:TextBox Grid.Column="1" MinWidth="220" Margin="0,0,12,0" VerticalAlignment="Center"
|
||||
AutomationProperties.Name="{x:Static vm:GamesViewModel.SearchPlaceholder}"
|
||||
Icon="{ui:SymbolIcon Search24}"
|
||||
@@ -110,7 +110,7 @@
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type vm:GameCardViewModel}">
|
||||
<Grid>
|
||||
<ui:CardAction IsChevronVisible="False" VerticalAlignment="Stretch" VerticalContentAlignment="Top" AutomationProperties.Name="{Binding AccessibleName}"
|
||||
<ui:CardAction IsChevronVisible="False" VerticalAlignment="Stretch" VerticalContentAlignment="Top"
|
||||
Command="{Binding DataContext.ViewModel.OpenCommand, RelativeSource={RelativeSource AncestorType=Page}}"
|
||||
CommandParameter="{Binding}"
|
||||
Icon="{ui:SymbolIcon Games24}">
|
||||
@@ -142,7 +142,7 @@
|
||||
</ui:CardAction>
|
||||
<!-- beta.21 (D59): Play, over the card's corner rather than inside it, so the card stays one button. -->
|
||||
<ui:Button Margin="0,10,10,0" Padding="6,4" HorizontalAlignment="Right" VerticalAlignment="Top"
|
||||
AutomationProperties.Name="{Binding PlayName}"
|
||||
AutomationProperties.Name="{x:Static res:Strings.Play_Button}"
|
||||
Command="{Binding DataContext.ViewModel.PlayCommand, RelativeSource={RelativeSource AncestorType=Page}}"
|
||||
CommandParameter="{Binding}"
|
||||
Icon="{ui:SymbolIcon Play24}"
|
||||
@@ -163,11 +163,11 @@
|
||||
Visibility="{Binding ViewModel.ListView, Converter={StaticResource BoolToVis}}">
|
||||
<DataGrid.Columns>
|
||||
<!-- beta.21 (D59): Play, as on the cards. -->
|
||||
<DataGridTemplateColumn Header="{x:Static res:Strings.Play_Button}" Width="Auto" controls:CellName.Path="PlayName">
|
||||
<DataGridTemplateColumn Header="{x:Static res:Strings.Play_Button}" Width="Auto">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<ui:Button Margin="2,0" Padding="6,2" Appearance="Transparent"
|
||||
AutomationProperties.Name="{Binding PlayName}"
|
||||
AutomationProperties.Name="{x:Static res:Strings.Play_Button}"
|
||||
Command="{Binding DataContext.ViewModel.PlayCommand, RelativeSource={RelativeSource AncestorType=Page}}"
|
||||
CommandParameter="{Binding}"
|
||||
Icon="{ui:SymbolIcon Play24}"
|
||||
@@ -179,7 +179,7 @@
|
||||
<DataGridTextColumn Header="{x:Static res:Strings.Games_List_Name}" Binding="{Binding Name}" Width="3*" />
|
||||
<DataGridTextColumn Header="{x:Static res:Strings.Games_List_Store}" Binding="{Binding PlatformText}" Width="Auto" />
|
||||
<DataGridTextColumn Header="{x:Static res:Strings.Games_List_Engine}" Binding="{Binding EngineText}" Width="*" />
|
||||
<DataGridTemplateColumn Header="{x:Static res:Strings.Games_List_Status}" Width="*" controls:CellName.Path="StatusText">
|
||||
<DataGridTemplateColumn Header="{x:Static res:Strings.Games_List_Status}" Width="*">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Margin="4,0" VerticalAlignment="Center" Text="{Binding StatusText}" ToolTip="{Binding NotInstalledToolTip}" />
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ui:TextBlock Grid.Row="0" FontTypography="Title" AutomationProperties.HeadingLevel="Level1" Text="{x:Static vm:LogsViewModel.Header}" />
|
||||
<ui:TextBlock Grid.Row="0" FontTypography="Title" Text="{x:Static vm:LogsViewModel.Header}" />
|
||||
|
||||
<!-- 08_UI §Logs: source toggle, level filter, search, pause-scroll; the two buttons. -->
|
||||
<WrapPanel Grid.Row="1" Margin="0,12,0,8" Orientation="Horizontal">
|
||||
|
||||
@@ -6,17 +6,16 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
|
||||
xmlns:res="clr-namespace:FrameLedger.App"
|
||||
xmlns:services="clr-namespace:FrameLedger.App.Services"
|
||||
xmlns:vm="clr-namespace:FrameLedger.App.ViewModels"
|
||||
Title="{x:Static res:Strings.Settings_Header}"
|
||||
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
||||
ScrollViewer.CanContentScroll="False">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
||||
<StackPanel Style="{StaticResource PageRoot}">
|
||||
<ui:TextBlock FontTypography="Title" AutomationProperties.HeadingLevel="Level1" Text="{x:Static vm:SettingsViewModel.Header}" />
|
||||
<ui:TextBlock FontTypography="Title" Text="{x:Static vm:SettingsViewModel.Header}" />
|
||||
|
||||
<!-- 08_UI §Settings: Capture first, most important — the kill switch, the hook-enabled games, the layer, the safety link. -->
|
||||
<ui:TextBlock FontTypography="Subtitle" AutomationProperties.HeadingLevel="Level2" Margin="0,20,0,8" Text="{x:Static res:Strings.Settings_Capture_Header}" />
|
||||
<ui:TextBlock FontTypography="Subtitle" Margin="0,20,0,8" Text="{x:Static res:Strings.Settings_Capture_Header}" />
|
||||
<ui:CardExpander Margin="0,4,0,0" IsExpanded="True" Icon="{ui:SymbolIcon ShieldError24}">
|
||||
<ui:CardExpander.Header>
|
||||
<Grid>
|
||||
@@ -49,7 +48,7 @@
|
||||
<ui:TextBlock Grid.Column="0" VerticalAlignment="Center" Text="{Binding Name}" />
|
||||
<ui:Button Grid.Column="1"
|
||||
Appearance="Secondary"
|
||||
AutomationProperties.Name="{Binding RevokeName}" Command="{Binding RevokeCommand}"
|
||||
Command="{Binding RevokeCommand}"
|
||||
Content="{x:Static res:Strings.Settings_HookedGames_Revoke}" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
@@ -113,11 +112,11 @@
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="1" Margin="12,0,0,0" VerticalAlignment="Center" Orientation="Horizontal">
|
||||
<ui:Button Appearance="Secondary"
|
||||
AutomationProperties.Name="{Binding GrantName}" Command="{Binding GrantCommand}"
|
||||
Command="{Binding GrantCommand}"
|
||||
Content="{x:Static res:Strings.Settings_Exceptions_Grant}"
|
||||
Visibility="{Binding CanGrant, Converter={StaticResource BoolToVis}}" />
|
||||
<ui:Button Appearance="Secondary"
|
||||
AutomationProperties.Name="{Binding WithdrawName}" Command="{Binding WithdrawCommand}"
|
||||
Command="{Binding WithdrawCommand}"
|
||||
Content="{x:Static res:Strings.Settings_Exceptions_Withdraw}"
|
||||
Visibility="{Binding CanWithdraw, Converter={StaticResource BoolToVis}}" />
|
||||
</StackPanel>
|
||||
@@ -168,7 +167,7 @@
|
||||
|
||||
<!-- Recording policy: the three numbers and background capture (D16: the Agent reads them at session start) — off in a
|
||||
viewer, which has no Agent (beta.18; every setting the Agent reads is, ViewerModeTests). -->
|
||||
<ui:TextBlock FontTypography="Subtitle" AutomationProperties.HeadingLevel="Level2" Margin="0,20,0,8" Text="{x:Static res:Strings.Settings_Policy_Header}" />
|
||||
<ui:TextBlock FontTypography="Subtitle" Margin="0,20,0,8" Text="{x:Static res:Strings.Settings_Policy_Header}" />
|
||||
<ui:CardControl Margin="0,4,0,0" Icon="{ui:SymbolIcon Timer24}">
|
||||
<ui:CardControl.Header>
|
||||
<StackPanel>
|
||||
@@ -219,7 +218,7 @@
|
||||
meant recording nothing. Removed until a launch path exists. -->
|
||||
|
||||
<!-- beta.11 (owner request 2026-10-03: no row without a control): Data - Delete all sessions (D40). -->
|
||||
<ui:TextBlock FontTypography="Subtitle" AutomationProperties.HeadingLevel="Level2" Margin="0,20,0,8" Text="{x:Static res:Strings.Settings_Data_Header}" />
|
||||
<ui:TextBlock FontTypography="Subtitle" Margin="0,20,0,8" Text="{x:Static res:Strings.Settings_Data_Header}" />
|
||||
<!-- beta.19 (owner decision D55): the Agent removes an entry whose game is no longer installed and that has no session. -->
|
||||
<ui:CardControl Margin="0,4,0,0" Icon="{ui:SymbolIcon BoxDismiss24}">
|
||||
<ui:CardControl.Header>
|
||||
@@ -243,7 +242,7 @@
|
||||
</ui:CardControl>
|
||||
|
||||
<!-- Agent: elevation is optional and no tier needs it. beta.11: the elevation line is the admin mode's own status, not a row of its own. -->
|
||||
<ui:TextBlock FontTypography="Subtitle" AutomationProperties.HeadingLevel="Level2" Margin="0,20,0,8" Text="{x:Static res:Strings.Settings_Agent_Header}" />
|
||||
<ui:TextBlock FontTypography="Subtitle" Margin="0,20,0,8" Text="{x:Static res:Strings.Settings_Agent_Header}" />
|
||||
<!-- beta.10, the admin mode (D34): off by default; on shows the disclosure, and Windows asks at every Agent start. -->
|
||||
<ui:CardControl Margin="0,4,0,0" Icon="{ui:SymbolIcon Shield24}">
|
||||
<ui:CardControl.Header>
|
||||
@@ -282,7 +281,7 @@
|
||||
</ui:CardControl>
|
||||
|
||||
<!-- Appearance (PR-2) and window. -->
|
||||
<ui:TextBlock FontTypography="Subtitle" AutomationProperties.HeadingLevel="Level2" Margin="0,20,0,8" Text="{x:Static vm:SettingsViewModel.AppearanceHeader}" />
|
||||
<ui:TextBlock FontTypography="Subtitle" Margin="0,20,0,8" Text="{x:Static vm:SettingsViewModel.AppearanceHeader}" />
|
||||
<ui:CardControl Margin="0,4,0,0" Header="{x:Static vm:SettingsViewModel.ThemeLabel}" Icon="{ui:SymbolIcon Color24}">
|
||||
<ComboBox MinWidth="180"
|
||||
AutomationProperties.Name="{x:Static vm:SettingsViewModel.ThemeLabel}"
|
||||
@@ -291,10 +290,6 @@
|
||||
SelectedValue="{Binding ViewModel.SelectedTheme, Mode=TwoWay}"
|
||||
SelectedValuePath="Value" />
|
||||
</ui:CardControl>
|
||||
<!-- beta.35 (D91): a Windows contrast theme's colours win; this says so while one is on, and goes when it is off. -->
|
||||
<ui:TextBlock Margin="12,4,0,0" Style="{StaticResource SecondaryText}" TextWrapping="Wrap"
|
||||
Text="{x:Static res:Strings.Settings_Theme_ContrastOn}"
|
||||
Visibility="{Binding Path=(services:ContrastTheme.IsOn), Converter={StaticResource BoolToVis}}" />
|
||||
<ui:CardControl Margin="0,8,0,0" Header="{x:Static vm:SettingsViewModel.LanguageLabel}" Icon="{ui:SymbolIcon LocalLanguage24}">
|
||||
<ComboBox MinWidth="180"
|
||||
AutomationProperties.Name="{x:Static vm:SettingsViewModel.LanguageLabel}"
|
||||
@@ -305,7 +300,7 @@
|
||||
</ui:CardControl>
|
||||
|
||||
<!-- beta.21 (owner decision D59): what Play does. The App's own setting; the Agent never reads it. -->
|
||||
<ui:TextBlock FontTypography="Subtitle" AutomationProperties.HeadingLevel="Level2" Margin="0,20,0,8" Text="{x:Static res:Strings.Settings_Games_Header}" />
|
||||
<ui:TextBlock FontTypography="Subtitle" Margin="0,20,0,8" Text="{x:Static res:Strings.Settings_Games_Header}" />
|
||||
<ui:CardControl Margin="0,4,0,0" Icon="{ui:SymbolIcon Play24}">
|
||||
<ui:CardControl.Header>
|
||||
<StackPanel>
|
||||
@@ -343,7 +338,7 @@
|
||||
<ui:ToggleSwitch AutomationProperties.Name="{x:Static res:Strings.Settings_GameArtTint_Label}" IsChecked="{Binding ViewModel.GameArtTint, Mode=TwoWay}" />
|
||||
</ui:CardControl>
|
||||
|
||||
<ui:TextBlock FontTypography="Subtitle" AutomationProperties.HeadingLevel="Level2" Margin="0,20,0,8" Text="{x:Static res:Strings.Settings_Window_Header}" />
|
||||
<ui:TextBlock FontTypography="Subtitle" Margin="0,20,0,8" Text="{x:Static res:Strings.Settings_Window_Header}" />
|
||||
<ui:CardControl Margin="0,4,0,0" Icon="{ui:SymbolIcon Power24}">
|
||||
<ui:CardControl.Header>
|
||||
<StackPanel>
|
||||
@@ -391,7 +386,7 @@
|
||||
not exist is the same over-disclosure the privacy policy's version 2.2 removed from its table. The
|
||||
setting stays in the registry, off, for the day a consumer exists (06_DATA_MODEL §Settings registry).
|
||||
-->
|
||||
<ui:TextBlock FontTypography="Subtitle" AutomationProperties.HeadingLevel="Level2" Margin="0,20,0,8" Text="{x:Static res:Strings.Settings_Updates_Header}" />
|
||||
<ui:TextBlock FontTypography="Subtitle" Margin="0,20,0,8" Text="{x:Static res:Strings.Settings_Updates_Header}" />
|
||||
<ui:CardControl Margin="0,4,0,0" Icon="{ui:SymbolIcon ArrowSync24}">
|
||||
<ui:CardControl.Header>
|
||||
<StackPanel>
|
||||
@@ -421,7 +416,7 @@
|
||||
<ui:ToggleSwitch AutomationProperties.Name="{x:Static res:Strings.Settings_AutoCheck_Label}" IsChecked="{Binding ViewModel.AutoCheckUpdates, Mode=TwoWay}" IsEnabled="{Binding ViewModel.ActsOnThisPc}" />
|
||||
</ui:CardControl>
|
||||
|
||||
<ui:TextBlock FontTypography="Subtitle" AutomationProperties.HeadingLevel="Level2" Margin="0,20,0,8" Text="{x:Static res:Strings.Settings_Logging_Header}" />
|
||||
<ui:TextBlock FontTypography="Subtitle" Margin="0,20,0,8" Text="{x:Static res:Strings.Settings_Logging_Header}" />
|
||||
<ui:CardControl Margin="0,4,0,0" Icon="{ui:SymbolIcon Bug24}">
|
||||
<ui:CardControl.Header>
|
||||
<StackPanel>
|
||||
@@ -432,7 +427,7 @@
|
||||
<ui:ToggleSwitch AutomationProperties.Name="{x:Static res:Strings.Settings_LogDebug_Label}" IsChecked="{Binding ViewModel.LogDebug, Mode=TwoWay}" />
|
||||
</ui:CardControl>
|
||||
|
||||
<ui:TextBlock FontTypography="Subtitle" AutomationProperties.HeadingLevel="Level2" Margin="0,20,0,8" Text="{x:Static vm:SystemInfoViewModel.Header}" />
|
||||
<ui:TextBlock FontTypography="Subtitle" Margin="0,20,0,8" Text="{x:Static vm:SystemInfoViewModel.Header}" />
|
||||
<ui:Card Margin="0,4,0,0">
|
||||
<StackPanel>
|
||||
<ItemsControl ItemsSource="{Binding SystemInfo.Lines}" Focusable="False">
|
||||
@@ -454,7 +449,7 @@
|
||||
</StackPanel>
|
||||
</ui:Card>
|
||||
|
||||
<ui:TextBlock FontTypography="Subtitle" AutomationProperties.HeadingLevel="Level2" Margin="0,20,0,8" Text="{x:Static res:Strings.Settings_Legal_Header}" />
|
||||
<ui:TextBlock FontTypography="Subtitle" Margin="0,20,0,8" Text="{x:Static res:Strings.Settings_Legal_Header}" />
|
||||
<ui:CardAction Margin="0,4,0,24" Command="{Binding ViewModel.ReopenLegalCommand}" Icon="{ui:SymbolIcon DocumentText24}">
|
||||
<ui:TextBlock Text="{x:Static res:Strings.Settings_Legal_Reopen}" />
|
||||
</ui:CardAction>
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
namespace FrameLedger.App.Services;
|
||||
|
||||
/// <summary>How a screen reader treats an announcement (beta.35, D89).</summary>
|
||||
public enum AnnouncementKind
|
||||
{
|
||||
/// <summary>A result or a change of state: read in turn, a newer one of the same kind replacing one not yet read.</summary>
|
||||
Status,
|
||||
|
||||
/// <summary>Something the user must know — a safety notice, a failure, the agent gone: every one is read.</summary>
|
||||
Alert,
|
||||
}
|
||||
@@ -22,7 +22,7 @@ public sealed class Confirmations : IConfirmations
|
||||
SecondaryButtonAppearance = ControlAppearance.Danger,
|
||||
CloseButtonText = Strings.Common_Cancel,
|
||||
};
|
||||
MessageBoxResult result = await MessageBoxes.ShowAsync(box, ct).ConfigureAwait(true);
|
||||
MessageBoxResult result = await box.ShowDialogAsync(cancellationToken: ct).ConfigureAwait(true);
|
||||
return result switch
|
||||
{
|
||||
MessageBoxResult.Primary => RemoveGameChoice.KeepSessions,
|
||||
@@ -45,6 +45,6 @@ public sealed class Confirmations : IConfirmations
|
||||
PrimaryButtonAppearance = ControlAppearance.Danger,
|
||||
CloseButtonText = Strings.Common_Cancel,
|
||||
};
|
||||
return await MessageBoxes.ShowAsync(box, ct).ConfigureAwait(true) == MessageBoxResult.Primary;
|
||||
return await box.ShowDialogAsync(cancellationToken: ct).ConfigureAwait(true) == MessageBoxResult.Primary;
|
||||
}
|
||||
}
|
||||
@@ -1,153 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
using System.Windows;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace FrameLedger.App.Services;
|
||||
|
||||
/// <summary>
|
||||
/// A contrast theme's colours over the App's Fluent theme (beta.35, D91): every WPF UI theme resource given the user's colour
|
||||
/// for its role (<see cref="ContrastRoles"/>), as one merged dictionary on top of the theme — the light or the dark one, as
|
||||
/// the contrast theme is light or dark — and the accent's resources, which WPF UI's accent manager writes straight into the
|
||||
/// application's resources and which outrank any merged dictionary, written there too. Removing it leaves the Fluent theme;
|
||||
/// <c>ApplicationThemeManager.Apply(…, updateAccent: true)</c> then writes the accent back.
|
||||
/// </summary>
|
||||
public static class ContrastOverlay
|
||||
{
|
||||
/// <summary>
|
||||
/// The accent's resources: the 21 WPF UI 4.3.0's <c>ApplicationAccentColorManager</c> sets in the application's own
|
||||
/// resources (measured 2026-11-09), each with its role.
|
||||
/// </summary>
|
||||
public static IReadOnlyDictionary<string, (ContrastRole Role, bool Brush)> AccentKeys { get; } = new Dictionary<string, (ContrastRole, bool)>(StringComparer.Ordinal)
|
||||
{
|
||||
["SystemAccentColor"] = (ContrastRole.Highlight, false),
|
||||
["SystemAccentColorPrimary"] = (ContrastRole.Highlight, false),
|
||||
["SystemAccentColorSecondary"] = (ContrastRole.Highlight, false),
|
||||
["SystemAccentColorTertiary"] = (ContrastRole.Highlight, false),
|
||||
["SystemAccentBrush"] = (ContrastRole.Highlight, true),
|
||||
["SystemFillColorAttentionBrush"] = (ContrastRole.Highlight, true),
|
||||
["AccentFillColorDefault"] = (ContrastRole.Highlight, false),
|
||||
["AccentFillColorSecondary"] = (ContrastRole.Highlight, false),
|
||||
["AccentFillColorTertiary"] = (ContrastRole.Highlight, false),
|
||||
["AccentFillColorDefaultBrush"] = (ContrastRole.Highlight, true),
|
||||
["AccentFillColorSecondaryBrush"] = (ContrastRole.Highlight, true),
|
||||
["AccentFillColorTertiaryBrush"] = (ContrastRole.Highlight, true),
|
||||
["AccentFillColorSelectedTextBackgroundBrush"] = (ContrastRole.Highlight, true),
|
||||
["AccentTextFillColorPrimaryBrush"] = (ContrastRole.HotTrack, true),
|
||||
["AccentTextFillColorSecondaryBrush"] = (ContrastRole.HotTrack, true),
|
||||
["AccentTextFillColorTertiaryBrush"] = (ContrastRole.HotTrack, true),
|
||||
["AccentTextFillColorDisabled"] = (ContrastRole.GrayText, false),
|
||||
["TextOnAccentFillColorPrimary"] = (ContrastRole.HighlightText, false),
|
||||
["TextOnAccentFillColorSecondary"] = (ContrastRole.HighlightText, false),
|
||||
["TextOnAccentFillColorSelectedText"] = (ContrastRole.HighlightText, false),
|
||||
["TextOnAccentFillColorDisabled"] = (ContrastRole.GrayText, false),
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// The colours of WPF UI 4.3.0's Fluent themes that none of its contrast dictionaries has (measured 2026-11-09), each with a
|
||||
/// role: the navigation pane's separator, a gradient there, a line in the window text; the snowflake effect's two, the window.
|
||||
/// </summary>
|
||||
public static IReadOnlyDictionary<string, (ContrastRole Role, bool Brush)> FluentOnlyKeys { get; } = new Dictionary<string, (ContrastRole, bool)>(StringComparer.Ordinal)
|
||||
{
|
||||
["LeftNavigationViewSeparatorBrush"] = (ContrastRole.WindowText, true),
|
||||
["SnowflakeGradientTop"] = (ContrastRole.Window, false),
|
||||
["SnowflakeGradientBottom"] = (ContrastRole.Window, false),
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// The text on the accent, which the overlay makes the highlight: the highlight's text. WPF UI's contrast dictionaries make
|
||||
/// it the window text over an accent they leave as Windows' (measured 2026-11-09: white on Dusk's highlight, 1.62:1, in
|
||||
/// every chip the App draws on the accent), so these are the App's roles, not inferred ones.
|
||||
/// </summary>
|
||||
public static IReadOnlyDictionary<string, (ContrastRole Role, bool Brush)> OnAccentKeys { get; } = new Dictionary<string, (ContrastRole, bool)>(StringComparer.Ordinal)
|
||||
{
|
||||
["TextOnAccentFillColorPrimary"] = (ContrastRole.HighlightText, false),
|
||||
["TextOnAccentFillColorPrimaryBrush"] = (ContrastRole.HighlightText, true),
|
||||
["TextOnAccentFillColorSecondary"] = (ContrastRole.HighlightText, false),
|
||||
["TextOnAccentFillColorSecondaryBrush"] = (ContrastRole.HighlightText, true),
|
||||
["TextOnAccentFillColorSelectedText"] = (ContrastRole.HighlightText, false),
|
||||
["TextOnAccentFillColorSelectedTextBrush"] = (ContrastRole.HighlightText, true),
|
||||
};
|
||||
|
||||
/// <summary>The overlay: every role-mapped key in the palette's colour for its role, and the transparent keys transparent.</summary>
|
||||
public static ResourceDictionary Build(ContrastPalette palette)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(palette);
|
||||
var overlay = new Overlay();
|
||||
foreach ((string key, (ContrastRole role, bool brush)) in ContrastRoles.Map)
|
||||
{
|
||||
overlay[key] = Value(palette.Of(role), brush);
|
||||
}
|
||||
|
||||
foreach ((string key, (ContrastRole role, bool brush)) in OnAccentKeys)
|
||||
{
|
||||
overlay[key] = Value(palette.Of(role), brush);
|
||||
}
|
||||
|
||||
foreach ((string key, bool brush) in ContrastRoles.Clear)
|
||||
{
|
||||
overlay[key] = Value(Colors.Transparent, brush);
|
||||
}
|
||||
|
||||
foreach ((string key, (ContrastRole role, bool brush)) in FluentOnlyKeys.Where(k => !overlay.Contains(k.Key)))
|
||||
{
|
||||
overlay[key] = Value(palette.Of(role), brush);
|
||||
}
|
||||
|
||||
return overlay;
|
||||
}
|
||||
|
||||
/// <summary>Puts the palette over <paramref name="resources"/> (the application's), replacing an earlier overlay.</summary>
|
||||
public static void Install(ResourceDictionary resources, ContrastPalette palette)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(resources);
|
||||
ArgumentNullException.ThrowIfNull(palette);
|
||||
TakeOff(resources);
|
||||
ContrastTheme.Active = palette;
|
||||
resources.MergedDictionaries.Add(Build(palette));
|
||||
foreach ((string key, (ContrastRole role, bool brush)) in AccentKeys)
|
||||
{
|
||||
resources[key] = Value(palette.Of(role), brush);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Takes the overlay away; the accent's own resources are the theme manager's to write back.</summary>
|
||||
public static void Remove(ResourceDictionary resources)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(resources);
|
||||
TakeOff(resources);
|
||||
ContrastTheme.Active = null;
|
||||
}
|
||||
|
||||
/// <summary>Whether an overlay is on <paramref name="resources"/>.</summary>
|
||||
public static bool IsInstalled(ResourceDictionary resources)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(resources);
|
||||
return resources.MergedDictionaries.OfType<Overlay>().Any();
|
||||
}
|
||||
|
||||
// The overlays only: a palette replaced by another is never "off" in between.
|
||||
private static void TakeOff(ResourceDictionary resources)
|
||||
{
|
||||
foreach (ResourceDictionary overlay in resources.MergedDictionaries.OfType<Overlay>().ToList())
|
||||
{
|
||||
_ = resources.MergedDictionaries.Remove(overlay);
|
||||
}
|
||||
}
|
||||
|
||||
private static object Value(Color colour, bool brush)
|
||||
{
|
||||
if (!brush)
|
||||
{
|
||||
return colour;
|
||||
}
|
||||
|
||||
var solid = new SolidColorBrush(colour);
|
||||
solid.Freeze();
|
||||
return solid;
|
||||
}
|
||||
|
||||
/// <summary>The overlay's own type, so it can be found and taken away again.</summary>
|
||||
private sealed class Overlay : ResourceDictionary;
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
using System.Windows;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace FrameLedger.App.Services;
|
||||
|
||||
/// <summary>
|
||||
/// A Windows contrast theme's colours (beta.35, D91): the eight the user sees — and may edit — in Settings ▸ Accessibility ▸
|
||||
/// Contrast themes. <see cref="FromSystem"/> reads the ones Windows has on now; a test builds its own.
|
||||
/// </summary>
|
||||
public sealed record ContrastPalette(Color Window, Color WindowText, Color Highlight, Color HighlightText, Color HotTrack, Color GrayText, Color ButtonFace, Color ButtonText)
|
||||
{
|
||||
/// <summary>The theme Windows has on now — the user's colours, edited or not, on Windows 10 and 11 alike.</summary>
|
||||
public static ContrastPalette FromSystem() => new(
|
||||
SystemColors.WindowColor, SystemColors.WindowTextColor, SystemColors.HighlightColor, SystemColors.HighlightTextColor,
|
||||
SystemColors.HotTrackColor, SystemColors.GrayTextColor, SystemColors.ControlColor, SystemColors.ControlTextColor);
|
||||
|
||||
/// <summary>A dark window (Aquatic, Dusk, Night sky) rather than a light one (Desert): which Fluent theme lies under it.</summary>
|
||||
public bool IsDark => ColorMath.Luminance(Window) < 0.5;
|
||||
|
||||
/// <summary>The colour of a role, fully opaque — a contrast theme has no translucent colours.</summary>
|
||||
public Color Of(ContrastRole role)
|
||||
{
|
||||
Color c = role switch
|
||||
{
|
||||
ContrastRole.Window => Window,
|
||||
ContrastRole.WindowText => WindowText,
|
||||
ContrastRole.Highlight => Highlight,
|
||||
ContrastRole.HighlightText => HighlightText,
|
||||
ContrastRole.HotTrack => HotTrack,
|
||||
ContrastRole.GrayText => GrayText,
|
||||
ContrastRole.ButtonFace => ButtonFace,
|
||||
ContrastRole.ButtonText => ButtonText,
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(role), role, "not a contrast role"),
|
||||
};
|
||||
return Color.FromRgb(c.R, c.G, c.B);
|
||||
}
|
||||
|
||||
/// <summary>Every colour of the palette, in role order.</summary>
|
||||
public IReadOnlyList<Color> Colors => [.. Enum.GetValues<ContrastRole>().Select(Of)];
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
namespace FrameLedger.App.Services;
|
||||
|
||||
/// <summary>
|
||||
/// The eight colours a Windows contrast theme is made of (beta.35, D91) — what Settings ▸ Accessibility ▸ Contrast themes
|
||||
/// lets the user edit, and what every colour of a contrast-themed window is one of.
|
||||
/// </summary>
|
||||
public enum ContrastRole
|
||||
{
|
||||
/// <summary>The background of a window and of what is in it.</summary>
|
||||
Window,
|
||||
|
||||
/// <summary>Text on <see cref="Window"/>; also borders and strokes.</summary>
|
||||
WindowText,
|
||||
|
||||
/// <summary>A selected item's background; an accent's fill.</summary>
|
||||
Highlight,
|
||||
|
||||
/// <summary>Text on <see cref="Highlight"/>.</summary>
|
||||
HighlightText,
|
||||
|
||||
/// <summary>A link (Windows' "hyperlink" colour).</summary>
|
||||
HotTrack,
|
||||
|
||||
/// <summary>Disabled text and controls.</summary>
|
||||
GrayText,
|
||||
|
||||
/// <summary>A button's background.</summary>
|
||||
ButtonFace,
|
||||
|
||||
/// <summary>A button's text.</summary>
|
||||
ButtonText,
|
||||
}
|
||||
@@ -1,219 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
using System.Windows;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace FrameLedger.App.Services;
|
||||
|
||||
/// <summary>
|
||||
/// Which of a contrast theme's eight colours every WPF UI theme resource stands for (beta.35, D91), read from WPF UI 4.3.0's
|
||||
/// own four high-contrast dictionaries (HC1 Dusk, HC2 Night sky, HCBlack Aquatic, HCWhite Desert).
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// <b>Why not apply those dictionaries.</b> Measured 2026-11-09: each holds 459 keys, of which 84 of its 97 colours are a
|
||||
/// <c>#FFFF0000</c> placeholder and 17 brushes (<c>SystemFillColor*Brush</c>, <c>MenuBar*</c>) throw when read; and their
|
||||
/// colours are Windows 11's defaults, so a theme the user edited — or Windows 10's — would not be followed.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <b>What they are good for</b> is the role of each key: every brush there is one of the theme's eight colours (in HC1, 113
|
||||
/// are the window colour, 68 the window text, 56 the highlight …). A key's role is the colour it has in all four — a key
|
||||
/// that is the button face in one and the window in another is a button face — ties broken by its name, and a key with no
|
||||
/// role colour anywhere (a placeholder, a throw) takes its brush twin's or its name's. <see cref="ContrastOverlay"/> then
|
||||
/// gives every key the user's own colour for its role, and keeps the keys transparent there transparent.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <b>Only an opaque colour is evidence.</b> A brush that throws when its file is read alone does not throw in the App: its
|
||||
/// forward reference falls back to the application's resources, and it reads as the Fluent theme's own fill — measured
|
||||
/// 2026-11-09, <c>MenuBarItemBackgroundPressed</c> read <c>#0AFFFFFF</c> under the dark theme, the white of the window text
|
||||
/// in three of the four, which made a pressed menu item white on white. A contrast theme has no translucent colour, so a
|
||||
/// translucent one says nothing about a role, and the roles come out the same whichever Fluent theme lies under them.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public static class ContrastRoles
|
||||
{
|
||||
/// <summary>WPF UI 4.3.0's high-contrast theme files (<c>Resources/Theme/*.xaml</c>).</summary>
|
||||
public static readonly IReadOnlyList<string> ThemeNames = ["HC1", "HC2", "HCBlack", "HCWhite"];
|
||||
|
||||
private static readonly Color _placeholder = Color.FromArgb(0xFF, 0xFF, 0, 0);
|
||||
private static readonly Lazy<(IReadOnlyDictionary<string, (ContrastRole Role, bool Brush)> Roles, IReadOnlyDictionary<string, bool> Clear)> _inferred =
|
||||
new(static () => Infer([.. ThemeNames.Select(Load)]));
|
||||
|
||||
/// <summary>Every key's role, and whether it is a brush (else a colour); keys transparent in a theme are in <see cref="Clear"/>.</summary>
|
||||
public static IReadOnlyDictionary<string, (ContrastRole Role, bool Brush)> Map => _inferred.Value.Roles;
|
||||
|
||||
/// <summary>The keys transparent in one of the themes (true for a brush): the overlay keeps them transparent, so no colour of the Fluent theme under it shows through.</summary>
|
||||
public static IReadOnlyDictionary<string, bool> Clear => _inferred.Value.Clear;
|
||||
|
||||
/// <summary>One of WPF UI's high-contrast dictionaries, read for its keys and colours — never applied.</summary>
|
||||
public static ResourceDictionary Load(string theme)
|
||||
{
|
||||
ArgumentException.ThrowIfNullOrWhiteSpace(theme);
|
||||
return new ResourceDictionary { Source = new Uri($"pack://application:,,,/Wpf.Ui;component/Resources/Theme/{theme}.xaml", UriKind.Absolute) };
|
||||
}
|
||||
|
||||
/// <summary>The eight colours a high-contrast dictionary defines for itself (its <c>SystemColor*Color</c> keys).</summary>
|
||||
public static ContrastPalette PaletteOf(ResourceDictionary dictionary)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(dictionary);
|
||||
return new ContrastPalette(
|
||||
Read(dictionary, "SystemColorWindowColor"), Read(dictionary, "SystemColorWindowTextColor"),
|
||||
Read(dictionary, "SystemColorHighlightColor"), Read(dictionary, "SystemColorHighlightTextColor"),
|
||||
Read(dictionary, "SystemColorHotlightColor"), Read(dictionary, "SystemColorGrayTextColor"),
|
||||
Read(dictionary, "SystemColorButtonFaceColor"), Read(dictionary, "SystemColorButtonTextColor"));
|
||||
}
|
||||
|
||||
/// <summary>Every key's role across the dictionaries given (the four, in the App; a test's own, in a test), and the keys transparent in one.</summary>
|
||||
public static (IReadOnlyDictionary<string, (ContrastRole Role, bool Brush)> Roles, IReadOnlyDictionary<string, bool> Clear) Infer(IReadOnlyList<ResourceDictionary> dictionaries)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(dictionaries);
|
||||
var seen = new Dictionary<string, List<HashSet<ContrastRole>>>(StringComparer.Ordinal);
|
||||
var brush = new Dictionary<string, bool>(StringComparer.Ordinal);
|
||||
var transparent = new HashSet<string>(StringComparer.Ordinal);
|
||||
foreach (ResourceDictionary dictionary in dictionaries)
|
||||
{
|
||||
ContrastPalette palette = PaletteOf(dictionary);
|
||||
foreach (string key in dictionary.Keys.OfType<string>())
|
||||
{
|
||||
object? value = TryRead(dictionary, key);
|
||||
brush[key] = brush.GetValueOrDefault(key) || value is not Color;
|
||||
Color? colour = value switch
|
||||
{
|
||||
Color c => c,
|
||||
SolidColorBrush b => b.Color,
|
||||
_ => null,
|
||||
};
|
||||
if (colour is { A: 0 })
|
||||
{
|
||||
_ = transparent.Add(key);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!seen.TryGetValue(key, out List<HashSet<ContrastRole>>? sets))
|
||||
{
|
||||
sets = [];
|
||||
seen[key] = sets;
|
||||
}
|
||||
|
||||
// Opaque only: a translucent colour is a Fluent fill a forward reference fell back to, never a contrast colour.
|
||||
if (colour is { A: 0xFF } known && known != _placeholder)
|
||||
{
|
||||
sets.Add([.. Enum.GetValues<ContrastRole>().Where(r => palette.Of(r) == Color.FromRgb(known.R, known.G, known.B))]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var roles = new Dictionary<string, (ContrastRole, bool)>(StringComparer.Ordinal);
|
||||
foreach ((string key, List<HashSet<ContrastRole>> sets) in seen.Where(p => !transparent.Contains(p.Key)))
|
||||
{
|
||||
if (FromColours(key, sets) is { } role)
|
||||
{
|
||||
roles[key] = (role, brush[key]);
|
||||
}
|
||||
}
|
||||
|
||||
// A colour key with no role colour anywhere (a placeholder) takes the role of its brush twin; then the name decides.
|
||||
foreach (string key in seen.Keys.Where(k => !transparent.Contains(k) && !roles.ContainsKey(k)))
|
||||
{
|
||||
roles[key] = (roles.TryGetValue(key + "Brush", out (ContrastRole Role, bool) twin) ? twin.Role : ByName(key), brush[key]);
|
||||
}
|
||||
|
||||
return (roles, transparent.ToDictionary(static k => k, k => brush[k], StringComparer.Ordinal));
|
||||
}
|
||||
|
||||
/// <summary>The role every dictionary agrees on, a tie broken by the name; null when no dictionary gave a role colour.</summary>
|
||||
private static ContrastRole? FromColours(string key, List<HashSet<ContrastRole>> sets)
|
||||
{
|
||||
List<HashSet<ContrastRole>> informative = [.. sets.Where(static s => s.Count > 0)];
|
||||
if (informative.Count == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
HashSet<ContrastRole> common = [.. informative[0]];
|
||||
foreach (HashSet<ContrastRole> set in informative.Skip(1))
|
||||
{
|
||||
common.IntersectWith(set);
|
||||
}
|
||||
|
||||
HashSet<ContrastRole> choices = common.Count > 0 ? common : [.. informative.SelectMany(static s => s)];
|
||||
return choices.Count == 1 ? choices.First() : Prefer(key, choices);
|
||||
}
|
||||
|
||||
/// <summary>Of several roles a colour fits, the one the key's name points at; a button's before a window's.</summary>
|
||||
private static ContrastRole Prefer(string key, HashSet<ContrastRole> choices)
|
||||
{
|
||||
bool button = key.Contains("Button", StringComparison.Ordinal);
|
||||
ContrastRole[] order = button
|
||||
? [ContrastRole.ButtonFace, ContrastRole.ButtonText, ContrastRole.Window, ContrastRole.WindowText, ContrastRole.Highlight, ContrastRole.HighlightText, ContrastRole.HotTrack, ContrastRole.GrayText]
|
||||
: [ContrastRole.Window, ContrastRole.WindowText, ContrastRole.Highlight, ContrastRole.HighlightText, ContrastRole.HotTrack, ContrastRole.GrayText, ContrastRole.ButtonFace, ContrastRole.ButtonText];
|
||||
ContrastRole named = ByName(key);
|
||||
if (choices.Contains(named))
|
||||
{
|
||||
return named;
|
||||
}
|
||||
|
||||
return order.First(choices.Contains);
|
||||
}
|
||||
|
||||
/// <summary>A role from the key's name alone — for a placeholder, or a brush that would not even load.</summary>
|
||||
internal static ContrastRole ByName(string key)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(key);
|
||||
bool Has(string part) => key.Contains(part, StringComparison.Ordinal);
|
||||
bool text = Has("TextFill") || Has("Foreground") || Has("Glyph") || (Has("Text") && !Has("Background"));
|
||||
if (Has("Disabled"))
|
||||
{
|
||||
return ContrastRole.GrayText;
|
||||
}
|
||||
|
||||
if (Has("OnAccent") || (text && (Has("Selected") || Has("Pressed"))))
|
||||
{
|
||||
return ContrastRole.HighlightText;
|
||||
}
|
||||
|
||||
if (Has("AccentText") || Has("Hyperlink") || Has("Hotlight"))
|
||||
{
|
||||
return ContrastRole.HotTrack;
|
||||
}
|
||||
|
||||
if (Has("Accent") || ((Has("Background") || Has("Fill")) && (Has("Selected") || Has("Pressed"))))
|
||||
{
|
||||
return ContrastRole.Highlight;
|
||||
}
|
||||
|
||||
if (text)
|
||||
{
|
||||
return Has("Button") ? ContrastRole.ButtonText : ContrastRole.WindowText;
|
||||
}
|
||||
|
||||
if (Has("Stroke") || (Has("Border") && !Has("MenuBar")))
|
||||
{
|
||||
return ContrastRole.WindowText;
|
||||
}
|
||||
|
||||
// A system fill with no Background in its name is an icon's or a mark's colour: the text colour.
|
||||
if (Has("SystemFillColor") && !Has("Background"))
|
||||
{
|
||||
return ContrastRole.WindowText;
|
||||
}
|
||||
|
||||
return Has("Button") ? ContrastRole.ButtonFace : ContrastRole.Window;
|
||||
}
|
||||
|
||||
private static object? TryRead(ResourceDictionary dictionary, string key)
|
||||
{
|
||||
try
|
||||
{
|
||||
return dictionary[key];
|
||||
}
|
||||
catch (Exception ex) when (ex is ResourceReferenceKeyNotFoundException or InvalidOperationException or System.Windows.Markup.XamlParseException)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private static Color Read(ResourceDictionary dictionary, string key) =>
|
||||
TryRead(dictionary, key) is Color colour ? colour : throw new InvalidOperationException($"the high-contrast dictionary has no colour {key}");
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace FrameLedger.App.Services;
|
||||
|
||||
/// <summary>
|
||||
/// The contrast theme the App's own colours follow now (beta.35, D91): set while <see cref="ContrastOverlay"/> is installed,
|
||||
/// null otherwise. What WPF UI's theme resources cannot carry reads it — the charts' palette, the frame-generation bar, the
|
||||
/// change badges, the artwork's tint. The UI thread's: set and read there.
|
||||
/// </summary>
|
||||
public static class ContrastTheme
|
||||
{
|
||||
private static ContrastPalette? _active;
|
||||
|
||||
/// <summary>WPF's change notice for a static property: what a binding to <see cref="IsOn"/> listens to, weakly.</summary>
|
||||
public static event EventHandler<PropertyChangedEventArgs>? StaticPropertyChanged;
|
||||
|
||||
/// <summary>The palette, or null while no contrast theme is followed.</summary>
|
||||
public static ContrastPalette? Active
|
||||
{
|
||||
get => _active;
|
||||
internal set
|
||||
{
|
||||
if (Equals(_active, value))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
bool was = IsOn;
|
||||
_active = value;
|
||||
StaticPropertyChanged?.Invoke(null, new PropertyChangedEventArgs(nameof(Active)));
|
||||
if (was != IsOn)
|
||||
{
|
||||
StaticPropertyChanged?.Invoke(null, new PropertyChangedEventArgs(nameof(IsOn)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A contrast theme is followed now — what XAML binds to, <c>{Binding Path=(services:ContrastTheme.IsOn)}</c>, to change
|
||||
/// while it is shown: the Remove button's look (<c>DangerButton</c>), the line under Settings ▸ Theme.
|
||||
/// </summary>
|
||||
public static bool IsOn => _active is not null;
|
||||
}
|
||||
@@ -23,11 +23,9 @@ public sealed class DatabaseMaintenancePrompts : IDatabaseMaintenancePrompts
|
||||
private readonly IAgentRequests _agent;
|
||||
private readonly IFileSaver _files;
|
||||
private readonly RegisteredSettings _settings;
|
||||
private readonly IAnnouncer? _announcer;
|
||||
|
||||
public DatabaseMaintenancePrompts(IContentDialogService dialogs, LedgerDatabase db, IAgentRequests agent, IFileSaver files, RegisteredSettings settings, IAnnouncer? announcer = null)
|
||||
public DatabaseMaintenancePrompts(IContentDialogService dialogs, LedgerDatabase db, IAgentRequests agent, IFileSaver files, RegisteredSettings settings)
|
||||
{
|
||||
_announcer = announcer;
|
||||
_dialogs = dialogs ?? throw new ArgumentNullException(nameof(dialogs));
|
||||
_db = db ?? throw new ArgumentNullException(nameof(db));
|
||||
_agent = agent ?? throw new ArgumentNullException(nameof(agent));
|
||||
@@ -37,7 +35,7 @@ public sealed class DatabaseMaintenancePrompts : IDatabaseMaintenancePrompts
|
||||
|
||||
public async Task ShowAsync(CancellationToken ct = default)
|
||||
{
|
||||
var viewModel = new DatabaseMaintenanceViewModel(new LedgerMaintenance(_db), _db.Path, _agent, _files, this, _settings, announcer: _announcer);
|
||||
var viewModel = new DatabaseMaintenanceViewModel(new LedgerMaintenance(_db), _db.Path, _agent, _files, this, _settings);
|
||||
var dialog = new ContentDialog
|
||||
{
|
||||
Title = Strings.Maintenance_Title,
|
||||
@@ -59,7 +57,7 @@ public sealed class DatabaseMaintenancePrompts : IDatabaseMaintenancePrompts
|
||||
PrimaryButtonAppearance = ControlAppearance.Danger,
|
||||
CloseButtonText = Strings.Common_Cancel,
|
||||
};
|
||||
MessageBoxResult result = await MessageBoxes.ShowAsync(box, ct).ConfigureAwait(true);
|
||||
MessageBoxResult result = await box.ShowDialogAsync(cancellationToken: ct).ConfigureAwait(true);
|
||||
return result == MessageBoxResult.Primary;
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,4 @@ public sealed record DocumentPage(string Title, string Text, string Path, bool I
|
||||
{
|
||||
/// <summary>The same file on GitHub, at this build's source.</summary>
|
||||
public Uri Url => RepositoryLinks.Blob(Path);
|
||||
|
||||
/// <summary>The page list's item as a screen reader reads it (beta.35): the title, never the page's whole text.</summary>
|
||||
public override string ToString() => Title;
|
||||
}
|
||||
@@ -122,25 +122,6 @@ public static class FpsPresentation
|
||||
|
||||
public static string PresentedLine(double? presented) => string.Format(CultureInfo.CurrentCulture, Strings.Fps_Presented_Format, Formats.Fps(presented));
|
||||
|
||||
/// <summary>
|
||||
/// The readout in words, for a screen reader (beta.35, D88). CLAUDE.md rule 6 holds for speech as it does for the eye:
|
||||
/// <c>Native 62 FPS, displayed 118 FPS, frame generation ×1.9</c> — the three together, never the displayed number alone —
|
||||
/// a steady factor with the share of the session it covers, and a stand-alone number with its qualifier.
|
||||
/// </summary>
|
||||
public static string Spoken(FpsReadoutModel model)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(model);
|
||||
return model.Kind switch
|
||||
{
|
||||
FpsReadoutKind.Generated when model.Factor is double factor => model.SteadyShare is double share
|
||||
? string.Format(CultureInfo.CurrentCulture, Strings.A11y_Fps_GeneratedSteady_Format, Formats.Fps(model.Native), Formats.Fps(model.Displayed), factor, share * 100)
|
||||
: string.Format(CultureInfo.CurrentCulture, Strings.A11y_Fps_Generated_Format, Formats.Fps(model.Native), Formats.Fps(model.Displayed), factor),
|
||||
FpsReadoutKind.Presented or FpsReadoutKind.IdentifiedUncounted when model.QualifierText is { } qualifier =>
|
||||
string.Format(CultureInfo.CurrentCulture, Strings.A11y_Fps_Presented_Format, Formats.Fps(model.Presented), qualifier),
|
||||
_ => model.Line,
|
||||
};
|
||||
}
|
||||
|
||||
public static string FactorChip(double factor) => FactorChip(factor, steadyShare: null);
|
||||
|
||||
/// <summary>The factor chip; a steady-state factor always carries the share of the session it describes: <c>×2.0 FG · 75%</c>.</summary>
|
||||
|
||||
@@ -78,10 +78,4 @@ public sealed record FpsReadoutModel
|
||||
public bool QualifierIsWarning => Kind == FpsReadoutKind.IdentifiedUncounted || Qualifier is FpsQualifier.RuntimeLoaded or FpsQualifier.Withheld;
|
||||
|
||||
public string? FactorChip => Kind == FpsReadoutKind.Generated && Factor is double f ? FpsPresentation.FactorChip(f, SteadyShare) : null;
|
||||
|
||||
/// <summary>
|
||||
/// The readout as a screen reader says it (beta.35, D88) — CLAUDE.md rule 6 holds for speech too: Native, Displayed and
|
||||
/// the factor together, a steady factor with the share it covers; a stand-alone number with its qualifier.
|
||||
/// </summary>
|
||||
public string SpokenText => FpsPresentation.Spoken(this);
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
namespace FrameLedger.App.Services;
|
||||
|
||||
/// <summary>
|
||||
/// Tells a screen reader what just appeared (beta.35, owner decision D89): a safety notice, a banner, a short message at the
|
||||
/// bottom of the window, a result. A screen reader reads what has the focus; a notice that appears elsewhere was never
|
||||
/// heard. The words are the ones the window shows, in its language.
|
||||
/// </summary>
|
||||
public interface IAnnouncer
|
||||
{
|
||||
/// <summary>Says <paramref name="text"/> to a screen reader, if one listens.</summary>
|
||||
/// <param name="text">The words, as shown.</param>
|
||||
/// <param name="kind">How the screen reader treats them.</param>
|
||||
/// <param name="activity">What kind of thing speaks (<c>Notice</c>, <c>Strip</c>, <c>Agent</c>…): a screen reader groups announcements by it.</param>
|
||||
void Announce(string text, AnnouncementKind kind, string activity);
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
namespace FrameLedger.App.Services;
|
||||
|
||||
/// <summary>Whether Windows has a contrast theme on, its colours, and when either changes (beta.35, D91).</summary>
|
||||
public interface IContrastSource
|
||||
{
|
||||
/// <summary>A contrast theme is on (Settings ▸ Accessibility ▸ Contrast themes).</summary>
|
||||
bool IsOn { get; }
|
||||
|
||||
/// <summary>Its colours, as Windows has them now — the user's own if edited.</summary>
|
||||
ContrastPalette Palette { get; }
|
||||
|
||||
/// <summary>A contrast theme was turned on or off, or its colours were edited.</summary>
|
||||
event EventHandler? Changed;
|
||||
}
|
||||
@@ -10,8 +10,4 @@ namespace FrameLedger.App.Services;
|
||||
/// whether it is a plain text shown as written rather than Markdown (the GPL's <c>LICENSE</c>) — and, since beta.12 (D45),
|
||||
/// whether Accept covers it: the GPL is shown for information and needs no acceptance (GPLv3 §9).
|
||||
/// </summary>
|
||||
public sealed record LegalDocument(string Key, string Title, string Version, string Text, Uri Url, string Path = "", bool IsPlainText = false, bool RequiresAcceptance = true)
|
||||
{
|
||||
/// <summary>The terms window's list item as a screen reader reads it (beta.35, D88): the title, never the whole document.</summary>
|
||||
public override string ToString() => Title;
|
||||
}
|
||||
public sealed record LegalDocument(string Key, string Title, string Version, string Text, Uri Url, string Path = "", bool IsPlainText = false, bool RequiresAcceptance = true);
|
||||
@@ -1,42 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
using System.Windows;
|
||||
|
||||
namespace FrameLedger.App.Services;
|
||||
|
||||
/// <summary>
|
||||
/// Every message box the App shows is owned by its window (beta.35). WPF UI 4.3.0's <see cref="Wpf.Ui.Controls.MessageBox"/>
|
||||
/// sets no owner (measured 2026-11-09: null before and after it is shown), and an ownerless modal window can fall behind the
|
||||
/// window it was opened from and, when it closes, hand the focus to whichever program Windows activates next. Owned by the
|
||||
/// App's active window, it opens over it and gives the focus back to it, where the control that had the keyboard takes it
|
||||
/// again. Every box goes through here (<c>FocusAndMotionTests.EveryMessageBoxGoesThroughMessageBoxes</c>).
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The App's other dialogs need nothing of the kind: a <c>ContentDialog</c> lives inside the window, and WPF UI's host stores
|
||||
/// the focused element when it opens and focuses it again when it closes (<c>ContentDialogHostController</c>,
|
||||
/// <c>FocusAndMotionTests.AContentDialogGivesTheFocusBackToTheControlThatOpenedIt</c>).
|
||||
/// </remarks>
|
||||
public static class MessageBoxes
|
||||
{
|
||||
/// <summary>Shows <paramref name="box"/> as a dialog owned by the App's active window.</summary>
|
||||
public static async Task<Wpf.Ui.Controls.MessageBoxResult> ShowAsync(Wpf.Ui.Controls.MessageBox box, CancellationToken ct = default)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(box);
|
||||
Own(box);
|
||||
return await box.ShowDialogAsync(cancellationToken: ct).ConfigureAwait(true);
|
||||
}
|
||||
|
||||
/// <summary>The App's active window, else its main one while it is shown, becomes <paramref name="box"/>'s owner.</summary>
|
||||
internal static void Own(Window box)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(box);
|
||||
System.Windows.Application? app = System.Windows.Application.Current;
|
||||
Window? owner = app?.Windows.OfType<Window>().FirstOrDefault(w => w.IsActive && w.IsVisible && !ReferenceEquals(w, box))
|
||||
?? (app?.MainWindow is { IsVisible: true } main && !ReferenceEquals(main, box) ? main : null);
|
||||
if (owner is not null)
|
||||
{
|
||||
box.Owner = owner;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
namespace FrameLedger.App.Services;
|
||||
|
||||
/// <summary>Says nothing: where no screen reader is wired (tests, a viewer's pieces built by hand).</summary>
|
||||
public sealed class NoAnnouncer : IAnnouncer
|
||||
{
|
||||
public static readonly NoAnnouncer Instance = new();
|
||||
|
||||
public void Announce(string text, AnnouncementKind kind, string activity)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,103 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Threading;
|
||||
|
||||
namespace FrameLedger.App.Services;
|
||||
|
||||
/// <summary>
|
||||
/// Ctrl+1 … Ctrl+5 put the keyboard in the page they open (beta.35): once it is shown, its first control takes the focus
|
||||
/// and a screen reader hears its title — its first-level heading. Before, the focus stayed on the control that had it,
|
||||
/// often one of the page that had just gone, and Tab began again at the top of the window. A page chosen in the pane with
|
||||
/// the mouse leaves the focus where WPF UI puts it.
|
||||
/// </summary>
|
||||
public sealed class PageFocus
|
||||
{
|
||||
private readonly IAnnouncer _announcer;
|
||||
private WeakReference<FrameworkElement>? _page;
|
||||
|
||||
public PageFocus(IAnnouncer? announcer = null) => _announcer = announcer ?? NoAnnouncer.Instance;
|
||||
|
||||
/// <summary>The shell's word of the page shown now, after every navigation, by a shortcut or not.</summary>
|
||||
public void Shown(FrameworkElement page)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(page);
|
||||
_page = new WeakReference<FrameworkElement>(page);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// After a shortcut has navigated — or found its page already shown, when WPF UI navigates nowhere — the page shown then
|
||||
/// takes the focus once the dispatcher has laid it out.
|
||||
/// </summary>
|
||||
[SuppressMessage("Usage", "VSTHRD001:Avoid legacy thread switching APIs", Justification = "a WPF application has no JoinableTaskFactory; this posts to the UI thread's own dispatcher, after the new page's layout, and never waits (ScrollBarHiding does the same)")]
|
||||
public void Request()
|
||||
{
|
||||
Dispatcher? dispatcher = System.Windows.Application.Current?.Dispatcher;
|
||||
if (dispatcher is null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_ = dispatcher.BeginInvoke(DispatcherPriority.Loaded, Take);
|
||||
}
|
||||
|
||||
/// <summary>Moves the focus to the page's first control and says its title.</summary>
|
||||
internal void Enter(FrameworkElement page)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(page);
|
||||
_ = page.MoveFocus(new TraversalRequest(FocusNavigationDirection.First));
|
||||
if (Title(page) is { Length: > 0 } title)
|
||||
{
|
||||
_announcer.Announce(title, AnnouncementKind.Status, "Page");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>The page's title: the text of its first first-level heading (beta.35, D90 — every page has exactly one).</summary>
|
||||
internal static string? Title(DependencyObject root)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(root);
|
||||
if (root is TextBlock text && AutomationProperties.GetHeadingLevel(text) == AutomationHeadingLevel.Level1)
|
||||
{
|
||||
return text.Text;
|
||||
}
|
||||
|
||||
int count = VisualTreeHelper.GetChildrenCount(root);
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
if (Title(VisualTreeHelper.GetChild(root, i)) is { } found)
|
||||
{
|
||||
return found;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private void Take()
|
||||
{
|
||||
if (_page?.TryGetTarget(out FrameworkElement? page) != true || page is null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (page.IsLoaded)
|
||||
{
|
||||
Enter(page);
|
||||
return;
|
||||
}
|
||||
|
||||
void OnLoaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
page.Loaded -= OnLoaded;
|
||||
Enter(page);
|
||||
}
|
||||
|
||||
page.Loaded += OnLoaded;
|
||||
}
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Windows;
|
||||
using Wpf.Ui.Animations;
|
||||
using Wpf.Ui.Controls;
|
||||
|
||||
namespace FrameLedger.App.Services;
|
||||
|
||||
/// <summary>
|
||||
/// A page slides in only while Windows' animation effects are on (beta.35): Settings ▸ Accessibility ▸ Visual effects ▸
|
||||
/// Animation effects, which WPF reads as <see cref="SystemParameters.ClientAreaAnimation"/> and announces when it changes.
|
||||
/// WPF UI 4.3.0's navigation plays its own <see cref="Transition.FadeInWithSlide"/> whatever that setting says.
|
||||
/// </summary>
|
||||
public sealed class PageMotion : IDisposable
|
||||
{
|
||||
private readonly NavigationView _navigation;
|
||||
private readonly Func<bool> _animations;
|
||||
|
||||
private PageMotion(NavigationView navigation, Func<bool> animations)
|
||||
{
|
||||
_navigation = navigation;
|
||||
_animations = animations;
|
||||
Apply();
|
||||
SystemParameters.StaticPropertyChanged += OnSystemParameterChanged;
|
||||
}
|
||||
|
||||
/// <summary>The transition for the setting: WPF UI's own while animations are on, none while they are off.</summary>
|
||||
public static Transition For(bool animations) => animations ? Transition.FadeInWithSlide : Transition.None;
|
||||
|
||||
/// <summary>
|
||||
/// Sets <paramref name="navigation"/>'s transition now and whenever the setting changes, until disposed (the shell does
|
||||
/// when its window closes).
|
||||
/// </summary>
|
||||
public static PageMotion Follow(NavigationView navigation, Func<bool>? animations = null)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(navigation);
|
||||
return new PageMotion(navigation, animations ?? (static () => SystemParameters.ClientAreaAnimation));
|
||||
}
|
||||
|
||||
public void Dispose() => SystemParameters.StaticPropertyChanged -= OnSystemParameterChanged;
|
||||
|
||||
/// <summary>Reads the setting again — what a change does; a test calls it with its own reader.</summary>
|
||||
internal void Apply() => _navigation.Transition = For(_animations());
|
||||
|
||||
[SuppressMessage("Usage", "VSTHRD001:Avoid legacy thread switching APIs", Justification = "Windows' setting change can arrive off the UI thread; the navigation is its dispatcher's to change, posted and never waited on")]
|
||||
private void OnSystemParameterChanged(object? sender, PropertyChangedEventArgs e)
|
||||
{
|
||||
if (string.Equals(e.PropertyName, nameof(SystemParameters.ClientAreaAnimation), StringComparison.Ordinal))
|
||||
{
|
||||
_ = _navigation.Dispatcher.BeginInvoke(new Action(Apply));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,9 +14,4 @@ public sealed record SafetyNotice(SafetyNoticeKind Kind, string Title, string Bo
|
||||
|
||||
/// <summary>The one action FR-14 allows on a refusal — acknowledging that the session is recorded without measuring — and a plain Dismiss otherwise (no session is running for the others).</summary>
|
||||
public string ActionText => Kind == SafetyNoticeKind.Refused ? Shared.Strings.Safety_RecordWithoutMeasuring : Strings.Notice_Dismiss;
|
||||
|
||||
/// <summary>The notice in one sentence (beta.35, D88): the list item's name, and its button's help text — what it acknowledges.</summary>
|
||||
public string AccessibleName => SpokenText.TitleAndBody(Title, Body);
|
||||
|
||||
public override string ToString() => AccessibleName;
|
||||
}
|
||||
@@ -22,15 +22,13 @@ public sealed class SafetyNotices : IDisposable
|
||||
private readonly IAgentLink _agent;
|
||||
private readonly IMessageStrip _strip;
|
||||
private readonly TimeProvider _clock;
|
||||
private readonly IAnnouncer _announcer;
|
||||
private readonly UiThread _ui = new();
|
||||
|
||||
public SafetyNotices(IAgentLink agent, IMessageStrip strip, TimeProvider? clock = null, IAnnouncer? announcer = null)
|
||||
public SafetyNotices(IAgentLink agent, IMessageStrip strip, TimeProvider? clock = null)
|
||||
{
|
||||
_agent = agent ?? throw new ArgumentNullException(nameof(agent));
|
||||
_strip = strip ?? throw new ArgumentNullException(nameof(strip));
|
||||
_clock = clock ?? TimeProvider.System;
|
||||
_announcer = announcer ?? NoAnnouncer.Instance;
|
||||
_agent.EventReceived += OnEvent;
|
||||
}
|
||||
|
||||
@@ -130,12 +128,7 @@ public sealed class SafetyNotices : IDisposable
|
||||
SafetyNotice? notice = Translate(envelope);
|
||||
if (notice is not null)
|
||||
{
|
||||
// beta.35 (D89): said as it arrives — a notice above the page is never where a screen reader's focus is.
|
||||
_ui.Post(() =>
|
||||
{
|
||||
Items.Insert(0, notice);
|
||||
_announcer.Announce(notice.AccessibleName, AnnouncementKind.Alert, "Notice");
|
||||
});
|
||||
_ui.Post(() => Items.Insert(0, notice));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,66 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Globalization;
|
||||
using FrameLedger.App.Update;
|
||||
|
||||
namespace FrameLedger.App.Services;
|
||||
|
||||
/// <summary>
|
||||
/// What the shell's banners say to a screen reader (beta.35, D89): the capture agent going away and coming back, and an
|
||||
/// update's steps. Only a change is said — the first state the window shows is read with the window, a download's percent
|
||||
/// ticks are one step, and a rebuilt window (a language change) re-reads the same state and says nothing.
|
||||
/// </summary>
|
||||
[SuppressMessage("Performance", "CA1863:Use 'CompositeFormat'", Justification = "the format strings are resources that follow the UI culture, which changes at runtime")]
|
||||
public sealed class ShellAnnouncements(IAnnouncer announcer)
|
||||
{
|
||||
private readonly IAnnouncer _announcer = announcer ?? throw new ArgumentNullException(nameof(announcer));
|
||||
private bool _agentSeen;
|
||||
private bool _agentBanner;
|
||||
private UpdateStage? _update;
|
||||
|
||||
/// <summary>The agent's state changed; <paramref name="banner"/> is the banner's text, or null when there is none.</summary>
|
||||
public void Agent(AgentConnectionState state, string? banner)
|
||||
{
|
||||
bool shown = banner is not null;
|
||||
if (!_agentSeen)
|
||||
{
|
||||
(_agentSeen, _agentBanner) = (true, shown);
|
||||
return;
|
||||
}
|
||||
|
||||
if (shown && !_agentBanner)
|
||||
{
|
||||
_announcer.Announce(SpokenText.TitleAndBody(Strings.Agent_Banner_Offline_Title, banner), AnnouncementKind.Alert, "Agent");
|
||||
}
|
||||
else if (!shown && _agentBanner && state == AgentConnectionState.Connected)
|
||||
{
|
||||
_announcer.Announce(Strings.A11y_Agent_Connected, AnnouncementKind.Status, "Agent");
|
||||
}
|
||||
|
||||
_agentBanner = shown;
|
||||
}
|
||||
|
||||
/// <summary>The updater's step changed or ticked; <paramref name="banner"/> is the banner's text for that step.</summary>
|
||||
public void Update(UpdateStage stage, string? version, string banner)
|
||||
{
|
||||
UpdateStage? before = _update;
|
||||
_update = stage;
|
||||
if (before is null || before == stage)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
string? said = stage switch
|
||||
{
|
||||
UpdateStage.Downloading => string.Format(CultureInfo.CurrentCulture, Strings.A11y_Update_Downloading_Format, version ?? string.Empty),
|
||||
UpdateStage.Ready or UpdateStage.Deferred or UpdateStage.Applying => SpokenText.TitleAndBody(Strings.Update_Banner_Title, banner),
|
||||
_ => null,
|
||||
};
|
||||
if (said is not null)
|
||||
{
|
||||
_announcer.Announce(said, AnnouncementKind.Status, "Update");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,37 +6,17 @@ using Wpf.Ui.Controls;
|
||||
|
||||
namespace FrameLedger.App.Services;
|
||||
|
||||
/// <summary>
|
||||
/// <see cref="IMessageStrip"/> over the shell's <see cref="ISnackbarService"/> — and, since beta.35 (D89), said to a screen
|
||||
/// reader as it is shown: a message at the bottom of the window that closes after four seconds was never heard. Every
|
||||
/// transient message goes through here (<c>AccessibilityTests.OnlyTheStripShowsASnackbar</c>).
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Every message is drawn in the theme's colours (beta.35), its icon saying which kind it is. WPF UI 4.3.0's Success and
|
||||
/// Caution appearances are fixed colours under white text, 2.78:1 and 2.16:1 in both themes, and no Windows contrast theme
|
||||
/// reaches them; its Secondary one is the theme's, 13.97:1 dark and 16.53:1 light (measured 2026-11-09).
|
||||
/// </remarks>
|
||||
/// <summary><see cref="IMessageStrip"/> over the shell's <see cref="ISnackbarService"/>.</summary>
|
||||
public sealed class SnackbarStrip : IMessageStrip
|
||||
{
|
||||
private static readonly TimeSpan _duration = TimeSpan.FromSeconds(4);
|
||||
private readonly ISnackbarService _snackbar;
|
||||
private readonly IAnnouncer _announcer;
|
||||
|
||||
public SnackbarStrip(ISnackbarService snackbar, IAnnouncer? announcer = null)
|
||||
{
|
||||
_snackbar = snackbar ?? throw new ArgumentNullException(nameof(snackbar));
|
||||
_announcer = announcer ?? NoAnnouncer.Instance;
|
||||
}
|
||||
public SnackbarStrip(ISnackbarService snackbar) => _snackbar = snackbar ?? throw new ArgumentNullException(nameof(snackbar));
|
||||
|
||||
public void Info(string title, string body) => Show(title, body, SymbolRegular.Info24, AnnouncementKind.Status);
|
||||
public void Info(string title, string body) => _snackbar.Show(title, body, ControlAppearance.Secondary, new SymbolIcon(SymbolRegular.Info24), _duration);
|
||||
|
||||
public void Success(string title, string body) => Show(title, body, SymbolRegular.Checkmark24, AnnouncementKind.Status);
|
||||
public void Success(string title, string body) => _snackbar.Show(title, body, ControlAppearance.Success, new SymbolIcon(SymbolRegular.Checkmark24), _duration);
|
||||
|
||||
public void Warn(string title, string body) => Show(title, body, SymbolRegular.Warning24, AnnouncementKind.Alert);
|
||||
|
||||
private void Show(string title, string body, SymbolRegular icon, AnnouncementKind kind)
|
||||
{
|
||||
_snackbar.Show(title, body, ControlAppearance.Secondary, new SymbolIcon(icon), _duration);
|
||||
_announcer.Announce(SpokenText.TitleAndBody(title, body), kind, "Strip");
|
||||
}
|
||||
public void Warn(string title, string body) => _snackbar.Show(title, body, ControlAppearance.Caution, new SymbolIcon(SymbolRegular.Warning24), _duration);
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Globalization;
|
||||
|
||||
namespace FrameLedger.App.Services;
|
||||
|
||||
/// <summary>
|
||||
/// What a screen reader says for a thing the App shows in pieces (beta.35, D88) — a label and its value, a notice's title
|
||||
/// and text, a list of facts — in the UI's language. WPF reads a list's item by its <c>ToString()</c> and a template's
|
||||
/// text only through its control, so the item types and the controls that draw text in a template speak through these.
|
||||
/// </summary>
|
||||
[SuppressMessage("Performance", "CA1863:Use 'CompositeFormat'", Justification = "the format strings are resources that follow the UI culture, which changes at runtime")]
|
||||
public static class SpokenText
|
||||
{
|
||||
/// <summary><c>Runs as: Direct3D 12</c>.</summary>
|
||||
public static string Pair(string label, string? value) =>
|
||||
string.IsNullOrWhiteSpace(value) ? label : string.Format(CultureInfo.CurrentCulture, Strings.A11y_Pair_Format, label, value);
|
||||
|
||||
/// <summary><c>Game: hooking refused. Easy Anti-Cheat was detected in this game.</c></summary>
|
||||
public static string TitleAndBody(string title, string? body) =>
|
||||
string.IsNullOrWhiteSpace(body) ? title : string.Format(CultureInfo.CurrentCulture, Strings.A11y_TitleAndBody_Format, title, body);
|
||||
|
||||
/// <summary>The non-empty parts, in order, separated as the language separates a list.</summary>
|
||||
public static string List(params string?[] parts)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(parts);
|
||||
return string.Join(Strings.A11y_List_Separator, parts.Where(static p => !string.IsNullOrWhiteSpace(p)).Select(static p => p!.Trim()));
|
||||
}
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
using System.ComponentModel;
|
||||
using System.Windows;
|
||||
using Microsoft.Win32;
|
||||
|
||||
namespace FrameLedger.App.Services;
|
||||
|
||||
/// <summary>
|
||||
/// <see cref="IContrastSource"/> over Windows (beta.35, D91): <see cref="SystemParameters.HighContrast"/>, which WPF updates
|
||||
/// and announces on Windows' setting change, and the user-preference event Windows raises when a contrast theme's colours
|
||||
/// are edited while it is on.
|
||||
/// </summary>
|
||||
public sealed class SystemContrastSource : IContrastSource, IDisposable
|
||||
{
|
||||
public SystemContrastSource()
|
||||
{
|
||||
SystemParameters.StaticPropertyChanged += OnSystemParameterChanged;
|
||||
SystemEvents.UserPreferenceChanged += OnUserPreferenceChanged;
|
||||
}
|
||||
|
||||
public event EventHandler? Changed;
|
||||
|
||||
public bool IsOn => SystemParameters.HighContrast;
|
||||
|
||||
public ContrastPalette Palette => ContrastPalette.FromSystem();
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
SystemParameters.StaticPropertyChanged -= OnSystemParameterChanged;
|
||||
SystemEvents.UserPreferenceChanged -= OnUserPreferenceChanged;
|
||||
}
|
||||
|
||||
private void OnSystemParameterChanged(object? sender, PropertyChangedEventArgs e)
|
||||
{
|
||||
if (string.Equals(e.PropertyName, nameof(SystemParameters.HighContrast), StringComparison.Ordinal))
|
||||
{
|
||||
Changed?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnUserPreferenceChanged(object? sender, UserPreferenceChangedEventArgs e)
|
||||
{
|
||||
if (IsOn && e.Category is UserPreferenceCategory.Color or UserPreferenceCategory.Accessibility or UserPreferenceCategory.VisualStyle)
|
||||
{
|
||||
Changed?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
using Wpf.Ui.Appearance;
|
||||
using Wpf.Ui.Controls;
|
||||
|
||||
namespace FrameLedger.App.Services;
|
||||
|
||||
/// <summary>
|
||||
/// What a theme choice comes to (beta.35, D91): the Fluent theme, the windows' backdrop, whether WPF UI watches Windows'
|
||||
/// own theme, and whether a contrast theme's colours go over it. A contrast theme wins over the App's choice while it is on —
|
||||
/// the theme under it is the light or the dark one as the contrast theme is, with no Mica — and the choice applies again
|
||||
/// when it is off.
|
||||
/// </summary>
|
||||
public readonly record struct ThemePlan(ApplicationTheme Theme, WindowBackdropType Backdrop, bool WatchSystem, bool Contrast)
|
||||
{
|
||||
/// <summary>The plan for a choice in a state of Windows.</summary>
|
||||
/// <param name="choice">Settings ▸ Theme.</param>
|
||||
/// <param name="contrastOn">A Windows contrast theme is on.</param>
|
||||
/// <param name="contrastDark">That contrast theme is a dark one (its window colour).</param>
|
||||
/// <param name="systemDark">Windows' own app mode is dark (for <see cref="AppTheme.System"/>).</param>
|
||||
public static ThemePlan For(AppTheme choice, bool contrastOn, bool contrastDark, bool systemDark)
|
||||
{
|
||||
if (contrastOn)
|
||||
{
|
||||
return new(contrastDark ? ApplicationTheme.Dark : ApplicationTheme.Light, WindowBackdropType.None, WatchSystem: false, Contrast: true);
|
||||
}
|
||||
|
||||
return choice switch
|
||||
{
|
||||
AppTheme.System => new(systemDark ? ApplicationTheme.Dark : ApplicationTheme.Light, WindowBackdropType.Mica, WatchSystem: true, Contrast: false),
|
||||
AppTheme.Light => new(ApplicationTheme.Light, WindowBackdropType.Mica, WatchSystem: false, Contrast: false),
|
||||
AppTheme.Dark => new(ApplicationTheme.Dark, WindowBackdropType.Mica, WatchSystem: false, Contrast: false),
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(choice), choice, "not a theme"),
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1,78 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Automation.Peers;
|
||||
using System.Windows.Threading;
|
||||
|
||||
namespace FrameLedger.App.Services;
|
||||
|
||||
/// <summary>
|
||||
/// <see cref="IAnnouncer"/> through UI Automation's notification event (beta.35, D89) — the one place the App raises it.
|
||||
/// Narrator, NVDA and JAWS read a notification raised on a window's peer without moving the focus. WPF's live regions are not
|
||||
/// used: WPF raises <c>LiveRegionChanged</c> only when the app does, which is what this is, said once rather than per line.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <b>Only the App's active window speaks.</b> While a game has the screen, nothing interrupts it: the notice stays in the
|
||||
/// window, and the tray's Windows notifications — which a screen reader reads itself — cover a hidden window. Nothing is
|
||||
/// raised when no screen reader listens.
|
||||
/// </remarks>
|
||||
public sealed class UiaAnnouncer : IAnnouncer
|
||||
{
|
||||
private readonly Func<Window?> _target;
|
||||
private readonly Func<bool> _listening;
|
||||
private readonly Action<AutomationPeer, AutomationNotificationKind, AutomationNotificationProcessing, string, string> _raise;
|
||||
|
||||
/// <summary>The App's: its active window, Windows' own listener check, the peer's own event.</summary>
|
||||
public UiaAnnouncer()
|
||||
: this(ActiveWindow, Listening, Raise)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>For the tests: where it speaks, whether anyone listens, and how it raises the event.</summary>
|
||||
internal UiaAnnouncer(Func<Window?> target, Func<bool> listening, Action<AutomationPeer, AutomationNotificationKind, AutomationNotificationProcessing, string, string> raise)
|
||||
{
|
||||
_target = target ?? throw new ArgumentNullException(nameof(target));
|
||||
_listening = listening ?? throw new ArgumentNullException(nameof(listening));
|
||||
_raise = raise ?? throw new ArgumentNullException(nameof(raise));
|
||||
}
|
||||
|
||||
/// <summary>What the processing of each kind is: every alert read, a status replaced by a newer one of its activity.</summary>
|
||||
public static AutomationNotificationProcessing ProcessingOf(AnnouncementKind kind) =>
|
||||
kind == AnnouncementKind.Alert ? AutomationNotificationProcessing.ImportantAll : AutomationNotificationProcessing.MostRecent;
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "VSTHRD001:Avoid legacy thread switching APIs", Justification = "a WPF application has no JoinableTaskFactory; an event from the pipe posts the announcement to the windows' dispatcher and never waits (UiThread does the same)")]
|
||||
public void Announce(string text, AnnouncementKind kind, string activity)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(text))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Dispatcher? dispatcher = System.Windows.Application.Current?.Dispatcher;
|
||||
if (dispatcher is not null && !dispatcher.CheckAccess())
|
||||
{
|
||||
_ = dispatcher.BeginInvoke(() => Announce(text, kind, activity));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_listening() || _target() is not { } window)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ((UIElementAutomationPeer.FromElement(window) ?? UIElementAutomationPeer.CreatePeerForElement(window)) is { } peer)
|
||||
{
|
||||
_raise(peer, AutomationNotificationKind.Other, ProcessingOf(kind), text, "FrameLedger." + activity);
|
||||
}
|
||||
}
|
||||
|
||||
private static Window? ActiveWindow() =>
|
||||
System.Windows.Application.Current?.Windows.OfType<Window>().FirstOrDefault(static w => w is { IsActive: true, IsVisible: true });
|
||||
|
||||
private static bool Listening() => AutomationPeer.ListenerExists(AutomationEvents.Notification);
|
||||
|
||||
private static void Raise(AutomationPeer peer, AutomationNotificationKind kind, AutomationNotificationProcessing processing, string text, string activity) =>
|
||||
peer.RaiseNotificationEvent(kind, processing, text, activity);
|
||||
}
|
||||
@@ -1,9 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Windows;
|
||||
using System.Windows.Threading;
|
||||
using Wpf.Ui.Appearance;
|
||||
using Wpf.Ui.Controls;
|
||||
|
||||
@@ -14,109 +12,33 @@ namespace FrameLedger.App.Services;
|
||||
/// through <c>SystemThemeWatcher.Watch</c> on the window — which needs an HWND, so the caller passes the window
|
||||
/// from its <c>Loaded</c> handler and never from a constructor — and <c>UnWatch</c> when switching to manual.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <b>A Windows contrast theme wins (beta.35, owner decision D91).</b> While one is on, the App's colours are its colours —
|
||||
/// the light or the dark Fluent theme as the contrast theme is, under <see cref="ContrastOverlay"/>, with no Mica and no
|
||||
/// system-theme watcher (WPF UI's would apply its own high-contrast dictionaries, 84 of whose 97 colours are a red
|
||||
/// placeholder) — whatever Settings ▸ Theme says; the choice applies again when it is turned off. A switch in Windows is
|
||||
/// followed at once (<see cref="IContrastSource.Changed"/>), and each call is the same for the same state, so the windows that
|
||||
/// call it from their constructors change nothing.
|
||||
/// </remarks>
|
||||
public sealed class WpfThemeApplier : IThemeApplier, IDisposable
|
||||
public sealed class WpfThemeApplier : IThemeApplier
|
||||
{
|
||||
private readonly IContrastSource _contrast;
|
||||
private AppTheme _theme = AppTheme.System;
|
||||
private WeakReference<Window>? _window;
|
||||
|
||||
public WpfThemeApplier(IContrastSource contrast)
|
||||
{
|
||||
_contrast = contrast ?? throw new ArgumentNullException(nameof(contrast));
|
||||
_contrast.Changed += OnContrastChanged;
|
||||
}
|
||||
|
||||
public void Apply(AppTheme theme, Window? window)
|
||||
{
|
||||
_theme = theme;
|
||||
if (window is not null)
|
||||
switch (theme)
|
||||
{
|
||||
_window = new WeakReference<Window>(window);
|
||||
}
|
||||
case AppTheme.System:
|
||||
ApplicationThemeManager.Apply(SystemIsDark() ? ApplicationTheme.Dark : ApplicationTheme.Light, WindowBackdropType.Mica, true);
|
||||
if (window is { IsLoaded: true })
|
||||
{
|
||||
SystemThemeWatcher.Watch(window, WindowBackdropType.Mica, true);
|
||||
}
|
||||
|
||||
Window? watched = window ?? (_window?.TryGetTarget(out Window? last) == true ? last : null);
|
||||
bool contrastOn = _contrast.IsOn;
|
||||
ContrastPalette? palette = contrastOn ? _contrast.Palette : null;
|
||||
ThemePlan plan = ThemePlan.For(theme, contrastOn, palette?.IsDark ?? false, SystemIsDark());
|
||||
ResourceDictionary resources = System.Windows.Application.Current.Resources;
|
||||
if (plan.Contrast && palette is not null)
|
||||
{
|
||||
if (watched is not null)
|
||||
{
|
||||
SystemThemeWatcher.UnWatch(watched);
|
||||
}
|
||||
break;
|
||||
case AppTheme.Light:
|
||||
case AppTheme.Dark:
|
||||
if (window is not null)
|
||||
{
|
||||
SystemThemeWatcher.UnWatch(window);
|
||||
}
|
||||
|
||||
// The charts re-read their palette on the theme manager's Changed, which Apply raises: say the contrast first.
|
||||
ContrastTheme.Active = palette;
|
||||
ApplicationThemeManager.Apply(plan.Theme, plan.Backdrop, updateAccent: false);
|
||||
ContrastOverlay.Install(resources, palette);
|
||||
Backdrops(plan.Backdrop);
|
||||
return;
|
||||
}
|
||||
|
||||
bool wasContrast = ContrastOverlay.IsInstalled(resources);
|
||||
ContrastOverlay.Remove(resources);
|
||||
if (plan.WatchSystem)
|
||||
{
|
||||
ApplicationThemeManager.Apply(plan.Theme, plan.Backdrop, true);
|
||||
if (watched is { IsLoaded: true })
|
||||
{
|
||||
SystemThemeWatcher.Watch(watched, plan.Backdrop, true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (watched is not null)
|
||||
{
|
||||
SystemThemeWatcher.UnWatch(watched);
|
||||
}
|
||||
|
||||
ApplicationThemeManager.Apply(plan.Theme, plan.Backdrop, true);
|
||||
}
|
||||
|
||||
if (wasContrast)
|
||||
{
|
||||
Backdrops(plan.Backdrop);
|
||||
ApplicationThemeManager.Apply(theme == AppTheme.Dark ? ApplicationTheme.Dark : ApplicationTheme.Light, WindowBackdropType.Mica, true);
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException(nameof(theme), theme, "not a theme");
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose() => _contrast.Changed -= OnContrastChanged;
|
||||
|
||||
private static bool SystemIsDark() => ApplicationThemeManager.GetSystemTheme() is SystemTheme.Dark or SystemTheme.HCBlack or SystemTheme.Glow or SystemTheme.CapturedMotion;
|
||||
|
||||
/// <summary>Every FluentWindow's backdrop now, and again once a window being built has set its own from its XAML.</summary>
|
||||
[SuppressMessage("Usage", "VSTHRD001:Avoid legacy thread switching APIs", Justification = "a WPF application has no JoinableTaskFactory; this posts to the windows' own dispatcher, after a window being built has loaded its XAML, and never waits (ScrollBarHiding does the same)")]
|
||||
private static void Backdrops(WindowBackdropType backdrop)
|
||||
{
|
||||
static void Sweep(WindowBackdropType type)
|
||||
{
|
||||
foreach (FluentWindow window in System.Windows.Application.Current?.Windows.OfType<FluentWindow>() ?? [])
|
||||
{
|
||||
window.WindowBackdropType = type;
|
||||
}
|
||||
}
|
||||
|
||||
Sweep(backdrop);
|
||||
_ = System.Windows.Application.Current?.Dispatcher.BeginInvoke(DispatcherPriority.Loaded, () => Sweep(backdrop));
|
||||
}
|
||||
|
||||
[SuppressMessage("Usage", "VSTHRD001:Avoid legacy thread switching APIs", Justification = "Windows' setting change can arrive off the UI thread; the theme is the dispatcher's to change, posted and never waited on")]
|
||||
private void OnContrastChanged(object? sender, EventArgs e)
|
||||
{
|
||||
Dispatcher? dispatcher = System.Windows.Application.Current?.Dispatcher;
|
||||
if (dispatcher is null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_ = dispatcher.BeginInvoke(() => Apply(_theme, _window?.TryGetTarget(out Window? window) == true ? window : null));
|
||||
}
|
||||
}
|
||||
Generated
-99
@@ -29,50 +29,18 @@ public static class Strings
|
||||
/// <summary>Every key, for an audit that walks them.</summary>
|
||||
public static IReadOnlyList<string> Keys { get; } =
|
||||
[
|
||||
nameof(A11y_Agent_Connected),
|
||||
nameof(A11y_Change_Format),
|
||||
nameof(A11y_ChangeMarker_Format),
|
||||
nameof(A11y_Chart_Clocks),
|
||||
nameof(A11y_Chart_Compare),
|
||||
nameof(A11y_Chart_ControlType),
|
||||
nameof(A11y_Chart_Frametime),
|
||||
nameof(A11y_Chart_Histogram),
|
||||
nameof(A11y_Chart_Keys),
|
||||
nameof(A11y_Chart_Latency),
|
||||
nameof(A11y_Chart_Percentiles),
|
||||
nameof(A11y_Chart_Ram),
|
||||
nameof(A11y_Chart_RenderScale),
|
||||
nameof(A11y_Chart_Temps),
|
||||
nameof(A11y_Chart_Trend),
|
||||
nameof(A11y_Chart_Vram),
|
||||
nameof(A11y_ChartData_Compare),
|
||||
nameof(A11y_ChartData_Latency),
|
||||
nameof(A11y_ChartData_Sessions),
|
||||
nameof(A11y_ChartData_Summary),
|
||||
nameof(A11y_Chip_Format),
|
||||
nameof(A11y_Compare_Best_Format),
|
||||
nameof(A11y_Compare_Filter_Fg),
|
||||
nameof(A11y_Compare_Filter_Game),
|
||||
nameof(A11y_Compare_Filter_Tier),
|
||||
nameof(A11y_Empty),
|
||||
nameof(A11y_Fps_Generated_Format),
|
||||
nameof(A11y_Fps_GeneratedSteady_Format),
|
||||
nameof(A11y_Fps_Presented_Format),
|
||||
nameof(A11y_Games_Filter_Engine),
|
||||
nameof(A11y_Games_Filter_Installed),
|
||||
nameof(A11y_Games_Filter_Played),
|
||||
nameof(A11y_Games_Filter_State),
|
||||
nameof(A11y_Games_Filter_Store),
|
||||
nameof(A11y_Games_Sort),
|
||||
nameof(A11y_List_Separator),
|
||||
nameof(A11y_Logs_Level),
|
||||
nameof(A11y_Logs_Source),
|
||||
nameof(A11y_Logs_Tail),
|
||||
nameof(A11y_Pair_Format),
|
||||
nameof(A11y_SensorStat_Format),
|
||||
nameof(A11y_TitleAndBody_Format),
|
||||
nameof(A11y_ToggleSection_Format),
|
||||
nameof(A11y_Update_Downloading_Format),
|
||||
nameof(About_Doc_Notice),
|
||||
nameof(About_Doc_Packages),
|
||||
nameof(About_Doc_ThirdParty),
|
||||
@@ -1033,7 +1001,6 @@ public static class Strings
|
||||
nameof(Settings_System_Copy),
|
||||
nameof(Settings_System_Header),
|
||||
nameof(Settings_System_Note),
|
||||
nameof(Settings_Theme_ContrastOn),
|
||||
nameof(Settings_Theme_Dark),
|
||||
nameof(Settings_Theme_Label),
|
||||
nameof(Settings_Theme_Light),
|
||||
@@ -1262,64 +1229,12 @@ public static class Strings
|
||||
nameof(Viewer_ChangesThisPc_Off),
|
||||
];
|
||||
|
||||
public static string A11y_Agent_Connected => ResourceManager.GetString(nameof(A11y_Agent_Connected), Culture) ?? nameof(A11y_Agent_Connected);
|
||||
|
||||
public static string A11y_Change_Format => ResourceManager.GetString(nameof(A11y_Change_Format), Culture) ?? nameof(A11y_Change_Format);
|
||||
|
||||
public static string A11y_ChangeMarker_Format => ResourceManager.GetString(nameof(A11y_ChangeMarker_Format), Culture) ?? nameof(A11y_ChangeMarker_Format);
|
||||
|
||||
public static string A11y_Chart_Clocks => ResourceManager.GetString(nameof(A11y_Chart_Clocks), Culture) ?? nameof(A11y_Chart_Clocks);
|
||||
|
||||
public static string A11y_Chart_Compare => ResourceManager.GetString(nameof(A11y_Chart_Compare), Culture) ?? nameof(A11y_Chart_Compare);
|
||||
|
||||
public static string A11y_Chart_ControlType => ResourceManager.GetString(nameof(A11y_Chart_ControlType), Culture) ?? nameof(A11y_Chart_ControlType);
|
||||
|
||||
public static string A11y_Chart_Frametime => ResourceManager.GetString(nameof(A11y_Chart_Frametime), Culture) ?? nameof(A11y_Chart_Frametime);
|
||||
|
||||
public static string A11y_Chart_Histogram => ResourceManager.GetString(nameof(A11y_Chart_Histogram), Culture) ?? nameof(A11y_Chart_Histogram);
|
||||
|
||||
public static string A11y_Chart_Keys => ResourceManager.GetString(nameof(A11y_Chart_Keys), Culture) ?? nameof(A11y_Chart_Keys);
|
||||
|
||||
public static string A11y_Chart_Latency => ResourceManager.GetString(nameof(A11y_Chart_Latency), Culture) ?? nameof(A11y_Chart_Latency);
|
||||
|
||||
public static string A11y_Chart_Percentiles => ResourceManager.GetString(nameof(A11y_Chart_Percentiles), Culture) ?? nameof(A11y_Chart_Percentiles);
|
||||
|
||||
public static string A11y_Chart_Ram => ResourceManager.GetString(nameof(A11y_Chart_Ram), Culture) ?? nameof(A11y_Chart_Ram);
|
||||
|
||||
public static string A11y_Chart_RenderScale => ResourceManager.GetString(nameof(A11y_Chart_RenderScale), Culture) ?? nameof(A11y_Chart_RenderScale);
|
||||
|
||||
public static string A11y_Chart_Temps => ResourceManager.GetString(nameof(A11y_Chart_Temps), Culture) ?? nameof(A11y_Chart_Temps);
|
||||
|
||||
public static string A11y_Chart_Trend => ResourceManager.GetString(nameof(A11y_Chart_Trend), Culture) ?? nameof(A11y_Chart_Trend);
|
||||
|
||||
public static string A11y_Chart_Vram => ResourceManager.GetString(nameof(A11y_Chart_Vram), Culture) ?? nameof(A11y_Chart_Vram);
|
||||
|
||||
public static string A11y_ChartData_Compare => ResourceManager.GetString(nameof(A11y_ChartData_Compare), Culture) ?? nameof(A11y_ChartData_Compare);
|
||||
|
||||
public static string A11y_ChartData_Latency => ResourceManager.GetString(nameof(A11y_ChartData_Latency), Culture) ?? nameof(A11y_ChartData_Latency);
|
||||
|
||||
public static string A11y_ChartData_Sessions => ResourceManager.GetString(nameof(A11y_ChartData_Sessions), Culture) ?? nameof(A11y_ChartData_Sessions);
|
||||
|
||||
public static string A11y_ChartData_Summary => ResourceManager.GetString(nameof(A11y_ChartData_Summary), Culture) ?? nameof(A11y_ChartData_Summary);
|
||||
|
||||
public static string A11y_Chip_Format => ResourceManager.GetString(nameof(A11y_Chip_Format), Culture) ?? nameof(A11y_Chip_Format);
|
||||
|
||||
public static string A11y_Compare_Best_Format => ResourceManager.GetString(nameof(A11y_Compare_Best_Format), Culture) ?? nameof(A11y_Compare_Best_Format);
|
||||
|
||||
public static string A11y_Compare_Filter_Fg => ResourceManager.GetString(nameof(A11y_Compare_Filter_Fg), Culture) ?? nameof(A11y_Compare_Filter_Fg);
|
||||
|
||||
public static string A11y_Compare_Filter_Game => ResourceManager.GetString(nameof(A11y_Compare_Filter_Game), Culture) ?? nameof(A11y_Compare_Filter_Game);
|
||||
|
||||
public static string A11y_Compare_Filter_Tier => ResourceManager.GetString(nameof(A11y_Compare_Filter_Tier), Culture) ?? nameof(A11y_Compare_Filter_Tier);
|
||||
|
||||
public static string A11y_Empty => ResourceManager.GetString(nameof(A11y_Empty), Culture) ?? nameof(A11y_Empty);
|
||||
|
||||
public static string A11y_Fps_Generated_Format => ResourceManager.GetString(nameof(A11y_Fps_Generated_Format), Culture) ?? nameof(A11y_Fps_Generated_Format);
|
||||
|
||||
public static string A11y_Fps_GeneratedSteady_Format => ResourceManager.GetString(nameof(A11y_Fps_GeneratedSteady_Format), Culture) ?? nameof(A11y_Fps_GeneratedSteady_Format);
|
||||
|
||||
public static string A11y_Fps_Presented_Format => ResourceManager.GetString(nameof(A11y_Fps_Presented_Format), Culture) ?? nameof(A11y_Fps_Presented_Format);
|
||||
|
||||
public static string A11y_Games_Filter_Engine => ResourceManager.GetString(nameof(A11y_Games_Filter_Engine), Culture) ?? nameof(A11y_Games_Filter_Engine);
|
||||
|
||||
public static string A11y_Games_Filter_Installed => ResourceManager.GetString(nameof(A11y_Games_Filter_Installed), Culture) ?? nameof(A11y_Games_Filter_Installed);
|
||||
@@ -1332,24 +1247,12 @@ public static class Strings
|
||||
|
||||
public static string A11y_Games_Sort => ResourceManager.GetString(nameof(A11y_Games_Sort), Culture) ?? nameof(A11y_Games_Sort);
|
||||
|
||||
public static string A11y_List_Separator => ResourceManager.GetString(nameof(A11y_List_Separator), Culture) ?? nameof(A11y_List_Separator);
|
||||
|
||||
public static string A11y_Logs_Level => ResourceManager.GetString(nameof(A11y_Logs_Level), Culture) ?? nameof(A11y_Logs_Level);
|
||||
|
||||
public static string A11y_Logs_Source => ResourceManager.GetString(nameof(A11y_Logs_Source), Culture) ?? nameof(A11y_Logs_Source);
|
||||
|
||||
public static string A11y_Logs_Tail => ResourceManager.GetString(nameof(A11y_Logs_Tail), Culture) ?? nameof(A11y_Logs_Tail);
|
||||
|
||||
public static string A11y_Pair_Format => ResourceManager.GetString(nameof(A11y_Pair_Format), Culture) ?? nameof(A11y_Pair_Format);
|
||||
|
||||
public static string A11y_SensorStat_Format => ResourceManager.GetString(nameof(A11y_SensorStat_Format), Culture) ?? nameof(A11y_SensorStat_Format);
|
||||
|
||||
public static string A11y_TitleAndBody_Format => ResourceManager.GetString(nameof(A11y_TitleAndBody_Format), Culture) ?? nameof(A11y_TitleAndBody_Format);
|
||||
|
||||
public static string A11y_ToggleSection_Format => ResourceManager.GetString(nameof(A11y_ToggleSection_Format), Culture) ?? nameof(A11y_ToggleSection_Format);
|
||||
|
||||
public static string A11y_Update_Downloading_Format => ResourceManager.GetString(nameof(A11y_Update_Downloading_Format), Culture) ?? nameof(A11y_Update_Downloading_Format);
|
||||
|
||||
public static string About_Doc_Notice => ResourceManager.GetString(nameof(About_Doc_Notice), Culture) ?? nameof(About_Doc_Notice);
|
||||
|
||||
public static string About_Doc_Packages => ResourceManager.GetString(nameof(About_Doc_Packages), Culture) ?? nameof(About_Doc_Packages);
|
||||
@@ -3270,8 +3173,6 @@ public static class Strings
|
||||
|
||||
public static string Settings_System_Note => ResourceManager.GetString(nameof(Settings_System_Note), Culture) ?? nameof(Settings_System_Note);
|
||||
|
||||
public static string Settings_Theme_ContrastOn => ResourceManager.GetString(nameof(Settings_Theme_ContrastOn), Culture) ?? nameof(Settings_Theme_ContrastOn);
|
||||
|
||||
public static string Settings_Theme_Dark => ResourceManager.GetString(nameof(Settings_Theme_Dark), Culture) ?? nameof(Settings_Theme_Dark);
|
||||
|
||||
public static string Settings_Theme_Label => ResourceManager.GetString(nameof(Settings_Theme_Label), Culture) ?? nameof(Settings_Theme_Label);
|
||||
|
||||
@@ -425,10 +425,6 @@
|
||||
<value>テーマ</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Settings_Theme_ContrastOn" xml:space="preserve">
|
||||
<value>Windows のコントラスト テーマがオンのため、FrameLedger はその色を使います。ここでの選択は、テーマをオフにすると再び適用されます。</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="Settings_Theme_Light" xml:space="preserve">
|
||||
<value>ライト</value>
|
||||
<comment>review</comment>
|
||||
@@ -4832,132 +4828,4 @@
|
||||
<value>アルファ版 — プレリリース版の .NET である {0} で動作</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="A11y_Pair_Format" xml:space="preserve">
|
||||
<value>{0}:{1}</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="A11y_TitleAndBody_Format" xml:space="preserve">
|
||||
<value>{0}。{1}</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="A11y_List_Separator" xml:space="preserve">
|
||||
<value>、</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="A11y_Empty" xml:space="preserve">
|
||||
<value>空欄</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="A11y_Chip_Format" xml:space="preserve">
|
||||
<value>{0}:{1}({2})</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="A11y_Change_Format" xml:space="preserve">
|
||||
<value>変更 {0}</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="A11y_ChangeMarker_Format" xml:space="preserve">
|
||||
<value>変更 {0}、{1}:{2}</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="A11y_Compare_Best_Format" xml:space="preserve">
|
||||
<value>{0}(最良)</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="A11y_SensorStat_Format" xml:space="preserve">
|
||||
<value>{0}:平均 {1}、中央値 {2}、最小 {3}、最大 {4}({5} 回の読み取り)</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="A11y_Fps_Generated_Format" xml:space="preserve">
|
||||
<value>ネイティブ {0} FPS、表示 {1} FPS、フレーム生成 ×{2:0.0}</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="A11y_Fps_GeneratedSteady_Format" xml:space="preserve">
|
||||
<value>ネイティブ {0} FPS、表示 {1} FPS、フレーム生成 ×{2:0.0}(セッションの {3:0}%)</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="A11y_Fps_Presented_Format" xml:space="preserve">
|
||||
<value>表示された {0} FPS(Presented)。{1}</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="A11y_ToggleSection_Format" xml:space="preserve">
|
||||
<value>表示/非表示:{0}</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="A11y_Agent_Connected" xml:space="preserve">
|
||||
<value>キャプチャエージェントに再接続しました。</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="A11y_Update_Downloading_Format" xml:space="preserve">
|
||||
<value>バージョン {0} をダウンロードしています。</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="A11y_Chart_ControlType" xml:space="preserve">
|
||||
<value>グラフ</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="A11y_Chart_Keys" xml:space="preserve">
|
||||
<value>矢印キーで表示範囲を移動、Ctrl と矢印キーで拡大・縮小、A キーまたはダブルクリックで全体を表示します。</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="A11y_Chart_Frametime" xml:space="preserve">
|
||||
<value>フレーム時間のグラフ</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="A11y_Chart_Histogram" xml:space="preserve">
|
||||
<value>FPS のヒストグラム</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="A11y_Chart_Percentiles" xml:space="preserve">
|
||||
<value>パーセンタイル別のフレームレート</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="A11y_Chart_Temps" xml:space="preserve">
|
||||
<value>温度・負荷・電力のグラフ</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="A11y_Chart_Vram" xml:space="preserve">
|
||||
<value>ビデオメモリのグラフ</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="A11y_Chart_Ram" xml:space="preserve">
|
||||
<value>メモリのグラフ</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="A11y_Chart_Clocks" xml:space="preserve">
|
||||
<value>クロックとファンのグラフ</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="A11y_Chart_Compare" xml:space="preserve">
|
||||
<value>パーセンタイル別のフレームレート(セッションごとに 1 本)</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="A11y_Chart_Latency" xml:space="preserve">
|
||||
<value>レイテンシのグラフ</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="A11y_Chart_Trend" xml:space="preserve">
|
||||
<value>推移のグラフ(セッションごとに 1 点)</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="A11y_Chart_RenderScale" xml:space="preserve">
|
||||
<value>レンダースケールのグラフ</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="A11y_ChartData_Summary" xml:space="preserve">
|
||||
<value>セッションの数値と「系列ごとの統計」にこれらの数値が書かれています。ファイル ▸ エクスポート ▸ Session CSV ですべての点を保存できます。</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="A11y_ChartData_Sessions" xml:space="preserve">
|
||||
<value>「セッション」タブの表に各セッションの数値があり、変更はグラフの下に一覧されています。</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="A11y_ChartData_Compare" xml:space="preserve">
|
||||
<value>グラフの下の表に各セッションの数値があります。</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
<data name="A11y_ChartData_Latency" xml:space="preserve">
|
||||
<value>平均と 95 パーセンタイルはグラフの上に書かれています。</value>
|
||||
<comment>review</comment>
|
||||
</data>
|
||||
</root>
|
||||
@@ -324,9 +324,6 @@
|
||||
<data name="Settings_Theme_Label" xml:space="preserve">
|
||||
<value>Theme</value>
|
||||
</data>
|
||||
<data name="Settings_Theme_ContrastOn" xml:space="preserve">
|
||||
<value>A Windows contrast theme is on, so FrameLedger uses its colours. The choice here applies again when it is off.</value>
|
||||
</data>
|
||||
<data name="Settings_Theme_Light" xml:space="preserve">
|
||||
<value>Light</value>
|
||||
</data>
|
||||
@@ -3635,100 +3632,4 @@ The documents below are the full terms; this summary does not replace them.</val
|
||||
<data name="About_Runtime_Alpha_Format" xml:space="preserve">
|
||||
<value>Alpha build — runs on {0}, a prerelease .NET</value>
|
||||
</data>
|
||||
<data name="A11y_Pair_Format" xml:space="preserve">
|
||||
<value>{0}: {1}</value>
|
||||
</data>
|
||||
<data name="A11y_TitleAndBody_Format" xml:space="preserve">
|
||||
<value>{0}. {1}</value>
|
||||
</data>
|
||||
<data name="A11y_List_Separator" xml:space="preserve">
|
||||
<value>, </value>
|
||||
</data>
|
||||
<data name="A11y_Empty" xml:space="preserve">
|
||||
<value>empty</value>
|
||||
</data>
|
||||
<data name="A11y_Chip_Format" xml:space="preserve">
|
||||
<value>{0}: {1}, {2}</value>
|
||||
</data>
|
||||
<data name="A11y_Change_Format" xml:space="preserve">
|
||||
<value>Change {0}</value>
|
||||
</data>
|
||||
<data name="A11y_ChangeMarker_Format" xml:space="preserve">
|
||||
<value>Change {0}, {1}: {2}</value>
|
||||
</data>
|
||||
<data name="A11y_Compare_Best_Format" xml:space="preserve">
|
||||
<value>{0}, the best</value>
|
||||
</data>
|
||||
<data name="A11y_SensorStat_Format" xml:space="preserve">
|
||||
<value>{0}: mean {1}, median {2}, lowest {3}, highest {4}, over {5} readings</value>
|
||||
</data>
|
||||
<data name="A11y_Fps_Generated_Format" xml:space="preserve">
|
||||
<value>Native {0} FPS, displayed {1} FPS, frame generation ×{2:0.0}</value>
|
||||
</data>
|
||||
<data name="A11y_Fps_GeneratedSteady_Format" xml:space="preserve">
|
||||
<value>Native {0} FPS, displayed {1} FPS, frame generation ×{2:0.0} for {3:0}% of the session</value>
|
||||
</data>
|
||||
<data name="A11y_Fps_Presented_Format" xml:space="preserve">
|
||||
<value>{0} presented FPS. {1}</value>
|
||||
</data>
|
||||
<data name="A11y_ToggleSection_Format" xml:space="preserve">
|
||||
<value>Show or hide: {0}</value>
|
||||
</data>
|
||||
<data name="A11y_Agent_Connected" xml:space="preserve">
|
||||
<value>The capture agent is connected again.</value>
|
||||
</data>
|
||||
<data name="A11y_Update_Downloading_Format" xml:space="preserve">
|
||||
<value>Downloading version {0}.</value>
|
||||
</data>
|
||||
<data name="A11y_Chart_ControlType" xml:space="preserve">
|
||||
<value>chart</value>
|
||||
</data>
|
||||
<data name="A11y_Chart_Keys" xml:space="preserve">
|
||||
<value>Arrow keys move the view, Ctrl with an arrow key zooms, and A or a double-click shows all of it.</value>
|
||||
</data>
|
||||
<data name="A11y_Chart_Frametime" xml:space="preserve">
|
||||
<value>Frame time chart</value>
|
||||
</data>
|
||||
<data name="A11y_Chart_Histogram" xml:space="preserve">
|
||||
<value>FPS histogram</value>
|
||||
</data>
|
||||
<data name="A11y_Chart_Percentiles" xml:space="preserve">
|
||||
<value>Frame rate by percentile</value>
|
||||
</data>
|
||||
<data name="A11y_Chart_Temps" xml:space="preserve">
|
||||
<value>Temperatures, load and power chart</value>
|
||||
</data>
|
||||
<data name="A11y_Chart_Vram" xml:space="preserve">
|
||||
<value>Video memory chart</value>
|
||||
</data>
|
||||
<data name="A11y_Chart_Ram" xml:space="preserve">
|
||||
<value>Memory chart</value>
|
||||
</data>
|
||||
<data name="A11y_Chart_Clocks" xml:space="preserve">
|
||||
<value>Clocks and fan chart</value>
|
||||
</data>
|
||||
<data name="A11y_Chart_Compare" xml:space="preserve">
|
||||
<value>Frame rate by percentile, one curve per session</value>
|
||||
</data>
|
||||
<data name="A11y_Chart_Latency" xml:space="preserve">
|
||||
<value>Latency chart</value>
|
||||
</data>
|
||||
<data name="A11y_Chart_Trend" xml:space="preserve">
|
||||
<value>Trend chart, one point per session</value>
|
||||
</data>
|
||||
<data name="A11y_Chart_RenderScale" xml:space="preserve">
|
||||
<value>Render scale chart</value>
|
||||
</data>
|
||||
<data name="A11y_ChartData_Summary" xml:space="preserve">
|
||||
<value>The session's figures and Statistics per series write these numbers out; File ▸ Export ▸ Session CSV saves every point.</value>
|
||||
</data>
|
||||
<data name="A11y_ChartData_Sessions" xml:space="preserve">
|
||||
<value>The Sessions tab's table lists each session's figures, and the changes are listed under the chart.</value>
|
||||
</data>
|
||||
<data name="A11y_ChartData_Compare" xml:space="preserve">
|
||||
<value>The table under the chart lists each session's figures.</value>
|
||||
</data>
|
||||
<data name="A11y_ChartData_Latency" xml:space="preserve">
|
||||
<value>The average and the 95th percentile are written above the chart.</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -319,9 +319,6 @@
|
||||
<data name="Settings_Theme_Label" xml:space="preserve">
|
||||
<value>Chủ đề</value>
|
||||
</data>
|
||||
<data name="Settings_Theme_ContrastOn" xml:space="preserve">
|
||||
<value>Một contrast theme của Windows đang bật nên FrameLedger dùng màu của nó. Lựa chọn ở đây sẽ áp dụng lại khi tắt contrast theme.</value>
|
||||
</data>
|
||||
<data name="Settings_Theme_Light" xml:space="preserve">
|
||||
<value>Sáng</value>
|
||||
</data>
|
||||
@@ -3630,100 +3627,4 @@ Các văn bản bên dưới là điều khoản đầy đủ; bản tóm tắt
|
||||
<data name="About_Runtime_Alpha_Format" xml:space="preserve">
|
||||
<value>Bản alpha — chạy trên {0}, một phiên bản .NET chưa phát hành chính thức</value>
|
||||
</data>
|
||||
<data name="A11y_Pair_Format" xml:space="preserve">
|
||||
<value>{0}: {1}</value>
|
||||
</data>
|
||||
<data name="A11y_TitleAndBody_Format" xml:space="preserve">
|
||||
<value>{0}. {1}</value>
|
||||
</data>
|
||||
<data name="A11y_List_Separator" xml:space="preserve">
|
||||
<value>, </value>
|
||||
</data>
|
||||
<data name="A11y_Empty" xml:space="preserve">
|
||||
<value>trống</value>
|
||||
</data>
|
||||
<data name="A11y_Chip_Format" xml:space="preserve">
|
||||
<value>{0}: {1}, {2}</value>
|
||||
</data>
|
||||
<data name="A11y_Change_Format" xml:space="preserve">
|
||||
<value>Thay đổi {0}</value>
|
||||
</data>
|
||||
<data name="A11y_ChangeMarker_Format" xml:space="preserve">
|
||||
<value>Thay đổi {0}, {1}: {2}</value>
|
||||
</data>
|
||||
<data name="A11y_Compare_Best_Format" xml:space="preserve">
|
||||
<value>{0}, tốt nhất</value>
|
||||
</data>
|
||||
<data name="A11y_SensorStat_Format" xml:space="preserve">
|
||||
<value>{0}: trung bình {1}, trung vị {2}, thấp nhất {3}, cao nhất {4}, trên {5} lần đọc</value>
|
||||
</data>
|
||||
<data name="A11y_Fps_Generated_Format" xml:space="preserve">
|
||||
<value>FPS gốc (Native) {0}, FPS hiển thị {1}, tạo khung hình ×{2:0.0}</value>
|
||||
</data>
|
||||
<data name="A11y_Fps_GeneratedSteady_Format" xml:space="preserve">
|
||||
<value>FPS gốc (Native) {0}, FPS hiển thị {1}, tạo khung hình ×{2:0.0} trong {3:0}% phiên</value>
|
||||
</data>
|
||||
<data name="A11y_Fps_Presented_Format" xml:space="preserve">
|
||||
<value>{0} FPS được trình chiếu (Presented). {1}</value>
|
||||
</data>
|
||||
<data name="A11y_ToggleSection_Format" xml:space="preserve">
|
||||
<value>Hiện hoặc ẩn: {0}</value>
|
||||
</data>
|
||||
<data name="A11y_Agent_Connected" xml:space="preserve">
|
||||
<value>Capture agent đã kết nối lại.</value>
|
||||
</data>
|
||||
<data name="A11y_Update_Downloading_Format" xml:space="preserve">
|
||||
<value>Đang tải phiên bản {0}.</value>
|
||||
</data>
|
||||
<data name="A11y_Chart_ControlType" xml:space="preserve">
|
||||
<value>biểu đồ</value>
|
||||
</data>
|
||||
<data name="A11y_Chart_Keys" xml:space="preserve">
|
||||
<value>Phím mũi tên di chuyển khung nhìn, Ctrl kèm phím mũi tên để phóng to/thu nhỏ, A hoặc nhấp đúp để xem toàn bộ.</value>
|
||||
</data>
|
||||
<data name="A11y_Chart_Frametime" xml:space="preserve">
|
||||
<value>Biểu đồ thời gian khung hình</value>
|
||||
</data>
|
||||
<data name="A11y_Chart_Histogram" xml:space="preserve">
|
||||
<value>Biểu đồ phân bố FPS</value>
|
||||
</data>
|
||||
<data name="A11y_Chart_Percentiles" xml:space="preserve">
|
||||
<value>Tốc độ khung hình theo bách phân vị</value>
|
||||
</data>
|
||||
<data name="A11y_Chart_Temps" xml:space="preserve">
|
||||
<value>Biểu đồ nhiệt độ, tải và công suất</value>
|
||||
</data>
|
||||
<data name="A11y_Chart_Vram" xml:space="preserve">
|
||||
<value>Biểu đồ bộ nhớ video</value>
|
||||
</data>
|
||||
<data name="A11y_Chart_Ram" xml:space="preserve">
|
||||
<value>Biểu đồ bộ nhớ</value>
|
||||
</data>
|
||||
<data name="A11y_Chart_Clocks" xml:space="preserve">
|
||||
<value>Biểu đồ xung nhịp và quạt</value>
|
||||
</data>
|
||||
<data name="A11y_Chart_Compare" xml:space="preserve">
|
||||
<value>Tốc độ khung hình theo bách phân vị, mỗi phiên một đường</value>
|
||||
</data>
|
||||
<data name="A11y_Chart_Latency" xml:space="preserve">
|
||||
<value>Biểu đồ độ trễ</value>
|
||||
</data>
|
||||
<data name="A11y_Chart_Trend" xml:space="preserve">
|
||||
<value>Biểu đồ xu hướng, mỗi phiên một điểm</value>
|
||||
</data>
|
||||
<data name="A11y_Chart_RenderScale" xml:space="preserve">
|
||||
<value>Biểu đồ tỉ lệ render</value>
|
||||
</data>
|
||||
<data name="A11y_ChartData_Summary" xml:space="preserve">
|
||||
<value>Các số liệu của phiên và mục Thống kê theo chuỗi ghi các số này thành chữ; Tệp ▸ Xuất ▸ Session CSV lưu mọi điểm.</value>
|
||||
</data>
|
||||
<data name="A11y_ChartData_Sessions" xml:space="preserve">
|
||||
<value>Bảng ở thẻ Phiên liệt kê số liệu của từng phiên, các thay đổi được liệt kê dưới biểu đồ.</value>
|
||||
</data>
|
||||
<data name="A11y_ChartData_Compare" xml:space="preserve">
|
||||
<value>Bảng dưới biểu đồ liệt kê số liệu của từng phiên.</value>
|
||||
</data>
|
||||
<data name="A11y_ChartData_Latency" xml:space="preserve">
|
||||
<value>Giá trị trung bình và bách phân vị 95 được ghi phía trên biểu đồ.</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -6,7 +6,6 @@
|
||||
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
|
||||
xmlns:controls="clr-namespace:FrameLedger.App.Controls"
|
||||
xmlns:converters="clr-namespace:FrameLedger.App.Converters"
|
||||
xmlns:services="clr-namespace:FrameLedger.App.Services"
|
||||
xmlns:res="clr-namespace:FrameLedger.App">
|
||||
<!--
|
||||
Our styles, merged LAST (16_WPFUI_SYNTAX §App bootstrap). Colours only through theme brushes with
|
||||
@@ -23,47 +22,6 @@
|
||||
<converters:NotNullConverter x:Key="NotNull" />
|
||||
<converters:ZeroToVisibleConverter x:Key="ZeroToVisible" />
|
||||
|
||||
<!--
|
||||
Every ui:Button: WPF UI's style and two changes (beta.35). WPF UI 4.3.0's Danger appearance paints a fixed #F44336 — a
|
||||
value in its button style, not a resource — under the button's own text, white in the dark theme: 3.68:1. A Danger
|
||||
button's text is the theme's dark text on that red instead, 5.3:1 and 5.7:1 in the two themes. Under a Windows contrast
|
||||
theme (D91), where no resource reaches that red, it is the theme's own button, as every button there is; its words and
|
||||
its icon still say what it does. Implicit, so the buttons of WPF UI's message boxes get it too (Remove game, Delete
|
||||
sessions, Database maintenance).
|
||||
-->
|
||||
<Style TargetType="ui:Button" BasedOn="{StaticResource {x:Type ui:Button}}">
|
||||
<Style.Triggers>
|
||||
<Trigger Property="Appearance" Value="Danger">
|
||||
<Setter Property="Foreground" Value="{DynamicResource TextFillColorDarkPrimaryBrush}" />
|
||||
<Setter Property="PressedForeground" Value="{DynamicResource TextFillColorDarkPrimaryBrush}" />
|
||||
</Trigger>
|
||||
<MultiDataTrigger>
|
||||
<MultiDataTrigger.Conditions>
|
||||
<Condition Binding="{Binding Appearance, RelativeSource={RelativeSource Self}}" Value="Danger" />
|
||||
<Condition Binding="{Binding Path=(services:ContrastTheme.IsOn)}" Value="True" />
|
||||
</MultiDataTrigger.Conditions>
|
||||
<Setter Property="Background" Value="{DynamicResource ButtonBackground}" />
|
||||
<Setter Property="MouseOverBackground" Value="{DynamicResource ButtonBackgroundPointerOver}" />
|
||||
<Setter Property="PressedBackground" Value="{DynamicResource ButtonBackgroundPressed}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource ButtonForeground}" />
|
||||
<Setter Property="PressedForeground" Value="{DynamicResource ButtonForegroundPressed}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ControlElevationBorderBrush}" />
|
||||
<Setter Property="MouseOverBorderBrush" Value="{DynamicResource ControlElevationBorderBrush}" />
|
||||
<Setter Property="PressedBorderBrush" Value="{DynamicResource ButtonBorderBrushPressed}" />
|
||||
</MultiDataTrigger>
|
||||
<MultiDataTrigger>
|
||||
<MultiDataTrigger.Conditions>
|
||||
<Condition Binding="{Binding Appearance, RelativeSource={RelativeSource Self}}" Value="Danger" />
|
||||
<Condition Binding="{Binding Path=(services:ContrastTheme.IsOn)}" Value="True" />
|
||||
<Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="False" />
|
||||
</MultiDataTrigger.Conditions>
|
||||
<Setter Property="Background" Value="{DynamicResource ButtonBackgroundDisabled}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource ButtonForegroundDisabled}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderBrushDisabled}" />
|
||||
</MultiDataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="PageRoot" TargetType="StackPanel">
|
||||
<Setter Property="Margin" Value="28,20,28,20" />
|
||||
</Style>
|
||||
@@ -156,27 +114,6 @@
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<!--
|
||||
The agent's state in the title bar (beta.35). It was a ui:Badge with the Success, Info, Caution and Danger appearances,
|
||||
WPF UI's fixed Material palette under the badge's own text: in the light theme 2.78, 2.63, 2.16 and 3.68:1. Now the
|
||||
theme's own fills — success, caution, critical, and the neutral one while it is on its way — under the theme's text,
|
||||
as the InfoBars are; under a contrast theme those are the theme's colours too. Its words say the state.
|
||||
-->
|
||||
<Style x:Key="AgentPill" TargetType="Border" BasedOn="{StaticResource Pill}">
|
||||
<Setter Property="Margin" Value="0,0,12,0" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding AgentStatusAppearance}" Value="Success">
|
||||
<Setter Property="Background" Value="{DynamicResource SystemFillColorSuccessBackgroundBrush}" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding AgentStatusAppearance}" Value="Caution">
|
||||
<Setter Property="Background" Value="{DynamicResource SystemFillColorCautionBackgroundBrush}" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding AgentStatusAppearance}" Value="Danger">
|
||||
<Setter Property="Background" Value="{DynamicResource SystemFillColorCriticalBackgroundBrush}" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<!--
|
||||
ui:InfoBar, re-templated (16_WPFUI_SYNTAX §Gotchas). WPF UI 4.3.0's own template has no ContentPresenter,
|
||||
so an InfoBar's Content (the action button 08_UI §Notifications policy puts on every persistent banner)
|
||||
@@ -186,27 +123,6 @@
|
||||
when there is no content. PagesLoadTests.TheInfoBarTemplateRendersItsContent renders both templates and
|
||||
fails the day upstream gains a ContentPresenter, so this copy is removed rather than kept out of habit.
|
||||
-->
|
||||
<!--
|
||||
beta.35 (D88): what a screen reader is given. A plain ItemsControl is a Tab stop that holds nothing to say (WPF makes it
|
||||
focusable; its items' own controls take the focus); WPF UI's Image and CardControl take the focus with no automation
|
||||
peer or with an empty name - a Tab stop Narrator says nothing about; a CardExpander's expand button has no name. The
|
||||
App's lists, pictures and setting rows are not stops; an expander's button is named after its header
|
||||
(Controls/ExpanderToggleName). PagesLoadTests.Automation holds all four.
|
||||
-->
|
||||
<Style TargetType="ItemsControl">
|
||||
<Setter Property="Focusable" Value="False" />
|
||||
</Style>
|
||||
<Style TargetType="{x:Type ui:Image}" BasedOn="{StaticResource DefaultImageStyle}">
|
||||
<Setter Property="Focusable" Value="False" />
|
||||
</Style>
|
||||
<Style TargetType="{x:Type ui:CardControl}" BasedOn="{StaticResource {x:Type ui:CardControl}}">
|
||||
<Setter Property="Focusable" Value="False" />
|
||||
<Setter Property="IsTabStop" Value="False" />
|
||||
</Style>
|
||||
<Style TargetType="{x:Type ui:CardExpander}" BasedOn="{StaticResource {x:Type ui:CardExpander}}">
|
||||
<Setter Property="controls:ExpanderToggleName.IsEnabled" Value="True" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="{x:Type ui:InfoBar}">
|
||||
<Setter Property="Background">
|
||||
<Setter.Value>
|
||||
@@ -249,28 +165,12 @@
|
||||
<Border Margin="0,2,14,0" VerticalAlignment="Top">
|
||||
<ui:SymbolIcon x:Name="SymbolIcon" VerticalAlignment="Top" Filled="True" FontSize="16" />
|
||||
</Border>
|
||||
<!--
|
||||
beta.35 (D88): the title and the message through ContentPresenters. A TextBlock written straight
|
||||
into a template is hidden from the control view of the UI Automation tree (its templated parent is
|
||||
the InfoBar, which has no peer), so a safety notice's words reached no screen reader; a text a
|
||||
ContentPresenter makes is a control element.
|
||||
-->
|
||||
<WrapPanel Grid.Column="1" VerticalAlignment="Top">
|
||||
<ContentPresenter x:Name="TitleText" Margin="0,0,14,0" Content="{TemplateBinding Title}"
|
||||
TextElement.FontSize="{TemplateBinding FontSize}" TextElement.FontWeight="SemiBold">
|
||||
<ContentPresenter.ContentTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" TextWrapping="Wrap" />
|
||||
</DataTemplate>
|
||||
</ContentPresenter.ContentTemplate>
|
||||
</ContentPresenter>
|
||||
<ContentPresenter Margin="0" Content="{TemplateBinding Message}" TextElement.FontSize="{TemplateBinding FontSize}">
|
||||
<ContentPresenter.ContentTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" TextWrapping="Wrap" />
|
||||
</DataTemplate>
|
||||
</ContentPresenter.ContentTemplate>
|
||||
</ContentPresenter>
|
||||
<TextBlock x:Name="TitleText" Margin="0,0,14,0" ScrollViewer.CanContentScroll="False"
|
||||
Text="{TemplateBinding Title}" TextElement.FontSize="{TemplateBinding FontSize}"
|
||||
TextElement.FontWeight="SemiBold" TextWrapping="Wrap" />
|
||||
<TextBlock Margin="0" ScrollViewer.CanContentScroll="False" Text="{TemplateBinding Message}"
|
||||
TextElement.FontSize="{TemplateBinding FontSize}" TextWrapping="Wrap" />
|
||||
</WrapPanel>
|
||||
<!-- The one addition: the InfoBar's Content, which is where the action button goes. -->
|
||||
<ContentPresenter x:Name="ActionContent" Grid.Column="2" Margin="12,0,0,0" VerticalAlignment="Center"
|
||||
@@ -346,14 +246,11 @@
|
||||
when a frame-generation runtime was loaded / the counted none was withheld.
|
||||
-->
|
||||
<Style TargetType="{x:Type controls:FpsReadout}">
|
||||
<!-- beta.35 (D88): shown, not operated - read through its peer (SpokenTextAutomationPeer), no Tab stop. -->
|
||||
<Setter Property="Focusable" Value="False" />
|
||||
<Setter Property="IsTabStop" Value="False" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type controls:FpsReadout}">
|
||||
<StackPanel Orientation="Horizontal" ToolTip="{Binding Model.QualifierTooltip, RelativeSource={RelativeSource TemplatedParent}}">
|
||||
<ui:TextBlock FontTypography="Subtitle" AutomationProperties.HeadingLevel="None" VerticalAlignment="Center" Text="{Binding Model.Line, RelativeSource={RelativeSource TemplatedParent}}" />
|
||||
<ui:TextBlock FontTypography="Subtitle" VerticalAlignment="Center" Text="{Binding Model.Line, RelativeSource={RelativeSource TemplatedParent}}" />
|
||||
<Border x:Name="Factor" Style="{StaticResource Pill}" Background="{DynamicResource AccentFillColorDefaultBrush}" BorderThickness="0"
|
||||
Visibility="Collapsed">
|
||||
<TextBlock Foreground="{DynamicResource TextOnAccentFillColorPrimaryBrush}" Text="{Binding Model.FactorChip, RelativeSource={RelativeSource TemplatedParent}}" />
|
||||
@@ -393,9 +290,6 @@
|
||||
<!-- TriStateChip (08_UI §Tri-state feature chips): Yes filled accent · No outlined · N/A dashed, muted. -->
|
||||
<Style TargetType="{x:Type controls:TriStateChip}">
|
||||
<Setter Property="Margin" Value="0,0,8,0" />
|
||||
<!-- beta.35 (D88): read through its peer; where a chip can be changed, the button around it is the stop. -->
|
||||
<Setter Property="Focusable" Value="False" />
|
||||
<Setter Property="IsTabStop" Value="False" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type controls:TriStateChip}">
|
||||
|
||||
@@ -37,10 +37,7 @@ public sealed class UpdatePrompts(IUrlOpener urls, BugReportFlow bugReports) : I
|
||||
body.Children.Add(notes);
|
||||
}
|
||||
|
||||
// beta.35 (D91): the muted text style, not an opacity — under a contrast theme a translucent text is no theme colour.
|
||||
var footer = new System.Windows.Controls.TextBlock { Text = Strings.Update_Unsigned_Footer, TextWrapping = TextWrapping.Wrap, Margin = new Thickness(0, 12, 0, 0) };
|
||||
footer.SetResourceReference(FrameworkElement.StyleProperty, "SecondaryText");
|
||||
body.Children.Add(footer);
|
||||
body.Children.Add(new System.Windows.Controls.TextBlock { Text = Strings.Update_Unsigned_Footer, TextWrapping = TextWrapping.Wrap, Margin = new Thickness(0, 12, 0, 0), Opacity = 0.7 });
|
||||
var box = new MessageBox
|
||||
{
|
||||
Title = string.Format(CultureInfo.CurrentCulture, Strings.Update_Available_Title_Format, candidate.Version),
|
||||
@@ -49,7 +46,7 @@ public sealed class UpdatePrompts(IUrlOpener urls, BugReportFlow bugReports) : I
|
||||
CloseButtonText = Strings.Update_Later,
|
||||
MaxWidth = 640,
|
||||
};
|
||||
MessageBoxResult result = await MessageBoxes.ShowAsync(box, ct).ConfigureAwait(true);
|
||||
MessageBoxResult result = await box.ShowDialogAsync(cancellationToken: ct).ConfigureAwait(true);
|
||||
return result == MessageBoxResult.Primary;
|
||||
}
|
||||
|
||||
@@ -101,7 +98,7 @@ public sealed class UpdatePrompts(IUrlOpener urls, BugReportFlow bugReports) : I
|
||||
break;
|
||||
}
|
||||
|
||||
MessageBoxResult result = await MessageBoxes.ShowAsync(box, ct).ConfigureAwait(true);
|
||||
MessageBoxResult result = await box.ShowDialogAsync(cancellationToken: ct).ConfigureAwait(true);
|
||||
if (result != MessageBoxResult.Primary)
|
||||
{
|
||||
return;
|
||||
@@ -137,6 +134,6 @@ public sealed class UpdatePrompts(IUrlOpener urls, BugReportFlow bugReports) : I
|
||||
CloseButtonText = Strings.Common_Ok,
|
||||
MaxWidth = 560,
|
||||
};
|
||||
await MessageBoxes.ShowAsync(box, ct).ConfigureAwait(true);
|
||||
await box.ShowDialogAsync(cancellationToken: ct).ConfigureAwait(true);
|
||||
}
|
||||
}
|
||||
@@ -4,11 +4,4 @@
|
||||
namespace FrameLedger.App.ViewModels;
|
||||
|
||||
/// <summary>A value and the text it shows as, for a ComboBox bound by value.</summary>
|
||||
public sealed record Choice<T>(T Value, string Label)
|
||||
{
|
||||
/// <summary>
|
||||
/// What a screen reader reads for the option (beta.35, D88): WPF names a drop-down's item by its <c>ToString()</c>, and a
|
||||
/// record's own was <c>Choice { Value = dark, Label = Dark }</c>.
|
||||
/// </summary>
|
||||
public override string ToString() => Label;
|
||||
}
|
||||
public sealed record Choice<T>(T Value, string Label);
|
||||
@@ -63,7 +63,4 @@ public sealed partial class CompareCandidateViewModel : ObservableObject
|
||||
public bool SettingsChangedMidSession { get; }
|
||||
|
||||
public string Label => GameName + " · " + DateText + " (" + TierText + ")";
|
||||
|
||||
/// <summary>The row as a screen reader reads it (beta.35, D88) — the same words as its tick box.</summary>
|
||||
public override string ToString() => Label;
|
||||
}
|
||||
@@ -4,9 +4,4 @@
|
||||
namespace FrameLedger.App.ViewModels;
|
||||
|
||||
/// <summary>One cell of Compare's stat table: the text, and whether it is the best of its row (never for N/A).</summary>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Performance", "CA1863:Use 'CompositeFormat'", Justification = "the format string is a resource that follows the UI culture, which changes at runtime")]
|
||||
public sealed record CompareCell(string Text, bool IsBest)
|
||||
{
|
||||
/// <summary>The cell as a screen reader reads it (beta.35, D88): bold says "the best" to the eye, these words to the ear.</summary>
|
||||
public override string ToString() => IsBest ? string.Format(System.Globalization.CultureInfo.CurrentCulture, Strings.A11y_Compare_Best_Format, Text) : Text;
|
||||
}
|
||||
public sealed record CompareCell(string Text, bool IsBest);
|
||||
@@ -4,8 +4,4 @@
|
||||
namespace FrameLedger.App.ViewModels;
|
||||
|
||||
/// <summary>One row of Compare's stat table: the metric and one cell per compared session, in the selection's order.</summary>
|
||||
public sealed record CompareRowViewModel(string Metric, IReadOnlyList<CompareCell> Cells)
|
||||
{
|
||||
/// <summary>The row as a screen reader reads it (beta.35, D88): the metric, then each session's value in order.</summary>
|
||||
public override string ToString() => Services.SpokenText.Pair(Metric, Services.SpokenText.List([.. Cells.Select(static c => c.ToString())]));
|
||||
}
|
||||
public sealed record CompareRowViewModel(string Metric, IReadOnlyList<CompareCell> Cells);
|
||||
@@ -35,7 +35,6 @@ public sealed partial class DatabaseMaintenanceViewModel : ObservableObject
|
||||
private readonly IDatabaseMaintenancePrompts _prompts;
|
||||
private readonly RegisteredSettings _settings;
|
||||
private readonly TimeProvider _clock;
|
||||
private readonly IAnnouncer _announcer;
|
||||
|
||||
[ObservableProperty]
|
||||
[NotifyCanExecuteChangedFor(nameof(CheckIntegrityCommand), nameof(BackUpCommand), nameof(SweepCommand), nameof(CompactCommand))]
|
||||
@@ -45,7 +44,7 @@ public sealed partial class DatabaseMaintenanceViewModel : ObservableObject
|
||||
private string _status = Strings.Maintenance_Status_Ready;
|
||||
|
||||
public DatabaseMaintenanceViewModel(LedgerMaintenance ledger, string ledgerPath, IAgentRequests agent, IFileSaver files, IDatabaseMaintenancePrompts prompts,
|
||||
RegisteredSettings settings, TimeProvider? clock = null, IAnnouncer? announcer = null)
|
||||
RegisteredSettings settings, TimeProvider? clock = null)
|
||||
{
|
||||
_ledger = ledger ?? throw new ArgumentNullException(nameof(ledger));
|
||||
ArgumentException.ThrowIfNullOrWhiteSpace(ledgerPath);
|
||||
@@ -55,17 +54,10 @@ public sealed partial class DatabaseMaintenanceViewModel : ObservableObject
|
||||
_prompts = prompts ?? throw new ArgumentNullException(nameof(prompts));
|
||||
_settings = settings ?? throw new ArgumentNullException(nameof(settings));
|
||||
_clock = clock ?? TimeProvider.System;
|
||||
_announcer = announcer ?? NoAnnouncer.Instance;
|
||||
}
|
||||
|
||||
private bool CanRun => !IsBusy;
|
||||
|
||||
/// <summary>
|
||||
/// beta.35 (D89): each action's result line is said as it appears — the line's <c>LiveSetting</c> said nothing, since WPF
|
||||
/// raises a live region only when the app does.
|
||||
/// </summary>
|
||||
partial void OnStatusChanged(string value) => _announcer.Announce(value, AnnouncementKind.Status, "Maintenance");
|
||||
|
||||
/// <summary><c>PRAGMA integrity_check</c>: "no problems", or the count and SQLite's first line.</summary>
|
||||
[RelayCommand(CanExecute = nameof(CanRun))]
|
||||
private Task CheckIntegrityAsync() => RunAsync(async () =>
|
||||
|
||||
@@ -50,11 +50,4 @@ public sealed partial class ExceptionGameViewModel
|
||||
|
||||
[RelayCommand]
|
||||
private Task WithdrawAsync() => _withdraw(this);
|
||||
|
||||
/// <summary>The row's buttons, naming the game they act on (beta.35, D88).</summary>
|
||||
public string GrantName => SpokenText.Pair(Strings.Settings_Exceptions_Grant.TrimEnd('…'), Name);
|
||||
|
||||
public string WithdrawName => SpokenText.Pair(Strings.Settings_Exceptions_Withdraw, Name);
|
||||
|
||||
public override string ToString() => Name;
|
||||
}
|
||||
@@ -19,7 +19,4 @@ public sealed record FgMixRowModel(string Label, string Share, string Rates, str
|
||||
{
|
||||
/// <summary>The row's colour, as a one-segment bar beside its label.</summary>
|
||||
public IReadOnlyList<FgMixSegment> Swatch { get; } = [Segment with { Share = 1 }];
|
||||
|
||||
/// <summary>The row in one line (beta.35, D88): the state, its share, its own rates and its time — never a factor alone.</summary>
|
||||
public override string ToString() => Services.SpokenText.Pair(Label, Services.SpokenText.List(Share, Rates, Duration));
|
||||
}
|
||||
@@ -23,7 +23,6 @@ public sealed partial class GameCardViewModel : ObservableObject
|
||||
/// <summary>beta.11: the "Not installed" pill shows — the file, or the drive it was on, is not there now.</summary>
|
||||
[ObservableProperty]
|
||||
[NotifyPropertyChangedFor(nameof(StatusText))]
|
||||
[NotifyPropertyChangedFor(nameof(AccessibleName))]
|
||||
private bool _notInstalled;
|
||||
|
||||
/// <summary>What the pill means here — the drive that is not connected, or the path the file is gone from; null when installed.</summary>
|
||||
@@ -155,12 +154,4 @@ public sealed partial class GameCardViewModel : ObservableObject
|
||||
&& string.Equals(Card.Row.Platform, other.Card.Row.Platform, StringComparison.Ordinal)
|
||||
&& string.Equals(Card.Row.StoreId, other.Card.Row.StoreId, StringComparison.Ordinal);
|
||||
}
|
||||
|
||||
/// <summary>The card and the list's row as a screen reader reads them (beta.35, D88): the game and its state.</summary>
|
||||
public string AccessibleName => SpokenText.List(Name, StatusText);
|
||||
|
||||
/// <summary>The card's Play button, naming the game it starts.</summary>
|
||||
public string PlayName => SpokenText.Pair(Strings.Play_Button, Name);
|
||||
|
||||
public override string ToString() => AccessibleName;
|
||||
}
|
||||
@@ -4,8 +4,4 @@
|
||||
namespace FrameLedger.App.ViewModels;
|
||||
|
||||
/// <summary>One line of the game page's Details card (beta.8): a label and what the game's files — or its store — say.</summary>
|
||||
public sealed record GameDetailRow(string Label, string Value)
|
||||
{
|
||||
/// <summary>The line as a screen reader reads it (beta.35, D88): <c>Runs as: Direct3D 12</c>.</summary>
|
||||
public override string ToString() => Services.SpokenText.Pair(Label, Value);
|
||||
}
|
||||
public sealed record GameDetailRow(string Label, string Value);
|
||||
@@ -52,7 +52,6 @@ public sealed partial class GameDetailViewModel : ObservableObject
|
||||
private readonly SessionDeletion? _deletion;
|
||||
private readonly Func<string, bool> _exists;
|
||||
private readonly GameArt? _art;
|
||||
private readonly IAnnouncer _announcer;
|
||||
private readonly CoverStore? _covers;
|
||||
private readonly IImagePicker? _images;
|
||||
private readonly long? _gameId;
|
||||
@@ -295,9 +294,8 @@ public sealed partial class GameDetailViewModel : ObservableObject
|
||||
SessionSeriesLoader loader, IHardwareSnapshotRepository hardware, SessionSelection sessionSelection, IGamePicker picker,
|
||||
RegisteredSettings? settings = null, IAgentLink? agent = null, AntiCheatExceptions? exceptions = null, SessionDeletion? deletion = null,
|
||||
UiMode? mode = null, GamePlayer? player = null, Func<string, bool>? executableExists = null, GameArt? art = null, CoverStore? covers = null,
|
||||
IImagePicker? images = null, IAnnouncer? announcer = null)
|
||||
IImagePicker? images = null)
|
||||
{
|
||||
_announcer = announcer ?? NoAnnouncer.Instance;
|
||||
_art = art;
|
||||
_covers = covers;
|
||||
_images = images;
|
||||
@@ -1146,19 +1144,6 @@ public sealed partial class GameDetailViewModel : ObservableObject
|
||||
NoticeText = result.MessageFor(gameName);
|
||||
NoticeSeverity = result.Succeeded ? InfoBarSeverity.Success : InfoBarSeverity.Warning;
|
||||
OnPropertyChanged(nameof(NoticeVisible));
|
||||
SayNotice();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// beta.35 (D89): the page's notice is said as it appears — it shows above the page, away from the button that was
|
||||
/// pressed, where a screen reader's focus is.
|
||||
/// </summary>
|
||||
private void SayNotice()
|
||||
{
|
||||
if (NoticeText is { Length: > 0 } text)
|
||||
{
|
||||
_announcer.Announce(text, NoticeSeverity is InfoBarSeverity.Success or InfoBarSeverity.Informational ? AnnouncementKind.Status : AnnouncementKind.Alert, "Page");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1181,7 +1166,6 @@ public sealed partial class GameDetailViewModel : ObservableObject
|
||||
_ => (null, InfoBarSeverity.Informational),
|
||||
};
|
||||
OnPropertyChanged(nameof(NoticeVisible));
|
||||
SayNotice();
|
||||
}
|
||||
|
||||
private void Present(GameDetail detail)
|
||||
|
||||
@@ -17,9 +17,4 @@ public sealed partial class HookedGameViewModel(long gameId, string name, Func<H
|
||||
|
||||
[RelayCommand]
|
||||
private Task RevokeAsync() => revoke(this);
|
||||
|
||||
/// <summary>The row's button, naming the game whose hooking it turns off (beta.35, D88).</summary>
|
||||
public string RevokeName => Services.SpokenText.Pair(Strings.Settings_HookedGames_Revoke, Name);
|
||||
|
||||
public override string ToString() => Name;
|
||||
}
|
||||
@@ -34,12 +34,6 @@ public sealed partial class ImportCandidateViewModel : ObservableObject
|
||||
/// </summary>
|
||||
public bool IsExisting => Candidate.AlreadyInLibrary || Candidate.MovedFrom is not null;
|
||||
|
||||
/// <summary>
|
||||
/// The row is drawn dimmed: one already in the library, except under a Windows contrast theme (beta.35, D91), where a
|
||||
/// translucent row is no theme colour and the note column says it already is.
|
||||
/// </summary>
|
||||
public bool IsDimmed => IsExisting && Services.ContrastTheme.Active is null;
|
||||
|
||||
public string PlatformText => Formats.Platform(Candidate.Game.Platform);
|
||||
|
||||
public string Name => Candidate.Game.Name;
|
||||
@@ -48,7 +42,4 @@ public sealed partial class ImportCandidateViewModel : ObservableObject
|
||||
|
||||
/// <summary>Already in the library (under this drive letter or, since 2026-09-23, another), no executable found, or a guessed executable the user should check.</summary>
|
||||
public string Note { get; }
|
||||
|
||||
/// <summary>The row as a screen reader reads it (beta.35, D88).</summary>
|
||||
public override string ToString() => Name;
|
||||
}
|
||||
@@ -7,8 +7,4 @@ namespace FrameLedger.App.ViewModels;
|
||||
|
||||
/// <summary>One stated fact: what it is, and its value as text (N/A included).</summary>
|
||||
[StructLayout(LayoutKind.Auto)]
|
||||
public readonly record struct LabelledValue(string Label, string Value)
|
||||
{
|
||||
/// <summary>The fact as a screen reader reads it (beta.35, D88).</summary>
|
||||
public override string ToString() => Services.SpokenText.Pair(Label, Value);
|
||||
}
|
||||
public readonly record struct LabelledValue(string Label, string Value);
|
||||
@@ -195,7 +195,4 @@ public sealed partial class LiveCaptureViewModel : ObservableObject
|
||||
IsHeld = false;
|
||||
HeldReason = GameName = TierText = ElapsedText = GpuTempText = CpuTempText = MemoryText = string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>The live card as a screen reader reads it (beta.35, D88): the game, how it is recorded, for how long.</summary>
|
||||
public override string ToString() => SpokenText.List(GameName, TierText, ElapsedText);
|
||||
}
|
||||
@@ -13,6 +13,7 @@ using FrameLedger.App.Update;
|
||||
using FrameLedger.Infrastructure.Ipc;
|
||||
using FrameLedger.Shared;
|
||||
using FrameLedger.Shared.Ipc;
|
||||
using Wpf.Ui;
|
||||
using Wpf.Ui.Controls;
|
||||
|
||||
namespace FrameLedger.App.ViewModels;
|
||||
@@ -23,11 +24,9 @@ public sealed partial class MainWindowViewModel : ObservableObject, IDisposable,
|
||||
private readonly IAgentLink _agent;
|
||||
private readonly UiMode _mode;
|
||||
private readonly BuildLine _line;
|
||||
private readonly IMessageStrip _strip;
|
||||
private readonly ShellAnnouncements _said;
|
||||
private readonly ISnackbarService _snackbar;
|
||||
private readonly IShellPresence _shell;
|
||||
private readonly IPageNavigator _navigator;
|
||||
private readonly PageFocus? _pageFocus;
|
||||
private readonly UiThread _ui = new();
|
||||
|
||||
[ObservableProperty]
|
||||
@@ -65,12 +64,10 @@ public sealed partial class MainWindowViewModel : ObservableObject, IDisposable,
|
||||
private readonly ISessionSummaryOpener _summaries;
|
||||
private readonly ImportLibraryFlow _import;
|
||||
|
||||
public MainWindowViewModel(IAgentLink agent, IMessageStrip strip, IShellPresence shell, IPageNavigator navigator, AddGameFlow addGame, SafetyNotices notices,
|
||||
public MainWindowViewModel(IAgentLink agent, ISnackbarService snackbar, IShellPresence shell, IPageNavigator navigator, AddGameFlow addGame, SafetyNotices notices,
|
||||
BugReportFlow bugReports, IUrlOpener urls, SessionSelection selection, SessionExportService exports, ISessionSummaryOpener summaries, ImportLibraryFlow import,
|
||||
UpdateService updates, IDatabaseMaintenancePrompts maintenance, IDocumentWindows documents, UiMode? mode = null, BuildLine? line = null,
|
||||
IAnnouncer? announcer = null, PageFocus? pageFocus = null)
|
||||
UpdateService updates, IDatabaseMaintenancePrompts maintenance, IDocumentWindows documents, UiMode? mode = null, BuildLine? line = null)
|
||||
{
|
||||
_pageFocus = pageFocus;
|
||||
_mode = mode ?? UiMode.Profile;
|
||||
_line = line ?? BuildLine.Current;
|
||||
_isAlphaBannerOpen = _line.IsAlpha;
|
||||
@@ -85,8 +82,7 @@ public sealed partial class MainWindowViewModel : ObservableObject, IDisposable,
|
||||
_exports = exports ?? throw new ArgumentNullException(nameof(exports));
|
||||
_summaries = summaries ?? throw new ArgumentNullException(nameof(summaries));
|
||||
_agent = agent ?? throw new ArgumentNullException(nameof(agent));
|
||||
_strip = strip ?? throw new ArgumentNullException(nameof(strip));
|
||||
_said = new ShellAnnouncements(announcer ?? NoAnnouncer.Instance);
|
||||
_snackbar = snackbar ?? throw new ArgumentNullException(nameof(snackbar));
|
||||
_shell = shell ?? throw new ArgumentNullException(nameof(shell));
|
||||
_navigator = navigator ?? throw new ArgumentNullException(nameof(navigator));
|
||||
_addGame = addGame ?? throw new ArgumentNullException(nameof(addGame));
|
||||
@@ -152,7 +148,6 @@ public sealed partial class MainWindowViewModel : ObservableObject, IDisposable,
|
||||
UpdateStage.Applying => (true, string.Format(CultureInfo.CurrentCulture, Strings.Update_Banner_Applying_Format, version), false),
|
||||
_ => (false, string.Empty, false),
|
||||
};
|
||||
_said.Update(_updates.Stage, _updates.Version, UpdateBannerBody);
|
||||
}
|
||||
|
||||
/// <summary>Help ▸ Check for updates (P4 PR-5): <c>11_UPDATER</c> §Flow, "Manual check".</summary>
|
||||
@@ -189,7 +184,6 @@ public sealed partial class MainWindowViewModel : ObservableObject, IDisposable,
|
||||
string? banner = AgentStatusPresentation.Banner(_agent.State);
|
||||
AgentBannerBody = banner ?? string.Empty;
|
||||
IsAgentBannerVisible = banner is not null;
|
||||
_said.Agent(_agent.State, banner);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
@@ -207,18 +201,9 @@ public sealed partial class MainWindowViewModel : ObservableObject, IDisposable,
|
||||
[RelayCommand]
|
||||
private void Exit() => _shell.Quit();
|
||||
|
||||
/// <summary>
|
||||
/// 08_UI §Accessibility: Ctrl+1…5 (and the keypad) — the NavigationView's pages in its order; since beta.35 the page then
|
||||
/// takes the keyboard and its title is said (<see cref="PageFocus"/>).
|
||||
/// </summary>
|
||||
/// <summary>08_UI §Accessibility: Ctrl+1…5 (and the keypad) — the NavigationView's pages in its order.</summary>
|
||||
[RelayCommand]
|
||||
private void NavigateTo(string? key)
|
||||
{
|
||||
if (ShellShortcuts.Navigate(_navigator, key))
|
||||
{
|
||||
_pageFocus?.Request();
|
||||
}
|
||||
}
|
||||
private void NavigateTo(string? key) => _ = ShellShortcuts.Navigate(_navigator, key);
|
||||
|
||||
/// <summary>Tools ▸ Agent status… is the Dashboard's Agent card.</summary>
|
||||
[RelayCommand]
|
||||
@@ -259,7 +244,7 @@ public sealed partial class MainWindowViewModel : ObservableObject, IDisposable,
|
||||
{
|
||||
if (!_agent.IsConnected)
|
||||
{
|
||||
_strip.Warn(Strings.Rules_Update_Title, Strings.Rules_Update_NoAgent);
|
||||
_snackbar.Show(Strings.Rules_Update_Title, Strings.Rules_Update_NoAgent, ControlAppearance.Caution, new SymbolIcon(SymbolRegular.Warning24), TimeSpan.FromSeconds(4));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -267,12 +252,13 @@ public sealed partial class MainWindowViewModel : ObservableObject, IDisposable,
|
||||
{
|
||||
IpcEnvelope ack = await _agent.RequestAsync(IpcMessageType.UpdateRules, new UpdateRulesRequest()).ConfigureAwait(true);
|
||||
string outcome = IpcCodec.Payload<UpdateRulesAck>(ack)?.Outcome ?? string.Empty;
|
||||
_strip.Info(Strings.Rules_Update_Title, string.Format(CultureInfo.CurrentCulture, Strings.Rules_Update_Done_Format, outcome));
|
||||
_snackbar.Show(Strings.Rules_Update_Title, string.Format(CultureInfo.CurrentCulture, Strings.Rules_Update_Done_Format, outcome),
|
||||
ControlAppearance.Secondary, new SymbolIcon(SymbolRegular.Info24), TimeSpan.FromSeconds(4));
|
||||
}
|
||||
catch (Exception ex) when (ex is IpcRequestException or TimeoutException or System.IO.IOException or InvalidOperationException)
|
||||
{
|
||||
Serilog.Log.Warning(ex, "ui: update rules did not complete");
|
||||
_strip.Warn(Strings.Rules_Update_Title, Strings.Rules_Update_Failed);
|
||||
_snackbar.Show(Strings.Rules_Update_Title, Strings.Rules_Update_Failed, ControlAppearance.Caution, new SymbolIcon(SymbolRegular.Warning24), TimeSpan.FromSeconds(4));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -293,7 +279,7 @@ public sealed partial class MainWindowViewModel : ObservableObject, IDisposable,
|
||||
{
|
||||
if (!_urls.Open(IssueLink.Documentation))
|
||||
{
|
||||
_strip.Warn(Strings.Menu_Help_Documentation, Strings.BugReport_BrowserRefused);
|
||||
_snackbar.Show(Strings.Menu_Help_Documentation, Strings.BugReport_BrowserRefused, ControlAppearance.Caution, new SymbolIcon(SymbolRegular.Warning24), TimeSpan.FromSeconds(4));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -350,7 +336,7 @@ public sealed partial class MainWindowViewModel : ObservableObject, IDisposable,
|
||||
if (_selection.SessionId is { } id)
|
||||
{
|
||||
_summaries.Open(id);
|
||||
_strip.Info(Strings.Menu_File_Export, Strings.Export_Png_Body);
|
||||
_snackbar.Show(Strings.Menu_File_Export, Strings.Export_Png_Body, ControlAppearance.Secondary, new SymbolIcon(SymbolRegular.Info24), TimeSpan.FromSeconds(4));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -358,7 +344,8 @@ public sealed partial class MainWindowViewModel : ObservableObject, IDisposable,
|
||||
}
|
||||
}
|
||||
|
||||
private void NoSelection() => _strip.Warn(Strings.Menu_File_Export, Strings.Export_NoSelection_Body);
|
||||
private void NoSelection() =>
|
||||
_snackbar.Show(Strings.Menu_File_Export, Strings.Export_NoSelection_Body, ControlAppearance.Caution, new SymbolIcon(SymbolRegular.Info24), TimeSpan.FromSeconds(4));
|
||||
|
||||
/// <summary>
|
||||
/// Tools ▸ Database maintenance… (P4 PR-7): integrity check, backup, the retention sweep (the Agent's) and compaction.
|
||||
|
||||
@@ -40,9 +40,4 @@ public sealed class RecentSessionViewModel
|
||||
public FpsReadoutModel Readout { get; }
|
||||
|
||||
public bool IsCrashed { get; }
|
||||
|
||||
/// <summary>The Dashboard's recent session as a screen reader reads it (beta.35, D88).</summary>
|
||||
public string AccessibleName => SpokenText.List(GameName, DateText, DurationText, TierText, Readout.SpokenText);
|
||||
|
||||
public override string ToString() => AccessibleName;
|
||||
}
|
||||
Loaded 100 of 120 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user