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++

feat(ui-mig): G2.2 page switch sink/rise from core.js app.go

Veyra Goal Agent647c4641d517
diff --git a/docs/UI_FULL_GOAL_PLAN_2026-09-26.md b/docs/UI_FULL_GOAL_PLAN_2026-09-26.md
index 26950d67..4d7f38ce 100644
--- a/docs/UI_FULL_GOAL_PLAN_2026-09-26.md
+++ b/docs/UI_FULL_GOAL_PLAN_2026-09-26.md
@@ -11,7 +11,7 @@
|---|---|---|---|
| G0 工具与基线 | 完成 | checkpoint/ui-mig-g0.7 | 设计参考 `design-ref/`、对比 `compare/`、动效曲线 `goal/g0.5/`、缓动测试 `veyra_qml_easing_tests`(构建目录 `build/qt-probe-20260926`)、门槛基线 `goal/g0.7/`(B 阶段性能对比用 `goal/g0.7/perf`) |
| G1 基础(缓动/背景/字体/图标/组件动效) | 完成 | checkpoint/ui-mig-g1.6 | G1.1–G1.6 完成(Qt 6.8.3:BezierSpline ≤10 段;CurveRenderer 不能用 fillItem;可变字体 600 须设 wght 轴;Popup 无 transform;视频子窗用 videoCover 挖区);动效探针 dock/page/switch/seg/menu/dialog;Quick Test 8/8;M28/M29 曲线未执行;下一步 G2 |
-| G2 外壳 | 进行中 | checkpoint/ui-mig-g2.1 | G2.1 dock 热区(视频子窗 HTTRANSPARENT、dock 挖区、450ms 收起,hover-shot.ps1 真实光标证据);下一步 G2.2 页面切换 |
+| G2 外壳 | 进行中 | checkpoint/ui-mig-g2.2 | G2.1 dock 热区;G2.2 页面切换 sink(.22s)/150ms 后 rise(.6s spring-soft, d×45ms),motion 探针与设计稿同曲线;下一步 G2.3 视频几何同步 |
| G3 四主屏 | 未开始 | | |
| B1 小项 + 桥接补齐 | 未开始 | | |
| B2 导出补齐(S2.5) | 未开始 | | |
diff --git a/docs/WORKLOG.md b/docs/WORKLOG.md
index 2ce5d213..5107a27f 100644
--- a/docs/WORKLOG.md
+++ b/docs/WORKLOG.md
@@ -6648,3 +6648,10 @@ release. 5090 live acceptance, 15-second hitch and user flicker remain unresolve
- 新脚本 `tools/qt_probe/hover-shot.ps1`:带片源启动、置顶、真实移动光标、逐步 PrintWindow。
- 实测(visible-scene.mp4,极简页):中部无 dock → 顶边 4px 弹出 → 悬停专业模式出提示 → 移开 200ms 仍在 → 900ms 已收起(strip.png)。
- 未执行:固定模式在播放中的截图(x-tip 已覆盖无片源情形)。
+- G2.2 页面切换动效(`checkpoint/ui-mig-g2.2`,证据 `goal/g2.2/`):
+ - 对齐 core.js app.go:旧页 sink(.22s --out,opacity→0、scale .985),150ms 后新页显示,其 [data-in] 元素 rise(.6s --spring-soft,from opacity 0 / translateY 16 / scale .98,延迟 d×45ms,fill both)。减弱动效或首屏直接显示。
+ - 新组件 `VPage.qml`(页根:shownPage/leavingPage 控制可见与 sink)、`VRise.qml`(对目标挂独立 Scale/Translate,不动元素自身 y/scale/hover);StackLayout 换为按 pageId 切换。各页 d 值照 pages-a.js / pages-pro.js 等;极简页设计稿无 [data-in],不加。
+ - 视频矩形在新页显示时(showPage)才移动一次,不在点击时跳。
+ - 探针 `motion.ps1 -Step g2.2 -Probes page`:QML 与设计稿均为峰值 16,34ms 起 16→0、约 175ms 到 0 并小幅回弹(chart-page.png;g0.5 基线 QML 恒 0)。首次跑出恒 0:shownPage 初值 "" 使首次切换走无动画分支,改初值 "home" 后修正。
+ - 实机点击(hover-shot.ps1 新增 click 步骤,visible-scene.mp4 从极简页点专业模式):t80 旧页仍在、t300/t1200 专业页就位;日志仅一次 `video host geometry 852x524` 与一次 `present-sink: resized`,无重新打开片源(switch/strip.png)。
+ - 未执行:原生视频窗随页面淡出(技术上不可淡,设计为切换完成后一次移动);逐帧 sink 曲线探针(仅测 rise)。
diff --git a/qml/Veyra/ExportPage.qml b/qml/Veyra/ExportPage.qml
index 40cc11d0..1eb526fd 100644
--- a/qml/Veyra/ExportPage.qml
+++ b/qml/Veyra/ExportPage.qml
@@ -13,7 +13,7 @@ import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
-Item {
+VPage {
id: root
signal requestPage(string page)
@@ -39,6 +39,7 @@ Item {
// --- left column: what is being exported ------------------------------
Rectangle {
+ id: queueCard
anchors.left: parent.left
anchors.leftMargin: 14
anchors.top: head.bottom
@@ -329,4 +330,11 @@ Item {
VTag { text: "片段裁剪尚未实现" }
}
}
+
+ // [data-in] entrance order from pages-b.js PAGES.exp.
+ VRise { target: head; d: 0 }
+ VRise { target: queueCard; d: 1 }
+ VRise { target: vwrap; d: 2 }
+ VRise { target: trimCard; d: 3 }
+ VRise { target: rightCol; d: 2 }
}
diff --git a/qml/Veyra/HomePage.qml b/qml/Veyra/HomePage.qml
index 2fafd5bf..fb9e3f42 100644
--- a/qml/Veyra/HomePage.qml
+++ b/qml/Veyra/HomePage.qml
@@ -7,7 +7,7 @@ import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
-Item {
+VPage {
id: root
signal requestPage(string page)
@@ -17,6 +17,7 @@ Item {
// .home .mark: 128px wide, with a slow "breathe" glow.
Image {
+ id: mark
Layout.alignment: Qt.AlignHCenter
source: "logo.png"
sourceSize.width: 128
@@ -32,6 +33,7 @@ Item {
// .hello: .h1 plus a muted line.
ColumnLayout {
+ id: hello
Layout.alignment: Qt.AlignHCenter
spacing: 6
Text {
@@ -63,7 +65,10 @@ Item {
{ glyph: "monitor", title: "屏幕捕获", sub: "窗口或显示器", act: "screen" }
]
delegate: Rectangle {
+ id: srcCard
required property var modelData
+ required property int index
+ VRise { page: root; target: srcCard; d: 2 + srcCard.index }
// .srccard: 164x124, radius 14, content pinned top and bottom.
implicitWidth: 164
implicitHeight: 124
@@ -130,6 +135,7 @@ Item {
// capture session was actually used before. Nothing invented: the text is
// the recorded session, and the row is absent when there is none.
Rectangle {
+ id: resume
Layout.alignment: Qt.AlignHCenter
visible: veyra.hasCaptureSession
implicitWidth: 692
@@ -181,6 +187,7 @@ Item {
// .recent: a row of chips, present only when there are recent files.
RowLayout {
+ id: recent
Layout.alignment: Qt.AlignHCenter
visible: veyra.recentFiles.length > 0
spacing: 8
@@ -215,4 +222,10 @@ Item {
}
}
}
+
+ // [data-in] entrance order from pages-a.js (the source cards rise from their delegate, --d 2-5).
+ VRise { target: mark; d: 0 }
+ VRise { target: hello; d: 1 }
+ VRise { target: resume; d: 6 }
+ VRise { target: recent; d: 7 }
}
diff --git a/qml/Veyra/Main.qml b/qml/Veyra/Main.qml
index 73a77020..49b7b862 100644
--- a/qml/Veyra/Main.qml
+++ b/qml/Veyra/Main.qml
@@ -69,10 +69,35 @@ Window {
if (veyra.currentPage !== page) veyra.currentPage = page
if (cinema) height = Math.round(pictureHeight + barBelow)
else if (height < 600) height = 800
+ // core.js app.go: the old page sinks (.22s) and the new one shows 150 ms
+ // later with its [data-in] items rising. Reduced motion shows it at once.
+ const prev = shownPage
+ if (prev === page) return
+ leavingPage = Theme.reduced || prev === "" ? "" : prev
+ if (leavingPage !== "") { leaveAnim.restart(); showTimer.restart() }
+ else showPage(false)
+ }
+ // The page on screen (entering or settled) and the one sinking out.
+ property string shownPage: "home"
+ property string leavingPage: ""
+ function showPage(animated) {
+ shownPage = page
+ if (animated)
+ for (const p of pages.children) if (p.pageId === page) p.enter()
// The video rect follows the page, and it must be settled before the
- // engine opens anything: it samples the window's client size once.
+ // engine opens anything: it samples the window's client size once. It moves
+ // here, once, not at the click: the native window cannot fade with the pages.
videoHost.syncRect()
}
+ Timer { id: showTimer; interval: 150; onTriggered: root.showPage(true) }
+ // @keyframes sink { to { opacity: 0; transform: scale(.985) } }, .22s --out.
+ property real leaveT: 0
+ NumberAnimation {
+ id: leaveAnim
+ target: root; property: "leaveT"; from: 0; to: 1
+ duration: 220; easing.bezierCurve: Theme.easeOut
+ onFinished: root.leavingPage = ""
+ }
// Background: pure black in cinema mode (the picture is the window), the
// three-stop gradient otherwise - the prototype's .vy / .vy.cine split.
@@ -127,33 +152,26 @@ Window {
// Pages live for the whole session so switching never loses a half-edited
// chain; only the visible page owns the video window.
- StackLayout {
+ Item {
id: pages
anchors.fill: parent
- currentIndex: {
- switch (root.page) {
- case "min": return 1
- case "pro": return 2
- case "node": return 3
- case "exp": return 4
- case "set": return 5
- default: return 0
- }
- }
-
- HomePage { onRequestPage: p => root.page = p }
+ // Each page is shown while current or while sinking out; the sinking one
+ // takes no input (.page.leave { pointer-events: none }).
+ HomePage { pageId: "home"; onRequestPage: p => root.page = p }
MinimalPage {
+ pageId: "min"
onRequestPage: p => root.page = p
onRequestAspect: aspect => { if (root.testAspect <= 0) root.fitToFilm(aspect) }
}
ProPage {
id: proPage
+ pageId: "pro"
onRequestPage: p => root.page = p
onRequestDialog: key => dialogs.open(key)
}
- NodePage { onRequestPage: p => root.page = p }
- ExportPage { onRequestPage: p => root.page = p }
- SettingsPage { onRequestPage: p => root.page = p }
+ NodePage { pageId: "node"; onRequestPage: p => root.page = p }
+ ExportPage { pageId: "exp"; onRequestPage: p => root.page = p }
+ SettingsPage { pageId: "set"; onRequestPage: p => root.page = p }
}
// The five dialogs sit above the pages and below the dock's own tooltips.
@@ -264,7 +282,7 @@ Window {
onTriggered: {
const name = root.test.motionProbe
if (name === "dock") dock.opened = true
- else if (name === "page") root.page = "pro"
+ else if (name === "page") { root.page = "pro"; probe.t0 = Date.now() + 150; probe.running = true; return }
else if (name === "switch") probeSwitch.item.checked = true
else if (name === "menu") proPage.openTestMenu("source")
else if (name === "dialog") dialogs.open("capture")
@@ -284,7 +302,7 @@ Window {
const name = root.test.motionProbe
let v
if (name === "dock") v = dock.barY
- else if (name === "page") v = proPage.opacity + "," + proPage.y
+ else if (name === "page") { if (ms < 0) return; v = proPage.probeRise.target.opacity.toFixed(4) + "," + proPage.probeRise.ty.toFixed(3) }
else if (name === "menu") v = proPage.testMenuScale.toFixed(4)
else if (name === "dialog") v = dialogs.motionScale.toFixed(4)
else if (name === "seg") v = ((probeSeg.item.indicatorX - x0) / (x1 - x0)).toFixed(4)
diff --git a/qml/Veyra/MinimalPage.qml b/qml/Veyra/MinimalPage.qml
index db50482e..fde3b46a 100644
--- a/qml/Veyra/MinimalPage.qml
+++ b/qml/Veyra/MinimalPage.qml
@@ -11,7 +11,7 @@ import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
-Item {
+VPage {
id: root
signal requestPage(string page)
diff --git a/qml/Veyra/NodePage.qml b/qml/Veyra/NodePage.qml
index b22a8240..9c819d79 100644
--- a/qml/Veyra/NodePage.qml
+++ b/qml/Veyra/NodePage.qml
@@ -13,7 +13,7 @@ import QtQuick.Controls
import QtQuick.Layouts
import QtQuick.Shapes
-Item {
+VPage {
id: root
signal requestPage(string page)
@@ -33,6 +33,7 @@ Item {
// --- video card (fixed 330px) --------------------------------------
Rectangle {
+ id: nvTop
Layout.fillWidth: true
Layout.preferredHeight: 330
radius: Theme.rCard
@@ -142,6 +143,7 @@ Item {
// --- canvas --------------------------------------------------------
Rectangle {
+ id: canvasCard
Layout.fillWidth: true
Layout.fillHeight: true
radius: Theme.rCard
@@ -417,4 +419,8 @@ Item {
items: veyra.effectCatalog.map(e => ({ label: e.label, id: e.id, tag: e.experimental ? "实验" : "", tagKind: e.experimental ? "warn" : "" }))
onPicked: (i, o) => veyra.addEffect(o.id)
}
+
+ // [data-in] entrance order from pages-node.js.
+ VRise { target: nvTop; d: 0 }
+ VRise { target: canvasCard; d: 1 }
}
diff --git a/qml/Veyra/ProPage.qml b/qml/Veyra/ProPage.qml
index b1796e9d..4b5d27ed 100644
--- a/qml/Veyra/ProPage.qml
+++ b/qml/Veyra/ProPage.qml
@@ -13,7 +13,7 @@ import QtQuick.Controls
import QtQuick.Layouts
import QtQuick.Shapes
-Item {
+VPage {
id: root
signal requestPage(string page)
signal requestDialog(string key)
@@ -162,6 +162,7 @@ Item {
// Card 1: signal chain. Reported values only.
Rectangle {
+ id: meter1
Layout.fillWidth: true
Layout.fillHeight: true
Layout.preferredWidth: 1.05
@@ -218,6 +219,7 @@ Item {
// Card 2: per-stage GPU cost. Only stages the engine actually timed are
// listed; a stage with no measurement is drawn as unmeasured.
Rectangle {
+ id: meter2
Layout.fillWidth: true
Layout.fillHeight: true
Layout.preferredWidth: 1.5
@@ -285,6 +287,7 @@ Item {
// Card 3: frame rate and cadence.
Rectangle {
+ id: meter3
Layout.fillWidth: true
Layout.fillHeight: true
Layout.preferredWidth: 1.15
@@ -963,4 +966,13 @@ Item {
}
onAccepted: root.requestPage("node")
}
+
+ // [data-in] entrance order from pages-pro.js.
+ VRise { id: headRise; target: head; d: 0 }
+ readonly property alias probeRise: headRise
+ VRise { target: vwrap; d: 1 }
+ VRise { target: meter1; d: 2 }
+ VRise { target: meter2; d: 3 }
+ VRise { target: meter3; d: 4 }
+ VRise { target: insp; d: 2 }
}
diff --git a/qml/Veyra/SettingsPage.qml b/qml/Veyra/SettingsPage.qml
index b2dfbc68..ccfd8f8a 100644
--- a/qml/Veyra/SettingsPage.qml
+++ b/qml/Veyra/SettingsPage.qml
@@ -10,7 +10,7 @@ import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
-Item {
+VPage {
id: root
signal requestPage(string page)
@@ -27,6 +27,7 @@ Item {
// --- nav ---------------------------------------------------------------
Rectangle {
+ id: navCard
anchors.left: parent.left
anchors.leftMargin: 14
anchors.top: parent.top
@@ -75,6 +76,7 @@ Item {
// --- body --------------------------------------------------------------
Rectangle {
+ id: bodyCard
anchors.left: parent.left
anchors.leftMargin: 14 + 220 + 10
anchors.right: parent.right
@@ -361,4 +363,8 @@ Item {
}
}
}
+
+ // [data-in] entrance order from pages-b.js PAGES.set.
+ VRise { target: navCard; d: 0 }
+ VRise { target: bodyCard; d: 1 }
}
diff --git a/qml/Veyra/VPage.qml b/qml/Veyra/VPage.qml
new file mode 100644
index 00000000..1bbfb4cd
--- /dev/null
+++ b/qml/Veyra/VPage.qml
@@ -0,0 +1,21 @@
+// A page of the shell (app.css .page): shown while current or while sinking out.
+// Main.qml owns the switch (core.js app.go); this only reads its state. The sink
+// is @keyframes sink { to { opacity: 0; transform: scale(.985) } } over .22s --out,
+// and the sinking page takes no input (.page.leave { pointer-events: none }).
+// enter() is emitted when the page shows through an animated switch; the VRise
+// items declared directly in the page play on it.
+import QtQuick
+
+Item {
+ id: page
+ property string pageId
+ signal enter()
+ readonly property var shell: Window.window
+ readonly property bool current: shell !== null && shell.shownPage === pageId
+ readonly property bool leaving: shell !== null && shell.leavingPage === pageId
+ anchors.fill: parent
+ visible: current || leaving
+ enabled: current
+ opacity: leaving ? 1 - shell.leaveT : 1
+ scale: leaving ? 1 - 0.015 * shell.leaveT : 1
+}
diff --git a/qml/Veyra/VRise.qml b/qml/Veyra/VRise.qml
new file mode 100644
index 00000000..73c29dbd
--- /dev/null
+++ b/qml/Veyra/VRise.qml
@@ -0,0 +1,53 @@
+// The design's [data-in] entrance (app.css .page.enter [data-in]):
+// animation: rise .6s var(--spring-soft) both; animation-delay: calc(var(--d) * 45ms)
+// @keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.98) } }
+// Declared in a VPage: `VRise { target: head; d: 1 }`, or inside a delegate with
+// `page:` set. It plays on the page's enter(), which only an animated switch emits
+// (core.js app.go(id, instant): not on the first show).
+// "both": the item holds the from-state through its delay. The transforms are the
+// VRise's own, so the item's own y, scale and hover motion are left alone.
+import QtQuick
+
+Item {
+ id: rise
+ required property Item target
+ property int d: 0
+ property Item page: parent
+ visible: false
+ Connections { target: rise.page; function onEnter() { rise.play() } }
+
+ // The item's resting opacity, captured once: some items rest below 1.
+ property real rest: 1
+ Component.onCompleted: {
+ rest = target.opacity
+ target.transform = [sc, tr]
+ }
+
+ Scale {
+ id: sc
+ origin.x: rise.target.width / 2
+ origin.y: rise.target.height / 2
+ xScale: 1
+ yScale: 1
+ }
+ Translate { id: tr }
+
+ // For the motion probe.
+ readonly property real ty: tr.y
+
+ function play() {
+ anim.stop()
+ if (Theme.reduced) { target.opacity = rest; tr.y = 0; sc.xScale = sc.yScale = 1; return }
+ target.opacity = 0; tr.y = 16; sc.xScale = sc.yScale = 0.98
+ anim.start()
+ }
+ SequentialAnimation {
+ id: anim
+ PauseAnimation { duration: rise.d * 45 }
+ ParallelAnimation {
+ NumberAnimation { target: rise.target; property: "opacity"; to: rise.rest; duration: 600; easing.bezierCurve: Theme.springSoft }
+ NumberAnimation { target: tr; property: "y"; to: 0; duration: 600; easing.bezierCurve: Theme.springSoft }
+ NumberAnimation { target: sc; properties: "xScale,yScale"; to: 1; duration: 600; easing.bezierCurve: Theme.springSoft }
+ }
+ }
+}
diff --git a/qml/Veyra/qmldir b/qml/Veyra/qmldir
index a5d7d142..bb8f8988 100644
--- a/qml/Veyra/qmldir
+++ b/qml/Veyra/qmldir
@@ -22,3 +22,5 @@ VSwitch 1.0 VSwitch.qml
VTag 1.0 VTag.qml
Main 1.0 Main.qml
VMenu 1.0 VMenu.qml
+VPage 1.0 VPage.qml
+VRise 1.0 VRise.qml
diff --git a/tools/qt_probe/hover-shot.ps1 b/tools/qt_probe/hover-shot.ps1
index 68534414..ed378668 100644
--- a/tools/qt_probe/hover-shot.ps1
+++ b/tools/qt_probe/hover-shot.ps1
@@ -8,7 +8,7 @@ param(
[string]$Clip = '',
[string]$Out = 'E:\项目\Veyra\logs\ui-qml-migration-20260925\hover',
[string]$Extra = '',
- # "x,y,name[,waitMs]" per step, steps separated by ';', window-relative pixels. One
+ # "x,y,name[,waitMs[,click]]" per step (click: a left click at the point), steps separated by ';', window-relative pixels. One
# string: powershell -File does not split an array argument.
[string]$Steps = '640,4,top',
[int]$WaitSeconds = 8
@@ -23,6 +23,7 @@ public class HW {
[DllImport("user32.dll")] public static extern bool GetWindowRect(IntPtr h, out RECT r);
[DllImport("user32.dll")] public static extern bool PrintWindow(IntPtr h, IntPtr dc, uint flags);
[DllImport("user32.dll")] public static extern bool SetCursorPos(int x, int y);
+ [DllImport("user32.dll")] public static extern void mouse_event(uint f, int x, int y, int d, IntPtr e);
[DllImport("user32.dll")] public static extern bool SetWindowPos(IntPtr h, IntPtr after, int x, int y, int cx, int cy, uint f);
[DllImport("user32.dll")] public static extern bool SetForegroundWindow(IntPtr h);
delegate bool EnumProc(IntPtr h, IntPtr p);
@@ -55,10 +56,11 @@ if ($h -eq [IntPtr]::Zero) { "no window"; Stop-Process -Id $p.Id -Force; exit 1
[HW]::SetForegroundWindow($h) | Out-Null
$r = New-Object HW+RECT
foreach ($s in ($Steps -split ';')) {
- $x, $y, $name, $ms = $s -split ','
+ $x, $y, $name, $ms, $click = $s -split ','
if (-not $ms) { $ms = 900 }
[HW]::GetWindowRect($h, [ref]$r) | Out-Null
[HW]::SetCursorPos($r.Left + [int]$x, $r.Top + [int]$y) | Out-Null
+ if ($click -eq 'click') { Start-Sleep -Milliseconds 150; [HW]::mouse_event(2, 0, 0, 0, [IntPtr]::Zero); [HW]::mouse_event(4, 0, 0, 0, [IntPtr]::Zero) }
Start-Sleep -Milliseconds ([int]$ms)
[HW]::GetWindowRect($h, [ref]$r) | Out-Null
$w = $r.Right - $r.Left; $ht = $r.Bottom - $r.Top