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.3 test switches for page, tab, dialog, aspect, dock, size and motion

Veyra Goal Agent0c9f3615d08d
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 85cb7674..a748457e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -771,7 +771,8 @@ if(VEYRA_BUILD_QML_UI AND Qt6_FOUND)
COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_CURRENT_SOURCE_DIR}/qml $<TARGET_FILE_DIR:veyra_qml_ui>/qml)
target_compile_features(veyra_qml_ui PRIVATE cxx_std_20)
- target_link_libraries(veyra_qml_ui PRIVATE veyra_qml_bridge veyra_engine)
+ # Qt6::CorePrivate only for QUnifiedTimer's slow mode behind --slow-animations.
+ target_link_libraries(veyra_qml_ui PRIVATE veyra_qml_bridge veyra_engine Qt6::CorePrivate)
endif()
# Qt + D3D12 host probe (S3.0): answers whether Qt can host the native video
diff --git a/apps/veyra-qml/main.cpp b/apps/veyra-qml/main.cpp
index 67f8b84e..0360967c 100644
--- a/apps/veyra-qml/main.cpp
+++ b/apps/veyra-qml/main.cpp
@@ -16,6 +16,8 @@
#include <QQuickItem>
#include <QQuickWindow>
#include <QTimer>
+#include <QVariantMap>
+#include <QtCore/private/qabstractanimation_p.h>
#include <QDebug>
#include <windows.h>
@@ -131,15 +133,59 @@ int main(int argc, char** argv) {
[] { QCoreApplication::exit(1); }, Qt::QueuedConnection);
// Options are parsed rather than positional: `--page <id>` selects the screen
// a test wants to capture, and any other non-flag argument is a file to open.
+ //
+ // The rest are test switches (G0.3). They put the app into the exact state a
+ // design frame shows, so a screenshot of each can be compared with its design
+ // reference without anyone clicking. They go to QML as `vyTest`, never to the
+ // bridge's saved settings: a test run must not rewrite the user's preferences.
+ // --tab <quality|fg|color|audio|display> professional-page tab
+ // --dialog <capture|ps5|screen|subtitle|audio|save|manage|tonode>
+ // --aspect <ratio> cinema aspect, overriding the source's own
+ // --dock-pinned dock open and held open
+ // --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)
const QStringList args = QCoreApplication::arguments();
QString openPath;
+ QVariantMap testOptions;
+ QSize testSize;
for (int i = 1; i < args.size(); ++i) {
- if (args.at(i) == QLatin1String("--page") && i + 1 < args.size()) {
+ const QString& a = args.at(i);
+ const bool hasValue = i + 1 < args.size();
+ if (a == QLatin1String("--page") && hasValue) {
bridge.setInitialPage(args.at(++i));
- } else if (!args.at(i).startsWith(QLatin1Char('-'))) {
- openPath = args.at(i);
+ } else if (a == QLatin1String("--tab") && hasValue) {
+ testOptions.insert(QStringLiteral("tab"), args.at(++i));
+ } else if (a == QLatin1String("--dialog") && hasValue) {
+ testOptions.insert(QStringLiteral("dialog"), args.at(++i));
+ } else if (a == QLatin1String("--aspect") && hasValue) {
+ testOptions.insert(QStringLiteral("aspect"), args.at(++i).toDouble());
+ } else if (a == QLatin1String("--dock-pinned")) {
+ testOptions.insert(QStringLiteral("dockPinned"), true);
+ } 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("--reduced-motion")) {
+ testOptions.insert(QStringLiteral("reducedMotion"), true);
+ } else if (a == QLatin1String("--slow-animations") && hasValue) {
+ // Qt's own slow mode, the same one its debugging tools use: every
+ // animation driven by the unified timer runs N times longer, so a
+ // timed screenshot lands on a known point of the curve.
+ const qreal factor = args.at(++i).toDouble();
+ if (factor > 1.0) {
+ QUnifiedTimer::instance()->setSlowModeEnabled(true);
+ QUnifiedTimer::instance()->setSlowdownFactor(factor);
+ testOptions.insert(QStringLiteral("slowAnimations"), factor);
+ }
+ } else if (!a.startsWith(QLatin1Char('-'))) {
+ openPath = a;
}
}
+ if (!testOptions.isEmpty() || testSize.isValid())
+ veyra::log::info("qml", std::format("test switches: {} size={}x{}",
+ QStringList(testOptions.keys()).join(',').toStdString(),
+ testSize.width(), testSize.height()));
+ engine.rootContext()->setContextProperty(QStringLiteral("vyTest"), testOptions);
if (!openPath.isEmpty()) {
QTimer::singleShot(600, &bridge, [&bridge, openPath] { bridge.openPath(openPath); });
}
@@ -156,6 +202,7 @@ int main(int argc, char** argv) {
veyra::log::error("qml", "root object is not a window");
return 1;
}
+ if (testSize.isValid()) window->resize(testSize);
// Reparent the native window under the QML window and keep it in step. The
// host item is looked up by objectName so the QML side owns the layout and
diff --git a/docs/UI_FULL_GOAL_PLAN_2026-09-26.md b/docs/UI_FULL_GOAL_PLAN_2026-09-26.md
index d4966325..16518a06 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 工具与基线 | 未开始 | | |
+| G0 工具与基线 | 进行中 | checkpoint/ui-mig-g0.3 | G0.2 设计参考在 `logs\ui-qml-migration-20260925\design-ref\`(shotpage 默认关过渡,`?motion=1` 保留动画);G0.3 测试开关逐项截图于 `goal\g0.3\`;下一步 G0.4 |
| G1 基础(缓动/背景/字体/图标/组件动效) | 未开始 | | |
| G2 外壳 | 未开始 | | |
| G3 四主屏 | 未开始 | | |
diff --git a/docs/UI_MIGRATION_EXECUTION_2026-09-25.md b/docs/UI_MIGRATION_EXECUTION_2026-09-25.md
index 68b18828..dcc1419a 100644
--- a/docs/UI_MIGRATION_EXECUTION_2026-09-25.md
+++ b/docs/UI_MIGRATION_EXECUTION_2026-09-25.md
@@ -37,6 +37,8 @@
| S4.8 | 影院模式黑边与控制条修复 | 完成 | `checkpoint/ui-mig-s4.8` | `6f62e5f`(G0.1 补行) |
| S4.9 | `VGroup` 行重叠修复(桌面端接手第一步) | 完成(截图已看) | `checkpoint/ui-mig-s4.9-vgroup` | 最小复现定位两处原因;导出页/设置页行已正常排布 |
| G | 目标模式全量计划 | 进行中 | `checkpoint/ui-mig-g-plan` | 见 [`UI_FULL_GOAL_PLAN_2026-09-26.md`](UI_FULL_GOAL_PLAN_2026-09-26.md) |
+| 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 截图需不带片源 |
## 发现并修复的 bug
diff --git a/docs/WORKLOG.md b/docs/WORKLOG.md
index 698c090b..5a039097 100644
--- a/docs/WORKLOG.md
+++ b/docs/WORKLOG.md
@@ -6524,3 +6524,17 @@ Artifacts remain under `E:/项目/Veyra/tests/5090-capture-fg-20260921/` and
Retained baseline executable/logs and one runnable fixed staging app; no ZIP,
portable duplication, runtime mutation, proprietary Git files, merge, push or
release. 5090 live acceptance, 15-second hitch and user flicker remain unresolved.
+
+## 2026-09-26 UI 迁移目标模式 G0.2–G0.3
+
+- G0.2:`tools/qt_probe/shoot-design.ps1` 用无头 Edge 渲染 17 张设计参考到
+ `E:\项目\Veyra\logs\ui-qml-migration-20260925\design-ref\`。用户指出截图重叠:对话框淡入被截在中途;
+ `shotpage.js` 默认 `app.setReduced(true)`,`?motion=1` 保留动画。重渲染后逐张看图无重叠。
+- G0.3:`veyra_qml_ui` 增加测试开关 `--page --tab --dialog --aspect --dock-pinned --size WxH
+ --reduced-motion --slow-animations N`(后者用 QUnifiedTimer 慢速模式,链接 Qt6::CorePrivate);
+ Theme 增加 `reduced` 与 `d(ms)`,全部 40 处时长改为 `Theme.d()`,无限动画在减少动画时停止。
+ `capture-window.ps1 -Extra` 改为单字符串(`-File` 模式数组会被当成一个参数传入,首次 `--tab` 因此无效)。
+ 构建 `scripts/build-qt-probe.ps1 -Targets veyra_qml_ui` exit 0;逐项截图于
+ `E:\项目\Veyra\logs\ui-qml-migration-20260925\goal\g0.3\` 并看图:tab-fg、dlg-capture、min-aspect、
+ node-size(1600x1150)、dock-pinned、slow-dialog(10 倍慢速截到对话框缩放中途)。
+ 引擎门槛未跑(本步只改 QML 前端与测试开关,未动引擎)。
diff --git a/qml/Veyra/ChainNodeCard.qml b/qml/Veyra/ChainNodeCard.qml
index 1dd1a365..c64f6def 100644
--- a/qml/Veyra/ChainNodeCard.qml
+++ b/qml/Veyra/ChainNodeCard.qml
@@ -22,8 +22,8 @@ Rectangle {
color: selected ? Theme.card3 : Theme.card2
border.width: 1
border.color: selected ? Theme.accent : Theme.stroke
- Behavior on color { ColorAnimation { duration: Theme.durFast } }
- Behavior on border.color { ColorAnimation { duration: Theme.durFast } }
+ Behavior on color { ColorAnimation { duration: Theme.d(Theme.durFast) } }
+ Behavior on border.color { ColorAnimation { duration: Theme.d(Theme.durFast) } }
RowLayout {
anchors.fill: parent
@@ -37,13 +37,13 @@ Rectangle {
width: 34; height: 20; radius: 10
Layout.alignment: Qt.AlignVCenter
color: card.node.enabled ? Theme.accent : Theme.card3
- Behavior on color { ColorAnimation { duration: Theme.durFast } }
+ Behavior on color { ColorAnimation { duration: Theme.d(Theme.durFast) } }
Rectangle {
width: 14; height: 14; radius: 7
color: card.node.enabled ? Theme.accentInk : Theme.t3
anchors.verticalCenter: parent.verticalCenter
x: card.node.enabled ? parent.width - width - 3 : 3
- Behavior on x { NumberAnimation { duration: Theme.durNormal; easing.bezierCurve: Theme.spring } }
+ Behavior on x { NumberAnimation { duration: Theme.d(Theme.durNormal); easing.bezierCurve: Theme.spring } }
}
HoverHandler { cursorShape: Qt.PointingHandCursor }
TapHandler { onTapped: card.toggleRequested(!card.node.enabled) }
diff --git a/qml/Veyra/DialogHost.qml b/qml/Veyra/DialogHost.qml
index ac2a6079..39706f42 100644
--- a/qml/Veyra/DialogHost.qml
+++ b/qml/Veyra/DialogHost.qml
@@ -57,7 +57,7 @@ Item {
border.color: Theme.stroke2
visible: host.dialog !== ""
scale: visible ? 1.0 : 0.9
- Behavior on scale { NumberAnimation { duration: 550; easing.bezierCurve: Theme.spring } }
+ Behavior on scale { NumberAnimation { duration: Theme.d(550); easing.bezierCurve: Theme.spring } }
ColumnLayout {
anchors.fill: parent
diff --git a/qml/Veyra/ExportPage.qml b/qml/Veyra/ExportPage.qml
index 9f147c89..40cc11d0 100644
--- a/qml/Veyra/ExportPage.qml
+++ b/qml/Veyra/ExportPage.qml
@@ -234,7 +234,7 @@ Item {
radius: 9
color: Theme.accent
width: parent.width * Math.max(0, Math.min(1, veyra.exportProgress))
- Behavior on width { NumberAnimation { duration: 300 } }
+ Behavior on width { NumberAnimation { duration: Theme.d(300) } }
}
}
// Counts come from the job's own snapshot, not a parallel counter.
diff --git a/qml/Veyra/HomePage.qml b/qml/Veyra/HomePage.qml
index 808e2fc0..29befe72 100644
--- a/qml/Veyra/HomePage.qml
+++ b/qml/Veyra/HomePage.qml
@@ -23,9 +23,10 @@ Item {
fillMode: Image.PreserveAspectFit
opacity: 0.9
SequentialAnimation on scale {
+ running: !Theme.reduced
loops: Animation.Infinite
- NumberAnimation { to: 1.02; duration: 2250; easing.type: Easing.InOutSine }
- NumberAnimation { to: 1.0; duration: 2250; easing.type: Easing.InOutSine }
+ NumberAnimation { to: 1.02; duration: Theme.d(2250); easing.type: Easing.InOutSine }
+ NumberAnimation { to: 1.0; duration: Theme.d(2250); easing.type: Easing.InOutSine }
}
}
@@ -72,9 +73,9 @@ Item {
border.color: cardHover.hovered ? Theme.stroke2 : Theme.stroke
// .srccard:hover { transform: translateY(-4px) }
y: cardHover.hovered ? -4 : 0
- Behavior on y { NumberAnimation { duration: 500; easing.bezierCurve: Theme.spring } }
+ Behavior on y { NumberAnimation { duration: Theme.d(500); easing.bezierCurve: Theme.spring } }
scale: cardTap.pressed ? 0.97 : 1.0
- Behavior on scale { NumberAnimation { duration: 500; easing.bezierCurve: Theme.spring } }
+ Behavior on scale { NumberAnimation { duration: Theme.d(500); easing.bezierCurve: Theme.spring } }
ColumnLayout {
anchors.fill: parent
diff --git a/qml/Veyra/Main.qml b/qml/Veyra/Main.qml
index 4596dbad..5ec86ee3 100644
--- a/qml/Veyra/Main.qml
+++ b/qml/Veyra/Main.qml
@@ -30,7 +30,11 @@ Window {
// Page ids match the prototype's PAGES keys so a design screenshot and an
// app screenshot can be compared under the same name.
property string page: "home"
+ // Test switches from the command line (main.cpp, G0.3); empty in normal use.
+ readonly property var test: typeof vyTest !== "undefined" ? vyTest : ({})
+ readonly property real testAspect: test.aspect !== undefined ? test.aspect : 0
readonly property bool cinema: page === "min"
+ Binding { target: Theme; property: "reduced"; value: veyra.reducedMotion || root.test.reducedMotion === true }
// Cinema geometry, straight from the prototype: the picture is width/aspect
// and the window is that plus the lower half of the control pill.
@@ -48,7 +52,7 @@ Window {
// .vy.cine transition: height .7s var(--spring-soft)
Behavior on height {
enabled: root.cinema
- NumberAnimation { duration: 700; easing.bezierCurve: Theme.springSoft }
+ NumberAnimation { duration: Theme.d(700); easing.bezierCurve: Theme.springSoft }
}
onWidthChanged: {
if (cinema) height = Math.round(pictureHeight + barBelow)
@@ -147,9 +151,10 @@ Window {
HomePage { onRequestPage: p => root.page = p }
MinimalPage {
onRequestPage: p => root.page = p
- onRequestAspect: aspect => root.fitToFilm(aspect)
+ onRequestAspect: aspect => { if (root.testAspect <= 0) root.fitToFilm(aspect) }
}
ProPage {
+ id: proPage
onRequestPage: p => root.page = p
onRequestDialog: key => dialogs.open(key)
}
@@ -178,6 +183,8 @@ Window {
id: dock
anchors.horizontalCenter: parent.horizontalCenter
currentPage: root.page
+ pinned: root.test.dockPinned === true
+ opened: pinned
onRequestPage: p => root.page = p
}
@@ -197,7 +204,7 @@ Window {
border.color: toast.isError ? Qt.rgba(1, 0.365, 0.365, 0.4) : Qt.rgba(0.239, 0.863, 0.518, 0.35)
opacity: 0
visible: opacity > 0.01
- Behavior on opacity { NumberAnimation { duration: Theme.durNormal } }
+ Behavior on opacity { NumberAnimation { duration: Theme.d(Theme.durNormal) } }
function show(m, bad) { toast.message = m; toast.isError = bad; toast.opacity = 1; toastTimer.restart() }
Timer { id: toastTimer; interval: 4200; onTriggered: toast.opacity = 0 }
Text {
@@ -232,6 +239,7 @@ Window {
Connections {
target: veyra
function onSnapshotChanged() {
+ if (root.testAspect > 0) return
if (veyra.sourceAspect > 0.2 && Math.abs(veyra.sourceAspect - root.filmAspect) > 0.02)
root.fitToFilm(veyra.sourceAspect)
}
@@ -241,6 +249,9 @@ Window {
// Open on the configured page: the user's saved preference, or the
// override a test passes on the command line.
if (veyra.initialPage.length > 0) root.page = veyra.initialPage
+ if (root.test.tab !== undefined) proPage.tab = root.test.tab
+ if (root.testAspect > 0) root.fitToFilm(root.testAspect)
+ if (root.test.dialog !== undefined) dialogs.open(root.test.dialog)
videoHost.syncRect()
}
}
diff --git a/qml/Veyra/MinimalPage.qml b/qml/Veyra/MinimalPage.qml
index 8a402000..c82b5237 100644
--- a/qml/Veyra/MinimalPage.qml
+++ b/qml/Veyra/MinimalPage.qml
@@ -65,8 +65,8 @@ Item {
opacity: 0
SequentialAnimation on opacity {
running: cineBar.visible
- PauseAnimation { duration: 120 }
- NumberAnimation { to: 1.0; duration: 800; easing.bezierCurve: Theme.spring }
+ PauseAnimation { duration: Theme.d(120) }
+ NumberAnimation { to: 1.0; duration: Theme.d(800); easing.bezierCurve: Theme.spring }
}
RowLayout {
@@ -143,7 +143,7 @@ Item {
font.pixelSize: 14
}
scale: cTap.pressed ? 0.86 : 1.0
- Behavior on scale { NumberAnimation { duration: 400; easing.bezierCurve: Theme.spring } }
+ Behavior on scale { NumberAnimation { duration: Theme.d(400); easing.bezierCurve: Theme.spring } }
HoverHandler { id: cHover; cursorShape: Qt.PointingHandCursor }
TapHandler { id: cTap; onTapped: cbtn.tapped() }
}
@@ -167,7 +167,7 @@ Item {
font.pixelSize: 14
}
scale: playTap.pressed ? 0.88 : (playHover.hovered ? 1.06 : 1.0)
- Behavior on scale { NumberAnimation { duration: 450; easing.bezierCurve: Theme.spring } }
+ Behavior on scale { NumberAnimation { duration: Theme.d(450); easing.bezierCurve: Theme.spring } }
HoverHandler { id: playHover; cursorShape: Qt.PointingHandCursor }
TapHandler { id: playTap; onTapped: veyra.togglePlayPause() }
}
@@ -196,7 +196,7 @@ Item {
height: seekHover.hovered ? 6 : 3
radius: 9
color: Qt.rgba(1, 1, 1, 0.14)
- Behavior on height { NumberAnimation { duration: 300; easing.bezierCurve: Theme.spring } }
+ Behavior on height { NumberAnimation { duration: Theme.d(300); easing.bezierCurve: Theme.spring } }
Rectangle {
width: parent.width * Math.max(0, Math.min(1, veyra.progress))
height: parent.height
diff --git a/qml/Veyra/NodePage.qml b/qml/Veyra/NodePage.qml
index c56a964a..cb4e0a04 100644
--- a/qml/Veyra/NodePage.qml
+++ b/qml/Veyra/NodePage.qml
@@ -292,7 +292,7 @@ Item {
color: "#1D1D22"
border.width: 1
border.color: root.selectedNode === node.index ? "#FFFFFF" : Qt.rgba(1, 1, 1, 0.1)
- Behavior on border.color { ColorAnimation { duration: 200 } }
+ Behavior on border.color { ColorAnimation { duration: Theme.d(200) } }
DragHandler {
id: drag
diff --git a/qml/Veyra/ProPage.qml b/qml/Veyra/ProPage.qml
index 6bca5072..dadc3943 100644
--- a/qml/Veyra/ProPage.qml
+++ b/qml/Veyra/ProPage.qml
@@ -385,7 +385,7 @@ Item {
radius: 9
color: root.tab === modelData.id ? Theme.card3
: tabHover.hovered ? Qt.rgba(1, 1, 1, 0.04) : "transparent"
- Behavior on color { ColorAnimation { duration: 200 } }
+ Behavior on color { ColorAnimation { duration: Theme.d(200) } }
Text {
anchors.centerIn: parent
text: modelData.label
diff --git a/qml/Veyra/SettingsPage.qml b/qml/Veyra/SettingsPage.qml
index b7f01734..b2dfbc68 100644
--- a/qml/Veyra/SettingsPage.qml
+++ b/qml/Veyra/SettingsPage.qml
@@ -54,7 +54,7 @@ Item {
radius: 9
color: root.section === modelData.id ? Theme.card3
: navHover.hovered ? Qt.rgba(1, 1, 1, 0.04) : "transparent"
- Behavior on color { ColorAnimation { duration: 200 } }
+ Behavior on color { ColorAnimation { duration: Theme.d(200) } }
Text {
anchors.left: parent.left
anchors.leftMargin: 10
diff --git a/qml/Veyra/Theme.qml b/qml/Veyra/Theme.qml
index 1cbb41c9..221e1076 100644
--- a/qml/Veyra/Theme.qml
+++ b/qml/Veyra/Theme.qml
@@ -52,6 +52,13 @@ QtObject {
// --- motion (--spring / --spring-soft / --out) ------------------------
// Four control points exactly: QEasingCurve.BezierSpline rejects any other
// count, and a rejected curve silently falls back to linear.
+ // Reduced motion (the design's .vy.reduced: every transition and animation at
+ // 0s). Main.qml binds it to the saved setting or the --reduced-motion switch;
+ // every duration in the app goes through d(), so one flag covers all of them.
+ // Endless animations also stop on it: a zero-length loop would spin.
+ property bool reduced: false
+ function d(ms) { return reduced ? 0 : ms }
+
readonly property int durFast: 150
readonly property int durNormal: 240
readonly property int durSlow: 450
diff --git a/qml/Veyra/TopDock.qml b/qml/Veyra/TopDock.qml
index 1e4e8f21..b75a684c 100644
--- a/qml/Veyra/TopDock.qml
+++ b/qml/Veyra/TopDock.qml
@@ -52,8 +52,8 @@ Item {
radius: 4
color: Qt.rgba(1, 1, 1, 0.28)
opacity: dockRoot.opened ? 0 : 1
- Behavior on width { NumberAnimation { duration: 400; easing.bezierCurve: Theme.spring } }
- Behavior on opacity { NumberAnimation { duration: 200 } }
+ Behavior on width { NumberAnimation { duration: Theme.d(400); easing.bezierCurve: Theme.spring } }
+ Behavior on opacity { NumberAnimation { duration: Theme.d(200) } }
HoverHandler { onHoveredChanged: if (hovered) dockRoot.opened = true }
}
@@ -79,7 +79,7 @@ Item {
border.color: Qt.rgba(1, 1, 1, 0.1)
// .dock { transform: translate(-50%,-120%); transition: transform .55s spring }
Behavior on anchors.topMargin {
- NumberAnimation { duration: 550; easing.bezierCurve: Theme.spring }
+ NumberAnimation { duration: Theme.d(550); easing.bezierCurve: Theme.spring }
}
HoverHandler {
@@ -137,7 +137,7 @@ Item {
}
visible: dockRoot.currentPage !== "home"
// .dock-ind { transition: transform .55s var(--spring) }
- Behavior on x { NumberAnimation { duration: 550; easing.bezierCurve: Theme.spring } }
+ Behavior on x { NumberAnimation { duration: Theme.d(550); easing.bezierCurve: Theme.spring } }
}
Row {
id: itemsRow
@@ -153,7 +153,7 @@ Item {
text: modelData.icon
font.pixelSize: 15
opacity: dockRoot.currentPage === modelData.id ? 1.0 : 0.45
- Behavior on opacity { NumberAnimation { duration: 200 } }
+ Behavior on opacity { NumberAnimation { duration: Theme.d(200) } }
}
HoverHandler { cursorShape: Qt.PointingHandCursor }
TapHandler { onTapped: dockRoot.requestPage(modelData.id) }
diff --git a/qml/Veyra/VAccordion.qml b/qml/Veyra/VAccordion.qml
index 85ad3015..4e7962d0 100644
--- a/qml/Veyra/VAccordion.qml
+++ b/qml/Veyra/VAccordion.qml
@@ -34,7 +34,7 @@ Rectangle {
color: Theme.card2
border.width: 1
border.color: open ? Theme.stroke2 : Theme.stroke
- Behavior on implicitHeight { NumberAnimation { duration: 500; easing.bezierCurve: Theme.springSoft } }
+ Behavior on implicitHeight { NumberAnimation { duration: Theme.d(500); easing.bezierCurve: Theme.springSoft } }
clip: true
ColumnLayout {
@@ -103,7 +103,7 @@ Rectangle {
color: Theme.t3
font.pixelSize: 16
rotation: acc.open ? 90 : 0
- Behavior on rotation { NumberAnimation { duration: 450; easing.bezierCurve: Theme.spring } }
+ Behavior on rotation { NumberAnimation { duration: Theme.d(450); easing.bezierCurve: Theme.spring } }
}
}
@@ -143,6 +143,6 @@ Rectangle {
height: acc.open ? 1 : 0
color: Theme.stroke
opacity: acc.open ? 1 : 0
- Behavior on opacity { NumberAnimation { duration: 200 } }
+ Behavior on opacity { NumberAnimation { duration: Theme.d(200) } }
}
}
diff --git a/qml/Veyra/VButton.qml b/qml/Veyra/VButton.qml
index eb250370..5c9e2641 100644
--- a/qml/Veyra/VButton.qml
+++ b/qml/Veyra/VButton.qml
@@ -18,10 +18,10 @@ Rectangle {
: (hover.hovered ? Theme.card3 : Theme.card2)
border.width: (primary || ghost) ? 0 : 1
border.color: hover.hovered ? Qt.rgba(1, 1, 1, 0.2) : Theme.stroke2
- Behavior on color { ColorAnimation { duration: Theme.durFast } }
+ Behavior on color { ColorAnimation { duration: Theme.d(Theme.durFast) } }
// .btn:active { transform: scale(.95) }
scale: tap.pressed ? 0.95 : 1.0
- Behavior on scale { NumberAnimation { duration: 400; easing.bezierCurve: Theme.spring } }
+ Behavior on scale { NumberAnimation { duration: Theme.d(400); easing.bezierCurve: Theme.spring } }
Text {
id: label
diff --git a/qml/Veyra/VDot.qml b/qml/Veyra/VDot.qml
index 99dab8e5..52937ea6 100644
--- a/qml/Veyra/VDot.qml
+++ b/qml/Veyra/VDot.qml
@@ -17,9 +17,9 @@ Rectangle {
}
// .dot.warn { animation: pulse 1.2s infinite }
SequentialAnimation on opacity {
- running: warn
+ running: warn && !Theme.reduced
loops: Animation.Infinite
- NumberAnimation { to: 0.35; duration: 600 }
- NumberAnimation { to: 1.0; duration: 600 }
+ NumberAnimation { to: 0.35; duration: Theme.d(600) }
+ NumberAnimation { to: 1.0; duration: Theme.d(600) }
}
}
diff --git a/qml/Veyra/VPill.qml b/qml/Veyra/VPill.qml
index 50ea3875..cc0b739d 100644
--- a/qml/Veyra/VPill.qml
+++ b/qml/Veyra/VPill.qml
@@ -13,7 +13,7 @@ Rectangle {
border.width: 1
border.color: Theme.stroke2
scale: tap.pressed ? 0.95 : 1.0
- Behavior on scale { NumberAnimation { duration: 400; easing.bezierCurve: Theme.spring } }
+ Behavior on scale { NumberAnimation { duration: Theme.d(400); easing.bezierCurve: Theme.spring } }
RowLayout {
id: pillRow
anchors.centerIn: parent
diff --git a/qml/Veyra/VSeg.qml b/qml/Veyra/VSeg.qml
index 5e558536..289de086 100644
--- a/qml/Veyra/VSeg.qml
+++ b/qml/Veyra/VSeg.qml
@@ -29,7 +29,7 @@ Rectangle {
anchors.margins: 0
radius: 7
color: seg.current === modelData.id ? Theme.card3 : "transparent"
- Behavior on color { ColorAnimation { duration: Theme.durFast } }
+ Behavior on color { ColorAnimation { duration: Theme.d(Theme.durFast) } }
}
Text {
id: segLabel
diff --git a/qml/Veyra/VSlider.qml b/qml/Veyra/VSlider.qml
index 220e056f..7ebea6b2 100644
--- a/qml/Veyra/VSlider.qml
+++ b/qml/Veyra/VSlider.qml
@@ -40,7 +40,7 @@ Item {
anchors.verticalCenter: track.verticalCenter
x: track.width * slider.frac - width / 2
scale: drag.active || hover.hovered ? 1.25 : 1.0
- Behavior on scale { NumberAnimation { duration: 350; easing.bezierCurve: Theme.spring } }
+ Behavior on scale { NumberAnimation { duration: Theme.d(350); easing.bezierCurve: Theme.spring } }
}
HoverHandler { id: hover; cursorShape: Qt.PointingHandCursor; enabled: slider.enabledControl }
DragHandler {
diff --git a/qml/Veyra/VSubGroup.qml b/qml/Veyra/VSubGroup.qml
index fb0deb00..8e306a93 100644
--- a/qml/Veyra/VSubGroup.qml
+++ b/qml/Veyra/VSubGroup.qml
@@ -19,7 +19,7 @@ Rectangle {
radius: 9
color: Qt.rgba(1, 1, 1, 0.03)
clip: true
- Behavior on implicitHeight { NumberAnimation { duration: 450; easing.bezierCurve: Theme.springSoft } }
+ Behavior on implicitHeight { NumberAnimation { duration: Theme.d(450); easing.bezierCurve: Theme.springSoft } }
ColumnLayout {
anchors.left: parent.left
@@ -55,7 +55,7 @@ Rectangle {
color: Theme.t3
font.pixelSize: 12
rotation: sub.expanded ? 180 : 0
- Behavior on rotation { NumberAnimation { duration: 300; easing.bezierCurve: Theme.spring } }
+ Behavior on rotation { NumberAnimation { duration: Theme.d(300); easing.bezierCurve: Theme.spring } }
}
}
HoverHandler { cursorShape: Qt.PointingHandCursor }
diff --git a/qml/Veyra/VSwitch.qml b/qml/Veyra/VSwitch.qml
index 69088aff..a5cd161f 100644
--- a/qml/Veyra/VSwitch.qml
+++ b/qml/Veyra/VSwitch.qml
@@ -9,7 +9,7 @@ Rectangle {
height: Theme.switchHeight
radius: 99
color: checked ? Theme.accent : Qt.rgba(1, 1, 1, 0.14)
- Behavior on color { ColorAnimation { duration: 250 } }
+ Behavior on color { ColorAnimation { duration: Theme.d(250) } }
Rectangle {
id: knob
@@ -19,8 +19,8 @@ Rectangle {
color: sw.checked ? Theme.accentInk : "#FFFFFF"
anchors.verticalCenter: parent.verticalCenter
x: sw.checked ? (parent.width - width - 3) : 3
- Behavior on x { NumberAnimation { duration: 500; easing.bezierCurve: Theme.spring } }
- Behavior on width { NumberAnimation { duration: 200 } }
+ Behavior on x { NumberAnimation { duration: Theme.d(500); easing.bezierCurve: Theme.spring } }
+ Behavior on width { NumberAnimation { duration: Theme.d(200) } }
}
HoverHandler { cursorShape: Qt.PointingHandCursor }
TapHandler { id: tap; onTapped: { sw.checked = !sw.checked; sw.toggled(sw.checked) } }
diff --git a/tools/qt_probe/capture-window.ps1 b/tools/qt_probe/capture-window.ps1
index ba859252..3aeac169 100644
--- a/tools/qt_probe/capture-window.ps1
+++ b/tools/qt_probe/capture-window.ps1
@@ -10,7 +10,10 @@ param(
[string]$Clip = '',
[string]$Out = 'E:\项目\Veyra\logs\ui-qml-migration-20260925\qml-shots',
[string]$Name = '',
- [int]$WaitSeconds = 9
+ [int]$WaitSeconds = 9,
+ # Test switches passed straight to the app (G0.3), one string: '--tab fg --reduced-motion'.
+ # A string, not an array: powershell -File hands an array argument over as one literal.
+ [string]$Extra = ''
)
Add-Type -AssemblyName System.Drawing
Add-Type @"
@@ -40,6 +43,7 @@ public class PW {
New-Item -ItemType Directory -Force $Out | Out-Null
$exe = Join-Path $App 'veyra_qml_ui.exe'
$launch = @('--page', $Page)
+if ($Extra -ne '') { $launch += ($Extra -split '\s+' | Where-Object { $_ -ne '' }) }
if ($Clip -ne '') { $launch += ('"' + $Clip + '"') }
$p = Start-Process -FilePath $exe -ArgumentList $launch -PassThru
Start-Sleep -Seconds $WaitSeconds