Skip to content

Bring PS5 GTA6 to 120FPS with DLSS 5. An advanced Windows video player and capture enhancement tool featuring real-time preview for videos, images, and capture card sources. Combine AI-powered Super Resolution, DLSS5 image enhancement, and Frame Generation to deliver a next-generation visual experience.

C++

tools(ui-mig): G0.5 sample dock, switch and page motion on design and QML

Veyra Goal Agent67f9ed154f99
diff --git a/apps/veyra-qml/main.cpp b/apps/veyra-qml/main.cpp
index 0360967c..4aca7205 100644
--- a/apps/veyra-qml/main.cpp
+++ b/apps/veyra-qml/main.cpp
@@ -145,6 +145,7 @@ int main(int argc, char** argv) {
// --size <W>x<H> window size in device-independent pixels
// --reduced-motion every animation at zero duration
// --slow-animations <N> every animation N times slower (motion sampling)
+ // --motion-probe <name> dock | page | switch: start that motion, log its value per frame
const QStringList args = QCoreApplication::arguments();
QString openPath;
QVariantMap testOptions;
@@ -165,6 +166,8 @@ int main(int argc, char** argv) {
} else if (a == QLatin1String("--size") && hasValue) {
const QStringList wh = args.at(++i).split(QLatin1Char('x'));
if (wh.size() == 2) testSize = QSize(wh.at(0).toInt(), wh.at(1).toInt());
+ } else if (a == QLatin1String("--motion-probe") && hasValue) {
+ testOptions.insert(QStringLiteral("motionProbe"), args.at(++i));
} else if (a == QLatin1String("--reduced-motion")) {
testOptions.insert(QStringLiteral("reducedMotion"), true);
} else if (a == QLatin1String("--slow-animations") && hasValue) {
diff --git a/docs/UI_FULL_GOAL_PLAN_2026-09-26.md b/docs/UI_FULL_GOAL_PLAN_2026-09-26.md
index ac876179..8ab65c37 100644
--- a/docs/UI_FULL_GOAL_PLAN_2026-09-26.md
+++ b/docs/UI_FULL_GOAL_PLAN_2026-09-26.md
@@ -9,7 +9,7 @@
| 阶段 | 状态 | 最后标签 | 备注 |
|---|---|---|---|
-| G0 工具与基线 | 进行中 | checkpoint/ui-mig-g0.4 | G0.2 设计参考在 `logs\ui-qml-migration-20260925\design-ref\`(shotpage 默认关过渡,`?motion=1` 保留动画);G0.3 测试开关逐项截图于 `goal\g0.3\`;G0.4 对比图在 `compare\`;下一步 G0.5 |
+| G0 工具与基线 | 进行中 | checkpoint/ui-mig-g0.5 | G0.2 设计参考在 `logs\ui-qml-migration-20260925\design-ref\`(shotpage 默认关过渡,`?motion=1` 保留动画);G0.3 测试开关逐项截图于 `goal\g0.3\`;G0.4 对比图在 `compare\`;G0.5 动效曲线在 `goal\g0.5\`(QML 线性无超调、页面无过渡);下一步 G0.6 |
| G1 基础(缓动/背景/字体/图标/组件动效) | 未开始 | | |
| G2 外壳 | 未开始 | | |
| G3 四主屏 | 未开始 | | |
diff --git a/docs/UI_MIGRATION_EXECUTION_2026-09-25.md b/docs/UI_MIGRATION_EXECUTION_2026-09-25.md
index c264af2f..103fe5ae 100644
--- a/docs/UI_MIGRATION_EXECUTION_2026-09-25.md
+++ b/docs/UI_MIGRATION_EXECUTION_2026-09-25.md
@@ -40,6 +40,7 @@
| G0.2 | 17 张设计参考(无头 Edge) | 完成(逐张看图) | `checkpoint/ui-mig-g0.2` | `logs\ui-qml-migration-20260925\design-ref\`;首版对话框被截在淡入中途、与底页重叠,`shotpage.js` 默认 `setReduced(true)` 后重渲染 |
| G0.3 | 应用测试开关 | 完成(逐项截图已看) | `checkpoint/ui-mig-g0.3` | `--page --tab --dialog --aspect --dock-pinned --size WxH --reduced-motion --slow-animations N`;证据 `goal\g0.3\`。带片源时应用自动进极简且原生视频窗盖住 QML,对话框/dock 截图需不带片源 |
| G0.4 | `shoot-all.ps1`(17 屏 QML)+ `compose-compare.ps1`(左设计右 QML) | 完成(看图) | `checkpoint/ui-mig-g0.4` | QML 截图 `logs\ui-qml-migration-20260925\qml-ref\`,对比 `compare\cmp-f-*.png`。首页缺“继续上次/最近”、卡片图标为 emoji、标志偏低;专业页缺 NR 多层卡、仪表折线与分段柱、顺序条换行——列入 G1/G3 |
+| G0.5 | 动效采样(设计 vs QML) | 完成(曲线已看) | `checkpoint/ui-mig-g0.5` | `tools/qt_probe/motion-sample.ps1`;设计端 `shotpage.js ?motion=1&probe=` 暂停 Web Animations 按 10ms 定位读值,QML 端 `--motion-probe` 每帧记日志。证据 `goal\g0.5\`(design/qml CSV + chart)。dock:设计 110ms 到位、130ms 超调峰 10.17px,QML 线性 566ms 到 8px 无超调;开关:设计峰 14.6px,QML 线性 500ms;页面切换:设计 rise 16→0 约 150ms,QML 无过渡。证实 4 值 bezierCurve 退化为线性(G1.1)与缺页面进入动画(G2.2) |
## 发现并修复的 bug
diff --git a/docs/WORKLOG.md b/docs/WORKLOG.md
index 4103b7fc..f9f9fdfa 100644
--- a/docs/WORKLOG.md
+++ b/docs/WORKLOG.md
@@ -6542,3 +6542,12 @@ release. 5090 live acceptance, 15-second hitch and user flicker remain unresolve
- G0.4:`tools/qt_probe/shoot-all.ps1` 按 17 个设计帧状态截 QML(不带片源、减少动画),
`compose-compare.ps1` 生成左右对比 `E:\项目\Veyra\logs\ui-qml-migration-20260925\compare\`。
首次运行无输出:`$frames` 表覆盖了同名参数 `-Frames`(PowerShell 变量名不分大小写),改名 `$states`。
+
+- G0.5:`tools/qt_probe/motion-sample.ps1` 对 dock、开关、页面切换三组动效双端采样。设计端
+ `shotpage.js ?motion=1&probe=<名>` 启动动效后暂停 `document.getAnimations()`,按 10ms 步进读
+ 变换矩阵/透明度;QML 端 `--motion-probe <名>`(Main.qml 探针 Loader/Timer/FrameAnimation)每帧写日志。
+ 证据 `E:/项目/Veyra/logs/ui-qml-migration-20260925/goal/g0.5/`(design-*.csv、qml-*.csv、chart-*.png,已看图)。
+ 结果:dock 设计 110ms 到位、130ms 超调至 10.17px 后回落,QML 线性 566ms 到 8px;开关设计峰 14.6px,
+ QML 线性 500ms;页面进入设计 y 16→0 约 150ms(spring-soft),QML 完全无过渡。
+ 脚本首版反斜杠正则在生成时退化为非法正则,改用 `.Replace([char]92,[char]47)`。
+ 引擎门槛未跑(仅测试探针,未动引擎)。
diff --git a/prototypes/ui-redesign-2026-09-25/shotpage.js b/prototypes/ui-redesign-2026-09-25/shotpage.js
index fc2ba0d8..920733c1 100644
--- a/prototypes/ui-redesign-2026-09-25/shotpage.js
+++ b/prototypes/ui-redesign-2026-09-25/shotpage.js
@@ -61,7 +61,49 @@
app.root.style.width = frame.w + 'px';
app.root.style.height = frame.h + 'px';
+ // Motion probes (G0.5): ?motion=1&probe=dock|page|switch starts one motion, then
+ // seeks every running animation to fixed times through the Web Animations API and
+ // reads the animated value back. &t=<ms> instead freezes the motion at that time for
+ // a screenshot. The numbers land in <pre id="motion-csv"> for --dump-dom.
+ const probe = params.get('probe');
+ if (probe) {
+ setTimeout(function () {
+ try { runProbe(app, probe, params.get('t')); }
+ catch (e) { const pre = document.createElement('pre'); pre.id = 'motion-csv'; pre.textContent = 'error ' + e; document.body.appendChild(pre); }
+ }, 300);
+ return;
+ }
+
// A dialog opens on a later frame; the capture waits for it.
setTimeout(function () { document.title = 'ready'; }, 900);
});
+
+ function runProbe(app, probe, freezeAt) {
+ const root = app.root;
+ const ty = el => { const m = getComputedStyle(el).transform; return m === 'none' ? 0 : new DOMMatrix(m).m42; };
+ let start, read;
+ if (probe === 'dock') {
+ const dock = root.querySelector('.dock');
+ start = () => app.setDockPinned(true);
+ read = () => ty(dock);
+ } else if (probe === 'switch') {
+ const sw = [...root.querySelectorAll('.sw')].find(x => x.offsetParent !== null);
+ start = () => sw.click();
+ read = () => { const m = getComputedStyle(sw, '::after').transform; return m === 'none' ? 0 : new DOMMatrix(m).m41; };
+ } else if (probe === 'page') {
+ start = () => app.go('pro');
+ read = () => { const e = app.pages.pro.el.querySelector('[data-in]'); const cs = getComputedStyle(e); return cs.opacity + ',' + ty(e); };
+ } else return;
+ start();
+ // The page switch shows the new page 150 ms later; wait for its animations to exist.
+ setTimeout(function () {
+ const anims = () => document.getAnimations();
+ anims().forEach(a => a.pause());
+ if (freezeAt !== null) { anims().forEach(a => a.currentTime = +freezeAt); document.title = 'ready'; return; }
+ const rows = ['t_ms,value'];
+ for (let t = 0; t <= 1000; t += 10) { anims().forEach(a => a.currentTime = t); rows.push(t + ',' + read()); }
+ const pre = document.createElement('pre'); pre.id = 'motion-csv'; pre.textContent = rows.join(String.fromCharCode(10));
+ document.body.appendChild(pre); document.title = 'ready';
+ }, probe === 'page' ? 200 : 30);
+ }
})();
diff --git a/qml/Veyra/Main.qml b/qml/Veyra/Main.qml
index 5ec86ee3..70ff30d6 100644
--- a/qml/Veyra/Main.qml
+++ b/qml/Veyra/Main.qml
@@ -245,6 +245,44 @@ Window {
}
}
+ // Motion probe (G0.5, --motion-probe): starts one motion 800 ms after load and logs
+ // "motion-probe,<name>,<ms>,<value>" every frame for a second, to line up against the
+ // design's curve from shotpage.js ?probe=. Sampled per rendered frame, so the spacing
+ // follows the display rate rather than a fixed 10 ms step.
+ Loader {
+ id: probeSwitch
+ active: root.test.motionProbe === "switch"
+ x: 40; y: 120; z: 100
+ sourceComponent: VSwitch {}
+ }
+ Timer {
+ running: root.test.motionProbe !== undefined
+ interval: 800
+ onTriggered: {
+ const name = root.test.motionProbe
+ if (name === "dock") dock.opened = true
+ else if (name === "page") root.page = "pro"
+ else if (name === "switch") probeSwitch.item.checked = true
+ probe.t0 = Date.now()
+ probe.running = true
+ }
+ }
+ FrameAnimation {
+ id: probe
+ property real t0: 0
+ running: false
+ onTriggered: {
+ const ms = Date.now() - t0
+ const name = root.test.motionProbe
+ let v
+ if (name === "dock") v = dock.barY
+ else if (name === "page") v = proPage.opacity + "," + proPage.y
+ else v = probeSwitch.item.children[0].x - 3
+ console.log("motion-probe," + name + "," + ms + "," + v)
+ if (ms > 1000) running = false
+ }
+ }
+
Component.onCompleted: {
// Open on the configured page: the user's saved preference, or the
// override a test passes on the command line.
diff --git a/qml/Veyra/TopDock.qml b/qml/Veyra/TopDock.qml
index b75a684c..8ff41c36 100644
--- a/qml/Veyra/TopDock.qml
+++ b/qml/Veyra/TopDock.qml
@@ -24,6 +24,8 @@ Item {
property bool opened: false
// Mirrors st.dockPinned in the design: pinned stays open regardless of hover.
property bool pinned: false
+ // The pill's top edge, read by the motion probe (G0.5).
+ readonly property real barY: bar.y
// --- page definitions (order and tooltips from core.js) ---------------
readonly property var items: [
diff --git a/tools/qt_probe/motion-sample.ps1 b/tools/qt_probe/motion-sample.ps1
new file mode 100644
index 00000000..55bc93f8
--- /dev/null
+++ b/tools/qt_probe/motion-sample.ps1
@@ -0,0 +1,68 @@
+# Motion sampling (G0.5): the same motion on the design and in the QML app, as curves.
+#
+# Design: shotpage.js ?motion=1&probe=<name> pauses every Web Animation and seeks it in
+# 10 ms steps, reading the animated value back (--dump-dom picks up the CSV).
+# QML: --motion-probe <name> starts the motion and logs one value per rendered frame.
+# Output per probe: design-<name>.csv, qml-<name>.csv and chart-<name>.png (design in
+# blue, QML in orange) under $Out.
+param(
+ [string]$Out = 'E:\项目\Veyra\logs\ui-qml-migration-20260925\motion',
+ [string[]]$Probes = @('dock', 'switch', 'page'),
+ [string]$App = 'E:\项目\Veyra\tests\ui-qml-migration-20260925\qml-app'
+)
+Add-Type -AssemblyName System.Drawing
+New-Item -ItemType Directory -Force $Out | Out-Null
+$edge = 'C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe'
+$proto = Join-Path (Split-Path -Parent (Split-Path -Parent $PSScriptRoot)) 'prototypes\ui-redesign-2026-09-25\shot2.html'
+$profile = 'E:\项目\Veyra\tmp\ui-qml-migration-20260925\edge-profile'
+$log = Join-Path $App 'logs\veyra-qml.log'
+# Where each motion lives in the design: the switch sits on the capture dialog.
+$designFrame = @{ dock = 'f-home'; switch = 'f-cap'; page = 'f-home' }
+
+function Read-Curve([string[]]$lines) {
+ # "t,value" or "t,opacity,y": the curve is the last column.
+ $lines | Where-Object { $_ -match '^\d' } | ForEach-Object {
+ $c = $_ -split ','; [pscustomobject]@{ t = [double]$c[0]; v = [double]$c[-1] }
+ }
+}
+
+foreach ($name in $Probes) {
+ $url = "file:///" + $proto.Replace([char]92, [char]47) + "?f=$($designFrame[$name])&motion=1&probe=$name"
+ $dom = & $edge --headless=new --disable-gpu "--user-data-dir=$profile" --window-size=1280,800 --virtual-time-budget=3000 --dump-dom $url 2>$null | Out-String
+ $m = [regex]::Match($dom, '<pre id="motion-csv">([^<]*)</pre>')
+ $design = if ($m.Success) { $m.Groups[1].Value -split "`n" } else { @('error no design curve') }
+ $design | Set-Content -Encoding utf8 (Join-Path $Out "design-$name.csv")
+
+ $before = if (Test-Path $log) { (Get-Content $log).Count } else { 0 }
+ $p = Start-Process -FilePath (Join-Path $App 'veyra_qml_ui.exe') -ArgumentList @('--page', 'home', '--motion-probe', $name) -PassThru
+ Start-Sleep -Seconds 4
+ Stop-Process -Id $p.Id -Force -ErrorAction SilentlyContinue
+ Start-Sleep -Milliseconds 500
+ $qml = @('t_ms,value') + (Get-Content $log | Select-Object -Skip $before | ForEach-Object {
+ if ($_ -match "motion-probe,$name,(.*)$") { $Matches[1] } })
+ $qml | Set-Content -Encoding utf8 (Join-Path $Out "qml-$name.csv")
+
+ $a = @(Read-Curve $design); $b = @(Read-Curve $qml)
+ $all = @($a.v) + @($b.v)
+ if ($all.Count -lt 2) { "$name no data (design $($a.Count), qml $($b.Count))"; continue }
+ $lo = ($all | Measure-Object -Minimum).Minimum; $hi = ($all | Measure-Object -Maximum).Maximum
+ if ($hi - $lo -lt 1e-6) { $hi = $lo + 1 }
+ $W = 900; $H = 420; $pad = 50
+ $bmp = New-Object Drawing.Bitmap $W, $H; $g = [Drawing.Graphics]::FromImage($bmp)
+ $g.SmoothingMode = 'AntiAlias'; $g.Clear([Drawing.Color]::FromArgb(24, 24, 28))
+ $font = New-Object Drawing.Font('Microsoft YaHei', 11)
+ $px = { param($t) $pad + ($W - 2 * $pad) * $t / 1000 }
+ $py = { param($v) $H - $pad - ($H - 2 * $pad) * ($v - $lo) / ($hi - $lo) }
+ $grid = New-Object Drawing.Pen ([Drawing.Color]::FromArgb(60, 60, 70))
+ foreach ($t in 0, 200, 400, 600, 800, 1000) { $x = & $px $t; $g.DrawLine($grid, $x, $pad, $x, $H - $pad); $g.DrawString("$t", $font, [Drawing.Brushes]::Gray, $x - 12, $H - $pad + 6) }
+ foreach ($curve in @(@{ d = $a; c = [Drawing.Color]::FromArgb(110, 168, 254) }, @{ d = $b; c = [Drawing.Color]::FromArgb(255, 140, 50) })) {
+ $pen = New-Object Drawing.Pen ($curve.c, 2)
+ for ($i = 1; $i -lt $curve.d.Count; $i++) {
+ $g.DrawLine($pen, (& $px $curve.d[$i - 1].t), (& $py $curve.d[$i - 1].v), (& $px $curve.d[$i].t), (& $py $curve.d[$i].v))
+ }
+ }
+ $dMax = ($a.v | Measure-Object -Maximum).Maximum; $qMax = ($b.v | Measure-Object -Maximum).Maximum
+ $g.DrawString("$name 蓝=设计稿 (峰值 $([math]::Round($dMax,2))) 橙=QML (峰值 $([math]::Round($qMax,2))) 横轴 ms", $font, [Drawing.Brushes]::White, $pad, 14)
+ $png = Join-Path $Out "chart-$name.png"; $bmp.Save($png, [Drawing.Imaging.ImageFormat]::Png); $g.Dispose(); $bmp.Dispose()
+ "$name design $($a.Count) samples peak $dMax qml $($b.Count) samples peak $qMax -> $png"
+}