Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dc6b36191e
|
No files matched your search
+14
-7
@@ -36,6 +36,7 @@ notices Windows shows for it. It draws nothing inside a game, so it cannot make
|
||||
| **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).
|
||||
|
||||
@@ -43,6 +44,9 @@ 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*.
|
||||
@@ -69,6 +73,8 @@ The same keys are in the user guide, [The screens](guide/07-screens.md#keyboard-
|
||||
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
|
||||
|
||||
@@ -79,7 +85,9 @@ from the same translations. The documents — the user guide, this page, the leg
|
||||
|
||||
- **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 control that shows no text has a name; no colour is written
|
||||
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; **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.
|
||||
@@ -91,12 +99,11 @@ from the same translations. The documents — the user guide, this page, the leg
|
||||
|
||||
Each one with what to do instead. A barrier that is not on this list is worth reporting.
|
||||
|
||||
- **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**.
|
||||
- **Headings are not marked as headings**, so a screen reader's heading keys do not move between the sections of a
|
||||
page.
|
||||
- **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.
|
||||
- **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**, and cannot be read again once closed. A
|
||||
|
||||
@@ -66,6 +66,17 @@ numeric core and does not move; the heading is the full version — corrected 20
|
||||
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.
|
||||
|
||||
### Fixed
|
||||
|
||||
- **A double-click on a chart shows all of it again**, as the user guide said; it toggled ScottPlot's render-time overlay.
|
||||
|
||||
### Changed
|
||||
|
||||
- **Documents corrected**: charts do take focus and keys (`docs/08_UI.md` said neither — `ChartKeyboardTests` measures
|
||||
|
||||
+2
-2
@@ -207,8 +207,8 @@ 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:
|
||||
|
||||
- **Charts are pictures.** A screen reader cannot read their points; the numbers are in the session's figures, the
|
||||
tables and **File ▸ Export**.
|
||||
- **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.
|
||||
- **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.
|
||||
|
||||
|
||||
+24
-7
@@ -1007,8 +1007,9 @@ 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. 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~~ *(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.
|
||||
|
||||
## Accessibility
|
||||
|
||||
@@ -1034,6 +1035,7 @@ the requirement was one bullet under §UX rules, and nothing checked it.
|
||||
| **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` |
|
||||
|
||||
@@ -1077,6 +1079,20 @@ handled key — so whether Esc alone would close a dialog through `IsCancel` is
|
||||
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
|
||||
@@ -1184,9 +1200,10 @@ 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.)* The numbers behind them are on the
|
||||
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
|
||||
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
|
||||
@@ -1197,7 +1214,7 @@ ScottPlot reads once when the control is made, before it has a window.
|
||||
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~~ *(closed the same day, §Screen readers above, except a chart's: a plot is still a stop with no
|
||||
peer)*; 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
|
||||
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; Windows contrast themes are not
|
||||
followed. `ACCESSIBILITY.md` §Known limitations
|
||||
states each to users with what to do instead.
|
||||
@@ -237,6 +237,13 @@ 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`.
|
||||
>
|
||||
> **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
|
||||
|
||||
@@ -72,7 +72,8 @@ 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 reset. The
|
||||
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
|
||||
wheel alone scrolls the page.
|
||||
|
||||
## Export
|
||||
|
||||
+4
-2
@@ -137,8 +137,10 @@ is ready.
|
||||
- **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 resets. The wheel alone scrolls the
|
||||
page.
|
||||
- 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.
|
||||
|
||||
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).
|
||||
@@ -0,0 +1,35 @@
|
||||
// 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;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
// 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(),
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
// 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,6 +2,8 @@
|
||||
// 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;
|
||||
|
||||
@@ -94,6 +96,8 @@ public static class ChartTheme
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(control);
|
||||
ChartWheel.Attach(control);
|
||||
ChartKeys.Attach(control);
|
||||
ResetOnDoubleClick(control);
|
||||
lock (_lock)
|
||||
{
|
||||
_live.RemoveAll(static w => !w.TryGetTarget(out _));
|
||||
@@ -108,6 +112,24 @@ 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,8 +4,9 @@
|
||||
<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:sp="clr-namespace:ScottPlot.WPF;assembly=ScottPlot.WPF"
|
||||
xmlns:charts="clr-namespace:FrameLedger.App.Charts"
|
||||
xmlns:res="clr-namespace:FrameLedger.App"
|
||||
MinHeight="300">
|
||||
<!-- 08_UI §Compare: overlaid percentile curves; the tier legend is stamped on the plot when tiers are mixed (FR-6.2). -->
|
||||
<sp:WpfPlot x:Name="Plot" />
|
||||
<charts:ChartPlot x:Name="Plot" AutomationProperties.Name="{x:Static res:Strings.A11y_Chart_Compare}" AutomationProperties.HelpText="{x:Static res:Strings.A11y_ChartData_Compare}" />
|
||||
</UserControl>
|
||||
@@ -42,6 +42,7 @@ 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,7 +5,8 @@
|
||||
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:sp="clr-namespace:ScottPlot.WPF;assembly=ScottPlot.WPF"
|
||||
xmlns:charts="clr-namespace:FrameLedger.App.Charts"
|
||||
xmlns:res="clr-namespace:FrameLedger.App"
|
||||
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>
|
||||
@@ -18,8 +19,8 @@
|
||||
<ColumnDefinition Width="12" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<sp:WpfPlot x:Name="Histogram" Grid.Column="0" />
|
||||
<sp:WpfPlot x:Name="Percentiles" Grid.Column="2" />
|
||||
<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" />
|
||||
<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,6 +94,7 @@ 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,7 +5,8 @@
|
||||
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:sp="clr-namespace:ScottPlot.WPF;assembly=ScottPlot.WPF"
|
||||
xmlns:charts="clr-namespace:FrameLedger.App.Charts"
|
||||
xmlns:res="clr-namespace:FrameLedger.App"
|
||||
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).
|
||||
@@ -16,6 +17,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" />
|
||||
<sp:WpfPlot x:Name="Plot" Grid.Row="1" />
|
||||
<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" />
|
||||
</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);
|
||||
DrawSeries(plot, _series.AppTimesS, _series.AppFrameTimesMs, p.Native, generating ? Strings.Chart_Series_AppFrames : Strings.Chart_Series_Presents, 0);
|
||||
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)
|
||||
private void DrawSeries(ScottPlot.Plot plot, double[] xs, double[] ys, Color color, string label, int index)
|
||||
{
|
||||
if (xs.Length == 0)
|
||||
{
|
||||
@@ -140,6 +140,7 @@ 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>
|
||||
@@ -147,7 +148,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);
|
||||
DrawSeries(plot, xs, ys, p.Displayed, Strings.Chart_Series_Displayed, 1);
|
||||
}
|
||||
|
||||
private void DrawStutter(ScottPlot.Plot plot, ChartPalette p)
|
||||
@@ -174,11 +175,11 @@ public partial class FrametimeChart : UserControl
|
||||
(pso ? psoYs : ys).Add(_series.AppFrameTimesMs[i]);
|
||||
}
|
||||
|
||||
AddMarkers(plot, xs, ys, p.Stutter, Strings.Chart_Series_Stutter);
|
||||
AddMarkers(plot, psoXs, psoYs, p.StutterPso, Strings.Chart_Series_StutterPso);
|
||||
AddMarkers(plot, xs, ys, p.Stutter, Strings.Chart_Series_Stutter, 0);
|
||||
AddMarkers(plot, psoXs, psoYs, p.StutterPso, Strings.Chart_Series_StutterPso, 1);
|
||||
}
|
||||
|
||||
private void AddMarkers(ScottPlot.Plot plot, List<double> xs, List<double> ys, Color color, string label)
|
||||
private void AddMarkers(ScottPlot.Plot plot, List<double> xs, List<double> ys, Color color, string label, int index)
|
||||
{
|
||||
if (xs.Count == 0)
|
||||
{
|
||||
@@ -191,6 +192,7 @@ 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,8 +4,9 @@
|
||||
<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:sp="clr-namespace:ScottPlot.WPF;assembly=ScottPlot.WPF"
|
||||
xmlns:charts="clr-namespace:FrameLedger.App.Charts"
|
||||
xmlns:res="clr-namespace:FrameLedger.App"
|
||||
MinHeight="240">
|
||||
<!-- 08_UI §Games › Latency (Tier 1 + Reflex only): the PC latency timeline with the stored avg / p95 lines. -->
|
||||
<sp:WpfPlot x:Name="Plot" />
|
||||
<charts:ChartPlot x:Name="Plot" AutomationProperties.Name="{x:Static res:Strings.A11y_Chart_Latency}" AutomationProperties.HelpText="{x:Static res:Strings.A11y_ChartData_Latency}" />
|
||||
</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:sp="clr-namespace:ScottPlot.WPF;assembly=ScottPlot.WPF">
|
||||
xmlns:charts="clr-namespace:FrameLedger.App.Charts">
|
||||
<!-- 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>
|
||||
<sp:WpfPlot x:Name="Plot" />
|
||||
<charts:ChartPlot x:Name="Plot" AutomationProperties.Name="{x:Static res:Strings.A11y_Chart_RenderScale}" AutomationProperties.HelpText="{x:Static res:Strings.A11y_ChartData_Summary}" />
|
||||
<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:sp="clr-namespace:ScottPlot.WPF;assembly=ScottPlot.WPF">
|
||||
xmlns:charts="clr-namespace:FrameLedger.App.Charts">
|
||||
<!-- 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}" />
|
||||
<sp:WpfPlot x:Name="Temps" Height="240" Margin="0,6,0,0" />
|
||||
<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" />
|
||||
<ui:TextBlock Margin="0,12,0,0" FontTypography="BodyStrong" Text="{x:Static res:Strings.Sensors_Vram_Header}" />
|
||||
<sp:WpfPlot x:Name="Vram" Height="220" Margin="0,6,0,0" />
|
||||
<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" />
|
||||
<ui:TextBlock Margin="0,12,0,0" FontTypography="BodyStrong" Text="{x:Static res:Strings.Sensors_Ram_Header}" />
|
||||
<sp:WpfPlot x:Name="Ram" Height="220" Margin="0,6,0,0" />
|
||||
<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" />
|
||||
<!-- 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}" />
|
||||
<sp:WpfPlot x:Name="Clocks" Height="220" Margin="0,6,0,0" />
|
||||
<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" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
@@ -153,6 +153,9 @@ 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;
|
||||
@@ -278,6 +281,8 @@ 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,8 +4,9 @@
|
||||
<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:sp="clr-namespace:ScottPlot.WPF;assembly=ScottPlot.WPF"
|
||||
xmlns:charts="clr-namespace:FrameLedger.App.Charts"
|
||||
xmlns:res="clr-namespace:FrameLedger.App"
|
||||
MinHeight="260">
|
||||
<!-- 08_UI §Games › Trend: the metric over date with hardware-change markers (FR-6.3). -->
|
||||
<sp:WpfPlot x:Name="Plot" />
|
||||
<charts:ChartPlot x:Name="Plot" AutomationProperties.Name="{x:Static res:Strings.A11y_Chart_Trend}" AutomationProperties.HelpText="{x:Static res:Strings.A11y_ChartData_Sessions}" />
|
||||
</UserControl>
|
||||
@@ -146,7 +146,7 @@ public partial class TrendChart : UserControl
|
||||
continue;
|
||||
}
|
||||
|
||||
hollow += AddLine(plot, line, palette[i % palette.Length], p.Data, isRight);
|
||||
hollow += AddLine(plot, line, palette[i % palette.Length], p.Data, isRight, i);
|
||||
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)
|
||||
private static int AddLine(ScottPlot.Plot plot, TrendLine line, Color color, Color hollowColor, bool isRight, int index)
|
||||
{
|
||||
double[] xs = [.. line.Points.Select(static t => t.At.LocalDateTime.ToOADate())];
|
||||
double[] ys = [.. line.Points.Select(static t => t.Value)];
|
||||
@@ -179,6 +179,9 @@ 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;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ui:TextBlock Grid.Row="0" FontTypography="Title" Text="{Binding ViewModel.StepText}" />
|
||||
<ui:TextBlock Grid.Row="0" FontTypography="Title" AutomationProperties.HeadingLevel="Level1" 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}}">
|
||||
|
||||
@@ -15,7 +15,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" Text="{x:Static vm:CompareViewModel.Header}" />
|
||||
<ui:TextBlock FontTypography="Title" AutomationProperties.HeadingLevel="Level1" 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 +44,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" Text="{x:Static vm:CompareViewModel.PickHeader}" />
|
||||
<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" 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}" />
|
||||
@@ -101,12 +101,12 @@
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<ui:TextBlock Grid.Column="0" FontTypography="Subtitle" Text="{x:Static vm:CompareViewModel.CurvesHeader}" />
|
||||
<ui:TextBlock Grid.Column="0" FontTypography="Subtitle" AutomationProperties.HeadingLevel="Level2" 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" Text="{x:Static vm:CompareViewModel.TableHeader}" />
|
||||
<ui:TextBlock Margin="0,16,0,0" FontTypography="Subtitle" AutomationProperties.HeadingLevel="Level2" 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" Text="{x:Static vm:DashboardViewModel.Header}" />
|
||||
<ui:TextBlock FontTypography="Title" AutomationProperties.HeadingLevel="Level1" 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" Text="{x:Static vm:LiveCaptureViewModel.Header}" />
|
||||
<ui:TextBlock FontTypography="Subtitle" AutomationProperties.HeadingLevel="Level2" 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" Text="{Binding ViewModel.GamesTrackedText}" />
|
||||
<ui:TextBlock FontTypography="Subtitle" AutomationProperties.HeadingLevel="None" 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" Text="{Binding ViewModel.PlaytimeText}" />
|
||||
<ui:TextBlock FontTypography="Subtitle" AutomationProperties.HeadingLevel="None" 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" Text="{Binding ViewModel.ThisWeekText}" />
|
||||
<ui:TextBlock FontTypography="Subtitle" AutomationProperties.HeadingLevel="None" 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" Margin="0,0,0,12" Text="{x:Static vm:DashboardViewModel.AgentHeader}" />
|
||||
<ui:TextBlock FontTypography="Subtitle" AutomationProperties.HeadingLevel="Level2" Margin="0,0,0,12" Text="{x:Static vm:DashboardViewModel.AgentHeader}" />
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
@@ -128,7 +128,7 @@
|
||||
</ui:Card>
|
||||
|
||||
<!-- recent sessions -->
|
||||
<ui:TextBlock Margin="0,20,0,0" FontTypography="Subtitle" Text="{x:Static vm:DashboardViewModel.RecentHeader}" />
|
||||
<ui:TextBlock Margin="0,20,0,0" FontTypography="Subtitle" AutomationProperties.HeadingLevel="Level2" 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}}" />
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
</ui:Image.Style>
|
||||
</ui:Image>
|
||||
<StackPanel Grid.Column="1">
|
||||
<ui:TextBlock FontTypography="Title" Text="{Binding ViewModel.Name}" />
|
||||
<ui:TextBlock FontTypography="Title" AutomationProperties.HeadingLevel="Level1" 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"
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<ui:TextBlock Grid.Column="0" FontTypography="Title" Text="{Binding ViewModel.HeaderText}" />
|
||||
<ui:TextBlock Grid.Column="0" FontTypography="Title" AutomationProperties.HeadingLevel="Level1" 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}"
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ui:TextBlock Grid.Row="0" FontTypography="Title" Text="{x:Static vm:LogsViewModel.Header}" />
|
||||
<ui:TextBlock Grid.Row="0" FontTypography="Title" AutomationProperties.HeadingLevel="Level1" 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">
|
||||
|
||||
@@ -12,10 +12,10 @@
|
||||
ScrollViewer.CanContentScroll="False">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
||||
<StackPanel Style="{StaticResource PageRoot}">
|
||||
<ui:TextBlock FontTypography="Title" Text="{x:Static vm:SettingsViewModel.Header}" />
|
||||
<ui:TextBlock FontTypography="Title" AutomationProperties.HeadingLevel="Level1" 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" Margin="0,20,0,8" Text="{x:Static res:Strings.Settings_Capture_Header}" />
|
||||
<ui:TextBlock FontTypography="Subtitle" AutomationProperties.HeadingLevel="Level2" 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>
|
||||
@@ -167,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" Margin="0,20,0,8" Text="{x:Static res:Strings.Settings_Policy_Header}" />
|
||||
<ui:TextBlock FontTypography="Subtitle" AutomationProperties.HeadingLevel="Level2" 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>
|
||||
@@ -218,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" Margin="0,20,0,8" Text="{x:Static res:Strings.Settings_Data_Header}" />
|
||||
<ui:TextBlock FontTypography="Subtitle" AutomationProperties.HeadingLevel="Level2" 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>
|
||||
@@ -242,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" Margin="0,20,0,8" Text="{x:Static res:Strings.Settings_Agent_Header}" />
|
||||
<ui:TextBlock FontTypography="Subtitle" AutomationProperties.HeadingLevel="Level2" 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>
|
||||
@@ -281,7 +281,7 @@
|
||||
</ui:CardControl>
|
||||
|
||||
<!-- Appearance (PR-2) and window. -->
|
||||
<ui:TextBlock FontTypography="Subtitle" Margin="0,20,0,8" Text="{x:Static vm:SettingsViewModel.AppearanceHeader}" />
|
||||
<ui:TextBlock FontTypography="Subtitle" AutomationProperties.HeadingLevel="Level2" 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}"
|
||||
@@ -300,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" Margin="0,20,0,8" Text="{x:Static res:Strings.Settings_Games_Header}" />
|
||||
<ui:TextBlock FontTypography="Subtitle" AutomationProperties.HeadingLevel="Level2" 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>
|
||||
@@ -338,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" Margin="0,20,0,8" Text="{x:Static res:Strings.Settings_Window_Header}" />
|
||||
<ui:TextBlock FontTypography="Subtitle" AutomationProperties.HeadingLevel="Level2" 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>
|
||||
@@ -386,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" Margin="0,20,0,8" Text="{x:Static res:Strings.Settings_Updates_Header}" />
|
||||
<ui:TextBlock FontTypography="Subtitle" AutomationProperties.HeadingLevel="Level2" 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>
|
||||
@@ -416,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" Margin="0,20,0,8" Text="{x:Static res:Strings.Settings_Logging_Header}" />
|
||||
<ui:TextBlock FontTypography="Subtitle" AutomationProperties.HeadingLevel="Level2" 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>
|
||||
@@ -427,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" Margin="0,20,0,8" Text="{x:Static vm:SystemInfoViewModel.Header}" />
|
||||
<ui:TextBlock FontTypography="Subtitle" AutomationProperties.HeadingLevel="Level2" 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">
|
||||
@@ -449,7 +449,7 @@
|
||||
</StackPanel>
|
||||
</ui:Card>
|
||||
|
||||
<ui:TextBlock FontTypography="Subtitle" Margin="0,20,0,8" Text="{x:Static res:Strings.Settings_Legal_Header}" />
|
||||
<ui:TextBlock FontTypography="Subtitle" AutomationProperties.HeadingLevel="Level2" 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>
|
||||
|
||||
Generated
+51
@@ -32,6 +32,23 @@ public static class Strings
|
||||
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),
|
||||
@@ -1250,6 +1267,40 @@ public static class Strings
|
||||
|
||||
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);
|
||||
|
||||
@@ -4888,4 +4888,72 @@
|
||||
<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>
|
||||
@@ -3677,4 +3677,55 @@ The documents below are the full terms; this summary does not replace them.</val
|
||||
<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>
|
||||
@@ -3672,4 +3672,55 @@ Các văn bản bên dưới là điều khoản đầy đủ; bản tóm tắt
|
||||
<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>
|
||||
@@ -290,7 +290,7 @@
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type controls:FpsReadout}">
|
||||
<StackPanel Orientation="Horizontal" ToolTip="{Binding Model.QualifierTooltip, RelativeSource={RelativeSource TemplatedParent}}">
|
||||
<ui:TextBlock FontTypography="Subtitle" VerticalAlignment="Center" Text="{Binding Model.Line, RelativeSource={RelativeSource TemplatedParent}}" />
|
||||
<ui:TextBlock FontTypography="Subtitle" AutomationProperties.HeadingLevel="None" 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}}" />
|
||||
|
||||
@@ -29,10 +29,10 @@
|
||||
<TabItem Header="{x:Static res:Strings.About_Tab_App}">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
||||
<StackPanel Margin="0,12,0,0" MaxWidth="760" HorizontalAlignment="Left">
|
||||
<ui:TextBlock FontTypography="Title" Text="{x:Static res:Strings.App_Title}" />
|
||||
<ui:TextBlock FontTypography="Title" AutomationProperties.HeadingLevel="Level1" Text="{x:Static res:Strings.App_Title}" />
|
||||
<ui:TextBlock x:Name="VersionText" Style="{StaticResource SecondaryText}" />
|
||||
<ui:TextBlock Margin="0,8,0,0" TextWrapping="Wrap" Text="{x:Static res:Strings.About_Tagline}" />
|
||||
<ui:TextBlock Margin="0,20,0,6" FontTypography="Subtitle" Text="{x:Static res:Strings.About_Notices_Header}" />
|
||||
<ui:TextBlock Margin="0,20,0,6" FontTypography="Subtitle" AutomationProperties.HeadingLevel="Level2" Text="{x:Static res:Strings.About_Notices_Header}" />
|
||||
<ui:TextBlock TextWrapping="Wrap" Text="{x:Static res:Strings.About_Notices_Copyright}" />
|
||||
<ui:TextBlock Margin="0,6,0,0" TextWrapping="Wrap" Text="{x:Static res:Strings.About_Notices_Warranty}" />
|
||||
<ui:TextBlock Margin="0,6,0,0" TextWrapping="Wrap" Text="{x:Static res:Strings.About_Notices_Licence}" />
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
<ui:Card Margin="0,0,8,8">
|
||||
<StackPanel>
|
||||
<ui:TextBlock Style="{StaticResource SecondaryText}" Text="{Binding Label}" />
|
||||
<ui:TextBlock FontTypography="Subtitle" Text="{Binding Value}" />
|
||||
<ui:TextBlock FontTypography="Subtitle" AutomationProperties.HeadingLevel="None" Text="{Binding Value}" />
|
||||
<ui:TextBlock Style="{StaticResource TertiaryText}" Text="{Binding Suffix}" Visibility="{Binding Suffix, Converter={StaticResource NullToCollapsed}}" />
|
||||
</StackPanel>
|
||||
</ui:Card>
|
||||
@@ -98,7 +98,7 @@
|
||||
own Native to Displayed (CLAUDE.md rule 6): the stored fg_mix, never recomputed. The bar draws in the chart
|
||||
palette's colours from code (FgMixBar); the table carries every number in text. -->
|
||||
<StackPanel Margin="0,8,0,0" Visibility="{Binding ViewModel.HasFgMix, Converter={StaticResource BoolToVis}}">
|
||||
<ui:TextBlock FontTypography="Subtitle" Text="{x:Static vm:SessionSummaryViewModel.FgMixHeader}" />
|
||||
<ui:TextBlock FontTypography="Subtitle" AutomationProperties.HeadingLevel="Level2" Text="{x:Static vm:SessionSummaryViewModel.FgMixHeader}" />
|
||||
<ui:TextBlock Style="{StaticResource TertiaryText}" TextWrapping="Wrap" Text="{Binding ViewModel.FgMixContext}"
|
||||
Visibility="{Binding ViewModel.FgMixContext, Converter={StaticResource NullToCollapsed}}" />
|
||||
<controls:FgMixBar Margin="0,6,0,0" Height="14" Segments="{Binding ViewModel.FgMixSegments}"
|
||||
@@ -157,7 +157,7 @@
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<ui:TextBlock Grid.Column="0" FontTypography="Subtitle" Text="{x:Static vm:SessionSummaryViewModel.FrametimeHeader}" />
|
||||
<ui:TextBlock Grid.Column="0" FontTypography="Subtitle" AutomationProperties.HeadingLevel="Level2" Text="{x:Static vm:SessionSummaryViewModel.FrametimeHeader}" />
|
||||
<CheckBox Grid.Column="1" Margin="0,0,16,0" Content="{x:Static vm:SessionSummaryViewModel.ShowDisplayedText}"
|
||||
IsChecked="{Binding ViewModel.ShowDisplayed}" IsEnabled="{Binding ViewModel.HasDisplayed}"
|
||||
Visibility="{Binding ViewModel.HasDisplayed, Converter={StaticResource BoolToVis}}" />
|
||||
@@ -166,16 +166,16 @@
|
||||
</Grid>
|
||||
<ui:TextBlock Style="{StaticResource TertiaryText}" Text="{Binding ViewModel.DecimationNote}" />
|
||||
<charts:FrametimeChart x:Name="Frametime" Margin="0,6,0,0" Height="300" />
|
||||
<ui:TextBlock Margin="0,16,0,0" FontTypography="Subtitle" Text="{x:Static vm:SessionSummaryViewModel.DistributionHeader}" />
|
||||
<ui:TextBlock Margin="0,16,0,0" FontTypography="Subtitle" AutomationProperties.HeadingLevel="Level2" Text="{x:Static vm:SessionSummaryViewModel.DistributionHeader}" />
|
||||
<charts:DistributionChart x:Name="Distribution" Margin="0,6,0,0" Height="260" />
|
||||
<!-- beta.14 (D49): the render scale over the session -->
|
||||
<ui:TextBlock Margin="0,16,0,0" FontTypography="Subtitle" Text="{x:Static vm:SessionSummaryViewModel.RenderScaleHeader}" />
|
||||
<ui:TextBlock Margin="0,16,0,0" FontTypography="Subtitle" AutomationProperties.HeadingLevel="Level2" Text="{x:Static vm:SessionSummaryViewModel.RenderScaleHeader}" />
|
||||
<charts:RenderScaleChart x:Name="RenderScale" Margin="0,6,0,0" Height="200" />
|
||||
</StackPanel>
|
||||
|
||||
<!-- sensors, in either tier (beta.8): a session that was not hooked has nothing else to chart -->
|
||||
<StackPanel Visibility="{Binding ViewModel.HasSensorCharts, Converter={StaticResource BoolToVis}}">
|
||||
<ui:TextBlock Margin="0,16,0,0" FontTypography="Subtitle" Text="{x:Static vm:SessionSummaryViewModel.SensorsHeader}" />
|
||||
<ui:TextBlock Margin="0,16,0,0" FontTypography="Subtitle" AutomationProperties.HeadingLevel="Level2" Text="{x:Static vm:SessionSummaryViewModel.SensorsHeader}" />
|
||||
<charts:SensorsChart x:Name="Sensors" Margin="0,6,0,0" />
|
||||
</StackPanel>
|
||||
|
||||
@@ -183,7 +183,7 @@
|
||||
ItemsControl over a shared-size grid rather than a DataGrid: a DataGrid's own scroller would take the
|
||||
window's wheel. -->
|
||||
<StackPanel Visibility="{Binding ViewModel.HasSensorStats, Converter={StaticResource BoolToVis}}">
|
||||
<ui:TextBlock Margin="0,16,0,0" FontTypography="Subtitle" Text="{x:Static vm:SessionSummaryViewModel.SensorStatsHeader}" />
|
||||
<ui:TextBlock Margin="0,16,0,0" FontTypography="Subtitle" AutomationProperties.HeadingLevel="Level2" Text="{x:Static vm:SessionSummaryViewModel.SensorStatsHeader}" />
|
||||
<ui:TextBlock Style="{StaticResource TertiaryText}" TextWrapping="Wrap" Text="{x:Static vm:SessionSummaryViewModel.SensorStatsNote}" />
|
||||
<StackPanel Margin="0,6,0,0" Grid.IsSharedSizeScope="True">
|
||||
<Grid>
|
||||
@@ -230,7 +230,7 @@
|
||||
Visibility="{Binding ViewModel.SensorStatsMissing, Converter={StaticResource NullToCollapsed}}" />
|
||||
|
||||
<!-- annotations -->
|
||||
<ui:TextBlock Margin="0,16,0,0" FontTypography="Subtitle" Text="{x:Static vm:SessionSummaryViewModel.AnnotationsHeader}" />
|
||||
<ui:TextBlock Margin="0,16,0,0" FontTypography="Subtitle" AutomationProperties.HeadingLevel="Level2" Text="{x:Static vm:SessionSummaryViewModel.AnnotationsHeader}" />
|
||||
<ui:TextBox Margin="0,6,0,0" AutomationProperties.Name="{x:Static vm:SessionSummaryViewModel.TagsPlaceholder}" PlaceholderText="{x:Static vm:SessionSummaryViewModel.TagsPlaceholder}" Text="{Binding ViewModel.Tags, UpdateSourceTrigger=PropertyChanged}" />
|
||||
<ui:TextBox Margin="0,6,0,0" MinHeight="72" AcceptsReturn="True" TextWrapping="Wrap"
|
||||
AutomationProperties.Name="{x:Static vm:SessionSummaryViewModel.NotesPlaceholder}"
|
||||
|
||||
@@ -250,6 +250,36 @@ public sealed class AccessibilityTests
|
||||
.Should().BeEmpty("use ui:PassiveScrollViewer inside a dialog");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// beta.35 (D90): a page's title is a first-level heading and a section's a second-level one, so a screen reader's heading
|
||||
/// keys move through a page by its sections; a Subtitle that shows a value, not a section, says so with <c>None</c>.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void EveryTitleAndSubtitleDeclaresAHeadingLevel()
|
||||
{
|
||||
var undeclared = new List<string>();
|
||||
foreach ((string file, XDocument xaml) in AppXaml())
|
||||
{
|
||||
foreach (XElement text in xaml.Descendants().Where(static e => string.Equals(e.Name.LocalName, "TextBlock", StringComparison.Ordinal)))
|
||||
{
|
||||
string? typography = text.Attribute("FontTypography")?.Value;
|
||||
string? level = text.Attribute("AutomationProperties.HeadingLevel")?.Value;
|
||||
bool wrong = typography switch
|
||||
{
|
||||
"Title" => !string.Equals(level, "Level1", StringComparison.Ordinal),
|
||||
"Subtitle" => level is not ("Level2" or "None"),
|
||||
_ => false,
|
||||
};
|
||||
if (wrong)
|
||||
{
|
||||
undeclared.Add($"{file}:{((System.Xml.IXmlLineInfo)text).LineNumber} FontTypography={typography} HeadingLevel={level ?? "(none)"}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
undeclared.Should().BeEmpty("08_UI §Accessibility: a Title is heading 1, a Subtitle heading 2 - or None, said on purpose, where it shows a value");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TheManifestIsPerMonitorV2()
|
||||
{
|
||||
|
||||
@@ -2,29 +2,36 @@
|
||||
// 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.Controls;
|
||||
using System.Windows.Input;
|
||||
using FluentAssertions;
|
||||
using FrameLedger.App.Charts;
|
||||
using ScottPlot.Interactivity.UserActionResponses;
|
||||
using ScottPlot.WPF;
|
||||
|
||||
namespace FrameLedger.App.Tests;
|
||||
|
||||
/// <summary>
|
||||
/// What a chart does with the keyboard (beta.35): <c>08_UI</c> §Accessibility said ScottPlot plots take no focus and no
|
||||
/// keys, and they take both. A chart is a Tab stop, and the keys ScottPlot reads reach it — the arrows pan, Ctrl with an
|
||||
/// arrow zooms, A shows all of it. Driven in a real window off the screen, since a key needs the window's input source.
|
||||
/// What a chart does with the keyboard and says to a screen reader (beta.35, D90). <c>08_UI</c> §Accessibility said ScottPlot
|
||||
/// plots take no focus and no keys; they take both — the arrows pan, Ctrl with an arrow zooms, A shows all of it — and until
|
||||
/// beta.35 marked no key handled, so the page around a chart acted on the same arrow too. Driven in a real window off the
|
||||
/// screen, since a key needs the window's input source.
|
||||
/// </summary>
|
||||
public sealed class ChartKeyboardTests
|
||||
{
|
||||
[Fact]
|
||||
public async Task AFocusedChartPansWithTheArrowsZoomsWithCtrlAndShowsAllWithA()
|
||||
public async Task AFocusedChartPansWithTheArrowsZoomsWithCtrlShowsAllWithAAndKeepsTheKeys()
|
||||
{
|
||||
var facts = await PagesLoadTests.OnStaAsync(() =>
|
||||
{
|
||||
var plot = new WpfPlot { Width = 600, Height = 300 };
|
||||
var plot = new ChartPlot { Width = 600, Height = 300 };
|
||||
ChartTheme.Attach(plot);
|
||||
_ = plot.Plot.Add.Signal(new double[] { 0, 1, 0, 1, 0, 1, 0 });
|
||||
Window window = ScrollBarHidingTests.OffScreen(new Window { Content = plot });
|
||||
var below = new Button { Content = "below" };
|
||||
var page = new ScrollViewer { Content = new StackPanel { Children = { plot, below, new Border { Height = 2000 } } } };
|
||||
Window window = ScrollBarHidingTests.OffScreen(new Window { Content = page });
|
||||
try
|
||||
{
|
||||
window.Show();
|
||||
@@ -34,21 +41,22 @@ public sealed class ChartKeyboardTests
|
||||
Visuals.Pump();
|
||||
|
||||
ScottPlot.AxisLimits start = plot.Plot.Axes.GetLimits();
|
||||
Press(plot, System.Windows.Input.Key.Left, down: true);
|
||||
Press(plot, System.Windows.Input.Key.Left, down: false);
|
||||
bool leftHandled = Press(plot, Key.Left, down: true);
|
||||
_ = Press(plot, Key.Left, down: false);
|
||||
ScottPlot.AxisLimits panned = plot.Plot.Axes.GetLimits();
|
||||
|
||||
Press(plot, System.Windows.Input.Key.LeftCtrl, down: true);
|
||||
Press(plot, System.Windows.Input.Key.Up, down: true);
|
||||
Press(plot, System.Windows.Input.Key.Up, down: false);
|
||||
Press(plot, System.Windows.Input.Key.LeftCtrl, down: false);
|
||||
_ = Press(plot, Key.LeftCtrl, down: true);
|
||||
_ = Press(plot, Key.Up, down: true);
|
||||
_ = Press(plot, Key.Up, down: false);
|
||||
_ = Press(plot, Key.LeftCtrl, down: false);
|
||||
ScottPlot.AxisLimits zoomed = plot.Plot.Axes.GetLimits();
|
||||
|
||||
Press(plot, System.Windows.Input.Key.A, down: true);
|
||||
Press(plot, System.Windows.Input.Key.A, down: false);
|
||||
bool aHandled = Press(plot, Key.A, down: true);
|
||||
_ = Press(plot, Key.A, down: false);
|
||||
ScottPlot.AxisLimits all = plot.Plot.Axes.GetLimits();
|
||||
bool tabHandled = Press(plot, Key.Tab, down: true);
|
||||
|
||||
return new { plot.Focusable, plot.IsTabStop, Start = start, Panned = panned, Zoomed = zoomed, All = all };
|
||||
return new { plot.Focusable, plot.IsTabStop, Start = start, Panned = panned, Zoomed = zoomed, All = all, leftHandled, aHandled, tabHandled, page.VerticalOffset };
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -56,16 +64,73 @@ public sealed class ChartKeyboardTests
|
||||
}
|
||||
});
|
||||
|
||||
facts.Focusable.Should().BeTrue("ScottPlot makes its control focusable; Tab reaches every chart");
|
||||
facts.Focusable.Should().BeTrue("Tab reaches every chart");
|
||||
facts.IsTabStop.Should().BeTrue();
|
||||
facts.Panned.Left.Should().BeLessThan(facts.Start.Left, "Left moves the view to earlier values");
|
||||
(facts.Zoomed.Top - facts.Zoomed.Bottom).Should().BeLessThan(facts.Panned.Top - facts.Panned.Bottom, "Ctrl+Up zooms in vertically");
|
||||
facts.All.Left.Should().BeGreaterThan(facts.Panned.Left, "A shows all of the data again");
|
||||
facts.All.Right.Should().BeGreaterThanOrEqualTo(6, "the whole signal, seven points from 0 to 6, is in view after A");
|
||||
facts.leftHandled.Should().BeTrue("the arrow is the chart's: the page around it neither scrolls nor moves the focus on (ChartKeys)");
|
||||
facts.aHandled.Should().BeTrue();
|
||||
facts.tabHandled.Should().BeFalse("Tab still leaves the chart");
|
||||
facts.VerticalOffset.Should().Be(0, "the page did not scroll on the chart's keys");
|
||||
}
|
||||
|
||||
/// <summary>Raises the key the way WPF would: preview, then the bubbling event, from the window's own input source.</summary>
|
||||
private static void Press(WpfPlot plot, Key key, bool down)
|
||||
/// <summary>beta.35 (D90): a double-click shows all of it, as the guide says; ScottPlot's own toggled its benchmark overlay.</summary>
|
||||
[Fact]
|
||||
public async Task ADoubleClickShowsAllOfTheChartAndTheBenchmarkIsGone()
|
||||
{
|
||||
var facts = await PagesLoadTests.OnStaAsync(() =>
|
||||
{
|
||||
var plot = new WpfPlot();
|
||||
ChartTheme.Attach(plot);
|
||||
ChartTheme.ResetOnDoubleClick(plot); // a second call adds nothing
|
||||
return new
|
||||
{
|
||||
Benchmarks = plot.UserInputProcessor.UserActionResponses.OfType<DoubleClickBenchmark>().Count(),
|
||||
Resets = plot.UserInputProcessor.UserActionResponses.OfType<DoubleClickResponse>().Count(),
|
||||
};
|
||||
});
|
||||
|
||||
facts.Benchmarks.Should().Be(0, "a double-click is no developer's render-time overlay");
|
||||
facts.Resets.Should().Be(1);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task AChartIsANamedImageThatSaysWhereItsNumbersAreAndItsKeys()
|
||||
{
|
||||
var facts = await PagesLoadTests.OnStaAsync(() =>
|
||||
{
|
||||
var plot = new ChartPlot();
|
||||
AutomationProperties.SetName(plot, "Frame time chart");
|
||||
AutomationProperties.SetHelpText(plot, "The figures are above.");
|
||||
AutomationPeer peer = UIElementAutomationPeer.CreatePeerForElement(plot)!;
|
||||
AutomationPeer bare = UIElementAutomationPeer.CreatePeerForElement(new ChartPlot())!;
|
||||
return new
|
||||
{
|
||||
Type = peer.GetAutomationControlType(),
|
||||
Localized = peer.GetLocalizedControlType(),
|
||||
Name = peer.GetName(),
|
||||
Help = peer.GetHelpText(),
|
||||
BareHelp = bare.GetHelpText(),
|
||||
Children = peer.GetChildren(),
|
||||
Class = peer.GetClassName(),
|
||||
Keys = Strings.A11y_Chart_Keys,
|
||||
Kind = Strings.A11y_Chart_ControlType,
|
||||
};
|
||||
});
|
||||
|
||||
facts.Type.Should().Be(AutomationControlType.Image);
|
||||
facts.Localized.Should().Be(facts.Kind, "a screen reader says 'chart', in the UI's language");
|
||||
facts.Name.Should().Be("Frame time chart");
|
||||
facts.Help.Should().StartWith("The figures are above.").And.EndWith(facts.Keys, "where its numbers are, then its keys");
|
||||
facts.BareHelp.Should().Be(facts.Keys);
|
||||
facts.Children.Should().BeNull("ScottPlot's surface is pixels; nothing inside is read");
|
||||
facts.Class.Should().Be(nameof(ChartPlot));
|
||||
}
|
||||
|
||||
/// <summary>Raises the key the way WPF would: preview, then the bubbling event, from the window's own input source; whether it ended handled.</summary>
|
||||
private static bool Press(WpfPlot plot, Key key, bool down)
|
||||
{
|
||||
PresentationSource source = PresentationSource.FromVisual(plot) ?? throw new InvalidOperationException("the plot has no input source");
|
||||
var preview = new KeyEventArgs(Keyboard.PrimaryDevice, source, Environment.TickCount, key) { RoutedEvent = down ? Keyboard.PreviewKeyDownEvent : Keyboard.PreviewKeyUpEvent };
|
||||
@@ -73,5 +138,6 @@ public sealed class ChartKeyboardTests
|
||||
var bubble = new KeyEventArgs(Keyboard.PrimaryDevice, source, Environment.TickCount, key) { RoutedEvent = down ? Keyboard.KeyDownEvent : Keyboard.KeyUpEvent };
|
||||
plot.RaiseEvent(bubble);
|
||||
Visuals.Pump();
|
||||
return bubble.Handled;
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@
|
||||
using System.Globalization;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Automation.Peers;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
@@ -104,14 +105,14 @@ public sealed partial class PagesLoadTests
|
||||
{
|
||||
foreach (UIElement element in Reachable(root).Where(IsTabStop))
|
||||
{
|
||||
if (UIElementAutomationPeer.CreatePeerForElement(element) is null && !string.Equals(element.GetType().Name, "WpfPlot", StringComparison.Ordinal))
|
||||
if (UIElementAutomationPeer.CreatePeerForElement(element) is null)
|
||||
{
|
||||
found.Add(Describe(name, element));
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
string.Join(Environment.NewLine, silent).Should().BeEmpty("a Tab stop with no automation peer says nothing to a screen reader (ScottPlot's plot is beta.35 PR-4's)");
|
||||
string.Join(Environment.NewLine, silent).Should().BeEmpty("a Tab stop with no automation peer says nothing to a screen reader - a chart included since beta.35 PR-4 (Charts/ChartPlot)");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -265,5 +266,80 @@ public sealed partial class PagesLoadTests
|
||||
string.Join(Environment.NewLine, twins).Should().BeEmpty("a button repeated on each row names its row");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// beta.35 (D90): every page, the first run and About have exactly one first-level heading, their title, so a screen
|
||||
/// reader's heading keys start a page where the eye does.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public async Task EveryPageHasOneFirstLevelHeadingItsTitle()
|
||||
{
|
||||
await using ScratchLedger s = await ScratchLedger.OpenAsync();
|
||||
using Surfaces surfaces = await Surfaces.LoadAsync(s);
|
||||
|
||||
List<string> wrong = await OnStaAsync(() =>
|
||||
{
|
||||
var found = new List<string>();
|
||||
foreach ((string name, Func<FrameworkElement> build) in surfaces.Pages().Concat(surfaces.Windows().Where(static w => w.Name is "First run" or "About")))
|
||||
{
|
||||
(Window host, FrameworkElement root) = Hosted(build);
|
||||
try
|
||||
{
|
||||
Lay(root);
|
||||
string[] firsts = [.. ShownTexts(root).Where(static t => AutomationProperties.GetHeadingLevel(t) == AutomationHeadingLevel.Level1).Select(static t => t.Text)];
|
||||
if (firsts.Length != 1)
|
||||
{
|
||||
found.Add($"{name}: {firsts.Length} first-level headings ({string.Join(", ", firsts)})");
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
host.Close();
|
||||
}
|
||||
}
|
||||
|
||||
return found;
|
||||
});
|
||||
|
||||
string.Join(Environment.NewLine, wrong).Should().BeEmpty("a page has one title, and it is the first-level heading");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// beta.35 (D90; WCAG 2.2 1.4.1): no two series of one chart differ by colour alone. Every chart a surface draws is read
|
||||
/// through its legend: two entries with different names and the same pattern, marker and hatch are told apart only by
|
||||
/// their colour - the Compare chart's five sessions, the GPU's temperature and its hot spot, the two stutters, the two lows.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public async Task NoChartTellsTwoSeriesApartByColourAlone()
|
||||
{
|
||||
await using ScratchLedger s = await ScratchLedger.OpenAsync();
|
||||
using Surfaces surfaces = await Surfaces.LoadAsync(s);
|
||||
|
||||
List<string> twins = await OnStaAsync(() =>
|
||||
{
|
||||
List<string> found = SweepEverySurface(surfaces, static (name, root, list) =>
|
||||
{
|
||||
foreach (ScottPlot.WPF.WpfPlot plot in Reachable(root).OfType<ScottPlot.WPF.WpfPlot>())
|
||||
{
|
||||
list.AddRange(ColourOnlyTwins(plot.Plot, $"{name}: {plot.Name}"));
|
||||
}
|
||||
});
|
||||
|
||||
// Compare draws only after a choice: five sessions, the most it takes.
|
||||
var compare = new Charts.CompareChart();
|
||||
compare.Show([.. Enumerable.Range(1, 5).Select(static i => new Charts.CompareCurve("Session " + i.ToString(CultureInfo.InvariantCulture), [0, 50, 100], [i, i + 1, i + 2]))], tierLegend: null);
|
||||
found.AddRange(ColourOnlyTwins(compare.Plot.Plot, "Compare, five sessions"));
|
||||
return found;
|
||||
});
|
||||
|
||||
string.Join(Environment.NewLine, twins).Should().BeEmpty("a series is told apart by its pattern, marker or hatch too (Charts/ChartPatterns)");
|
||||
}
|
||||
|
||||
private static IEnumerable<string> ColourOnlyTwins(ScottPlot.Plot plot, string where) =>
|
||||
plot.GetPlottables().Where(static p => p.IsVisible).SelectMany(static p => p.LegendItems)
|
||||
.Where(static i => i.IsVisible && !string.IsNullOrEmpty(i.LabelText))
|
||||
.GroupBy(static i => (i.LinePattern.Name, Line: i.LineWidth > 0, Marker: i.MarkerSize > 0 ? i.MarkerShape : ScottPlot.MarkerShape.None, Hatch: i.FillHatch?.GetType().Name))
|
||||
.Where(static g => g.Select(static i => i.LabelText).Distinct(StringComparer.Ordinal).Count() > 1)
|
||||
.Select(g => $"{where}: {string.Join(" / ", g.Select(static i => i.LabelText).Distinct(StringComparer.Ordinal))} differ by colour only");
|
||||
|
||||
private static string Shorten(string text) => text.Length <= 80 ? text : text[..77] + "...";
|
||||
}
|
||||
Reference in new issue
Block a user