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

Sliders take a typed value

Veyra Goal Agent5e3adeeea36f
diff --git a/qml/Veyra/CineBar.qml b/qml/Veyra/CineBar.qml
index 6e5a5bf0..6547edda 100644
--- a/qml/Veyra/CineBar.qml
+++ b/qml/Veyra/CineBar.qml
@@ -376,7 +376,7 @@ Rectangle {
VIcon { name: "vol"; color: Theme.t2 }
VSlider {
Layout.fillWidth: true
- from: 0; to: 1; value: veyra.volume
+ from: 0; to: 1; value: veyra.volume; inputScale: 100
onMoved: veyra.volume = value
}
}
diff --git a/qml/Veyra/DialogHost.qml b/qml/Veyra/DialogHost.qml
index 9cf87509..8976139f 100644
--- a/qml/Veyra/DialogHost.qml
+++ b/qml/Veyra/DialogHost.qml
@@ -1474,7 +1474,7 @@ Item {
value: Math.round(veyra.volume * 100) + "%"
VSlider {
implicitWidth: 170
- from: 0; to: 1; value: veyra.volume
+ from: 0; to: 1; value: veyra.volume; inputScale: 100
onMoved: veyra.volume = value
}
}
diff --git a/qml/Veyra/NodePage.qml b/qml/Veyra/NodePage.qml
index ab2e8bae..34595d14 100644
--- a/qml/Veyra/NodePage.qml
+++ b/qml/Veyra/NodePage.qml
@@ -677,7 +677,7 @@ VPage {
VSlider {
objectName: "node-out-volume"
Layout.fillWidth: true
- from: 0; to: 1; value: veyra.volume
+ from: 0; to: 1; value: veyra.volume; inputScale: 100
onMoved: value => veyra.volume = value
}
Text { text: Math.round(veyra.volume * 100) + "%"; color: Theme.t2; font.family: Theme.fontMono; font.pixelSize: 10 }
diff --git a/qml/Veyra/ProPage.qml b/qml/Veyra/ProPage.qml
index 36710479..3e9afcc3 100644
--- a/qml/Veyra/ProPage.qml
+++ b/qml/Veyra/ProPage.qml
@@ -1570,7 +1570,7 @@ VPage {
value: Math.round(veyra.volume * 100) + "%"
VSlider {
implicitWidth: 150
- from: 0; to: 1; value: veyra.volume
+ from: 0; to: 1; value: veyra.volume; inputScale: 100
onMoved: veyra.volume = value
}
}
diff --git a/qml/Veyra/SettingsPage.qml b/qml/Veyra/SettingsPage.qml
index bac8b8e4..6efeb93b 100644
--- a/qml/Veyra/SettingsPage.qml
+++ b/qml/Veyra/SettingsPage.qml
@@ -389,8 +389,9 @@ VPage {
label: "音量"
value: Math.round(veyra.volume * 100) + "%"
VSlider {
+ objectName: "settings-volume"
implicitWidth: 150
- from: 0; to: 1; value: veyra.volume
+ from: 0; to: 1; value: veyra.volume; inputScale: 100
onMoved: veyra.volume = value
}
}
diff --git a/qml/Veyra/VSlider.qml b/qml/Veyra/VSlider.qml
index bdc9216f..a6460163 100644
--- a/qml/Veyra/VSlider.qml
+++ b/qml/Veyra/VSlider.qml
@@ -34,6 +34,34 @@ Item {
moved(amount)
}
+ // Typed values (field request 2026-10-01): double-click the slider, or press Enter while
+ // it has focus, and type the number; Enter applies it (clamped to the range), Esc cancels.
+ // inputScale converts to the unit the page shows (100 for a 0–1 volume shown as %).
+ property bool editable: true
+ property real inputScale: 1
+ property int inputDecimals: {
+ const span = Math.abs(to - from) * inputScale
+ return span >= 50 ? 0 : span >= 2 ? 1 : span >= 0.2 ? 2 : 3
+ }
+ readonly property bool editing: editor.visible
+ function openEditor() {
+ if (!editable || !enabledControl) return
+ editorInput.text = Number((value * inputScale).toFixed(inputDecimals)).toString()
+ editor.visible = true
+ editorInput.forceActiveFocus()
+ editorInput.selectAll()
+ }
+ function closeEditor(apply) {
+ if (!editor.visible) return
+ editor.visible = false
+ if (apply) {
+ const typed = Number(editorInput.text.trim().replace(",", "."))
+ if (editorInput.text.trim().length > 0 && isFinite(typed))
+ commitValue(Math.max(Math.min(from, to), Math.min(Math.max(from, to), typed / inputScale)))
+ }
+ slider.forceActiveFocus()
+ }
+
// Keyboard (field request 2026-10-01): a clicked or dragged slider takes focus and the
// arrow keys move it by the 设置 step (1 / 0.1 / 0.01), at least a thousandth of the
// range so wide ranges still move. While focused the arrows belong to the slider, not
@@ -47,13 +75,15 @@ Item {
}
Keys.onShortcutOverride: event => {
if (event.key === Qt.Key_Left || event.key === Qt.Key_Right || event.key === Qt.Key_Up
- || event.key === Qt.Key_Down || event.key === Qt.Key_Escape) event.accepted = true
+ || event.key === Qt.Key_Down || event.key === Qt.Key_Escape
+ || (editable && (event.key === Qt.Key_Return || event.key === Qt.Key_Enter))) event.accepted = true
}
Keys.onPressed: event => {
if (!enabledControl) return
if (event.key === Qt.Key_Left || event.key === Qt.Key_Down) { nudge(-1); event.accepted = true }
else if (event.key === Qt.Key_Right || event.key === Qt.Key_Up) { nudge(1); event.accepted = true }
else if (event.key === Qt.Key_Escape) { focus = false; event.accepted = true }
+ else if (event.key === Qt.Key_Return || event.key === Qt.Key_Enter) { openEditor(); event.accepted = true }
}
implicitHeight: 20
@@ -139,13 +169,53 @@ Item {
// Node cards may overlap: consume track clicks rather than also
// activating an inspector button on a card underneath this slider.
gesturePolicy: TapHandler.WithinBounds
- onTapped: point => {
+ property real beforeTap: 0
+ onTapped: (point, button) => {
+ // The second tap of a double-click opens the editor and undoes the first
+ // tap's jump, so typing starts from the value the slider had.
+ if (tapCount === 2 && slider.editable) {
+ slider.commitValue(beforeTap)
+ slider.openEditor()
+ return
+ }
+ beforeTap = slider.value
slider.forceActiveFocus()
const x = Math.max(0, Math.min(track.width, point.position.x))
slider.commitValue(slider.from + (x / track.width) * (slider.to - slider.from))
}
}
}
+ Rectangle {
+ id: editor
+ objectName: "vslider-editor"
+ visible: false
+ z: 10
+ width: Math.min(76, slider.width)
+ height: 24
+ anchors.verticalCenter: parent.verticalCenter
+ x: Math.max(0, Math.min(track.width - width, knob.x + knob.width / 2 - width / 2))
+ radius: 6
+ color: Theme.dialog
+ border.width: 1
+ border.color: Theme.accent
+ TextInput {
+ id: editorInput
+ objectName: "vslider-editor-input"
+ anchors.fill: parent
+ anchors.leftMargin: 6; anchors.rightMargin: 6
+ verticalAlignment: TextInput.AlignVCenter
+ horizontalAlignment: TextInput.AlignHCenter
+ color: Theme.t1
+ font.family: Theme.fontMono
+ font.pixelSize: Theme.fsSmall
+ selectByMouse: true
+ inputMethodHints: Qt.ImhFormattedNumbersOnly
+ Keys.onReturnPressed: slider.closeEditor(true)
+ Keys.onEnterPressed: slider.closeEditor(true)
+ Keys.onEscapePressed: slider.closeEditor(false)
+ onActiveFocusChanged: if (!activeFocus && editor.visible) slider.closeEditor(true)
+ }
+ }
ToolButton {
objectName: "vslider-reset"
anchors.right: parent.right
diff --git a/scripts/ui-check/slider-typed.qml b/scripts/ui-check/slider-typed.qml
new file mode 100644
index 00000000..525d9215
--- /dev/null
+++ b/scripts/ui-check/slider-typed.qml
@@ -0,0 +1,55 @@
+
+ // ---- a slider takes a typed value: double-click + type + Enter, then focus + Enter + type ----
+ function uitestFind(item, name) {
+ if (!item) return null
+ if (item.objectName === name) return item
+ const kids = item.children || []
+ for (let k = 0; k < kids.length; ++k) { const f = uitestFind(kids[k], name); if (f) return f }
+ return null
+ }
+ Timer { interval: 150; running: true; repeat: true; onTriggered: veyra.logUi("uitest-tick", "") }
+ Timer {
+ interval: 1000; running: true; repeat: true
+ property int ticks: 0
+ property var s: null
+ onTriggered: {
+ ++ticks
+ if (ticks === 2) { veyra.volume = 0.8; root.goPage("set"); settingsPage.section = "play" }
+ if (ticks === 4) {
+ s = uitestFind(root.contentItem, "settings-volume")
+ if (!s) { veyra.logUi("uitest", "UITEST_FAIL no slider"); running = false; return }
+ const p = s.mapToGlobal(s.trackWidth * 0.25, s.height / 2)
+ veyra.logUi("uitest", "UITEST_DCLICK " + p.x + " " + p.y)
+ }
+ if (ticks === 5) {
+ veyra.logUi("uitest", "UITEST_NOTE after double-click editing=" + s.editing + " volume=" + veyra.volume.toFixed(3))
+ veyra.logUi("uitest", "UITEST_SHOT editor")
+ }
+ if (ticks === 6) veyra.logUi("uitest", "UITEST_KEY 51 1") // 3 (replaces the selected text)
+ if (ticks === 7) veyra.logUi("uitest", "UITEST_KEY 55 1") // 7
+ if (ticks === 8) veyra.logUi("uitest", "UITEST_KEY 13 1") // Enter
+ if (ticks === 9) {
+ const ok1 = Math.abs(veyra.volume - 0.37) < 0.001 && !s.editing
+ veyra.logUi("uitest", "UITEST_NOTE typed 37 -> volume=" + veyra.volume.toFixed(3) + " editing=" + s.editing + " ok=" + ok1)
+ if (!ok1) { veyra.logUi("uitest", "UITEST_FAIL double-click path"); running = false; return }
+ veyra.logUi("uitest", "UITEST_KEY 13 1") // Enter on the focused slider opens it again
+ }
+ if (ticks === 10) veyra.logUi("uitest", "UITEST_NOTE enter opens editing=" + s.editing)
+ if (ticks === 11) veyra.logUi("uitest", "UITEST_KEY 49 1") // 1
+ if (ticks === 12) veyra.logUi("uitest", "UITEST_KEY 50 1") // 2
+ if (ticks === 13) veyra.logUi("uitest", "UITEST_KEY 48 1") // 0 -> 120, clamped to 100
+ if (ticks === 14) veyra.logUi("uitest", "UITEST_KEY 13 1")
+ if (ticks === 15) {
+ veyra.logUi("uitest", "UITEST_NOTE typed 120 -> volume=" + veyra.volume.toFixed(3))
+ veyra.logUi("uitest", "UITEST_KEY 13 1")
+ }
+ if (ticks === 16) veyra.logUi("uitest", "UITEST_KEY 52 1") // 4
+ if (ticks === 17) veyra.logUi("uitest", "UITEST_KEY 27 1") // Esc cancels
+ if (ticks === 18) {
+ const ok = Math.abs(veyra.volume - 1.0) < 0.001 && !s.editing
+ veyra.logUi("uitest", "UITEST_NOTE after Esc volume=" + veyra.volume.toFixed(3) + " editing=" + s.editing)
+ veyra.logUi("uitest", ok ? "UITEST_DONE" : "UITEST_FAIL clamp/escape")
+ running = false
+ }
+ }
+ }
diff --git a/scripts/ui-check/ui-check.py b/scripts/ui-check/ui-check.py
index 6e414cb1..b79701a0 100644
--- a/scripts/ui-check/ui-check.py
+++ b/scripts/ui-check/ui-check.py
@@ -8,6 +8,7 @@ The snippet is appended inside the staged Main.qml (restored afterwards) and tal
through log lines:
UITEST_SHOT <name> screen shot of the main window plus the 60px below it (the pill)
UITEST_CLICK <x> <y> a left click at screen coordinates
+ UITEST_DCLICK <x> <y> a left double-click at screen coordinates
UITEST_DRAG <x0> <y0> <x1> <y1> a left-button drag at screen coordinates
UITEST_KEY <vk> [count] key presses (Windows virtual-key code) to the focused window
UITEST_DONE / UITEST_FAIL <why> the verdict
@@ -116,6 +117,14 @@ def click(x, y):
user32.mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0)
+def double_click(x, y):
+ click(x, y)
+ time.sleep(0.08)
+ user32.mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0)
+ time.sleep(0.06)
+ user32.mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0)
+
+
def drag(x0, y0, x1, y1):
move(x0, y0)
time.sleep(0.15)
@@ -149,6 +158,14 @@ try:
name = line.split('UITEST_SHOT ')[1].strip()
time.sleep(0.2)
print('shot', name, 'ok' if shot(proc.pid, out / f'{name}.png') else 'NO WINDOW')
+ elif 'UITEST_DCLICK ' in line:
+ x, y = (float(v) for v in line.split('UITEST_DCLICK ')[1].split()[:2])
+ raise_app(proc.pid, True)
+ time.sleep(0.3)
+ try:
+ double_click(x, y)
+ finally:
+ raise_app(proc.pid, False)
elif 'UITEST_CLICK ' in line:
x, y = (float(v) for v in line.split('UITEST_CLICK ')[1].split()[:2])
raise_app(proc.pid, True)