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++
3.1 KB
Raw Blame
import QtQuick
import QtQuick.Shapes

// The window background, .vy in app.css: an elliptical radial gradient under a fine
// grain. backdrop.png is that gradient computed in float and dithered once
// (tools/qt_probe/make-backdrop.py). A QML RadialGradient was tried first: the shape
// matched but on a 7..28 level ramp it quantised into visible rings (G1.2 evidence).
// The CSS gradient is relative to the box, so stretching the image keeps its shape.
// The Shape only gives it the window's rounded corners and the 1px stroke.
Item {
    id: backdrop
    property int radius: Theme.rWindow
    property color strokeColor: Theme.stroke
    property bool softwareRendering: typeof vySoftwareUi !== "undefined" && vySoftwareUi
    // Rectangle and Image have software scene graph implementations. Shape does
    // not; instantiate it only for the GPU renderer.
    Loader {
        anchors.fill: parent
        sourceComponent: backdrop.softwareRendering ? softwareBackground : gpuBackground
    }
    Component {
        id: softwareBackground
        Rectangle {
            color: Theme.bgOuter
            radius: backdrop.radius
            Image {
                anchors.fill: parent
                visible: Theme.backdropLevel !== 0
                source: Theme.backdropLevel === 2 ? "backdrop-strong.png" : "backdrop.png"
                smooth: true
            }
            Rectangle {
                anchors.fill: parent; color: "transparent"
                radius: backdrop.radius
                border.width: 1; border.color: backdrop.strokeColor
            }
        }
    }
    Component {
        id: gpuBackground
        Shape {
            // fillItem crashes the CurveRenderer in Qt 6.8.3 (access violation, reproduced
            // with qml.exe); the geometry renderer is fine, with multisampling for the corners.
            preferredRendererType: Shape.GeometryRenderer
            layer.enabled: true
            layer.samples: 4

            // fillItem must be a texture provider (an Image), not a container: a
            // Rectangle holding images filled the shape white.
            // 设置 → 背景渐变强度: 0 = flat base colour, 1 = the design's gradient,
            // 2 = backdrop-strong.png: the same generator (tools/qt_probe/make-backdrop.py,
            // same seed and grain) with the stops' distance from the edge colour x1.8.
            Image {
                id: fill
                visible: false
                width: backdrop.width
                height: backdrop.height
                source: Theme.backdropLevel === 2 ? "backdrop-strong.png" : "backdrop.png"
                smooth: true
            }

            ShapePath {
                strokeWidth: 1
                strokeColor: backdrop.strokeColor
                fillColor: Theme.bgOuter
                fillItem: Theme.backdropLevel === 0 ? null : fill
                PathRectangle {
                    x: 0.5; y: 0.5
                    width: backdrop.width - 1; height: backdrop.height - 1
                    radius: backdrop.radius
                }
            }
        }
    }
}