import QtQuick import QtQuick.Controls as Controls import QtQuick.Dialogs import QtQuick.Layouts import org.kde.kirigami as Kirigami Item { id: configRoot property alias cfg_shaderPath: shaderPath.text property alias cfg_targetFps: fpsSlider.value property alias cfg_speed: speedSlider.value property alias cfg_running: runningCheck.checked property alias cfg_mouseEnabled: mouseCheck.checked property alias cfg_watchSource: watchCheck.checked implicitWidth: 560 implicitHeight: form.implicitHeight + Kirigami.Units.gridUnit * 2 FileDialog { id: shaderDialog title: "Choose a fragment shader" nameFilters: ["Fragment shaders (*.frag *.glsl)", "All files (*)"] onAccepted: shaderPath.text = selectedFile.toString() } Kirigami.FormLayout { id: form anchors { left: parent.left right: parent.right top: parent.top margins: Kirigami.Units.gridUnit } RowLayout { Kirigami.FormData.label: "Fragment shader:" Layout.fillWidth: true Controls.TextField { id: shaderPath Layout.fillWidth: true placeholderText: "Built-in Lumen shader" } Controls.Button { text: "Browse…" onClicked: shaderDialog.open() } Controls.Button { text: "Reset" onClicked: shaderPath.text = "" } } Controls.Label { text: "Shadertoy-style GLSL with mainImage(). Files reload automatically when enabled below." wrapMode: Text.Wrap Layout.fillWidth: true opacity: 0.7 } RowLayout { Kirigami.FormData.label: "Frame rate:" Controls.Slider { id: fpsSlider from: 5 to: 120 stepSize: 1 value: 30 Layout.fillWidth: true } Controls.Label { text: Math.round(fpsSlider.value) + " FPS" Layout.minimumWidth: 64 } } RowLayout { Kirigami.FormData.label: "Animation speed:" Controls.Slider { id: speedSlider from: 0.1 to: 3.0 stepSize: 0.05 value: 1.0 Layout.fillWidth: true } Controls.Label { text: speedSlider.value.toFixed(2) + "×" Layout.minimumWidth: 64 } } Controls.CheckBox { id: runningCheck Kirigami.FormData.label: "Playback:" text: "Animate wallpaper" checked: true } Controls.CheckBox { id: mouseCheck text: "React to the pointer over the desktop" checked: true } Controls.CheckBox { id: watchCheck text: "Reload the shader when its file changes" checked: true } } }