From 7c2d2b4d669361dcb440201d2c648901c079f22e Mon Sep 17 00:00:00 2001 From: quadbyte Date: Wed, 6 Aug 2025 19:10:32 -0400 Subject: [PATCH] Settings window: added separators and renamed Recording to Screen Recorder --- Widgets/SettingsWindow/SettingsWindow.qml | 8 +- Widgets/SettingsWindow/Tabs/Bar.qml | 2 +- Widgets/SettingsWindow/Tabs/General.qml | 14 +- Widgets/SettingsWindow/Tabs/Network.qml | 14 +- Widgets/SettingsWindow/Tabs/Recording.qml | 1565 ++++++++++--------- Widgets/SettingsWindow/Tabs/TimeWeather.qml | 14 +- Widgets/SettingsWindow/Tabs/Wallpaper.qml | 276 ++-- 7 files changed, 1042 insertions(+), 851 deletions(-) diff --git a/Widgets/SettingsWindow/SettingsWindow.qml b/Widgets/SettingsWindow/SettingsWindow.qml index 3f9402b..156d5e0 100644 --- a/Widgets/SettingsWindow/SettingsWindow.qml +++ b/Widgets/SettingsWindow/SettingsWindow.qml @@ -57,7 +57,7 @@ PanelWithOverlay { "General", "Bar", "Time & Weather", - "Recording", + "Screen Recorder", "Network", "Display", "Wallpaper", @@ -202,7 +202,7 @@ PanelWithOverlay { text: wallpaperSelector.visible ? "Select Wallpaper" : (activeTabIndex === 0 ? "General" : activeTabIndex === 1 ? "Bar" : activeTabIndex === 2 ? "Time & Weather" : - activeTabIndex === 3 ? "Recording" : + activeTabIndex === 3 ? "Screen Recorder" : activeTabIndex === 4 ? "Network" : activeTabIndex === 5 ? "Display" : activeTabIndex === 6 ? "Wallpaper" : @@ -303,7 +303,7 @@ PanelWithOverlay { left: parent.left right: parent.right bottom: parent.bottom - margins: 24 + margins: 16 topMargin: 32 } @@ -344,7 +344,7 @@ PanelWithOverlay { { icon: "tune", text: "General" }, { icon: "space_dashboard", text: "Bar" }, { icon: "schedule", text: "Time & Weather" }, - { icon: "photo_camera", text: "Recording" }, + { icon: "photo_camera", text: "Screen Recorder" }, { icon: "wifi", text: "Network" }, { icon: "monitor", text: "Display" }, { icon: "wallpaper", text: "Wallpaper" }, diff --git a/Widgets/SettingsWindow/Tabs/Bar.qml b/Widgets/SettingsWindow/Tabs/Bar.qml index 751a0ce..2148e16 100644 --- a/Widgets/SettingsWindow/Tabs/Bar.qml +++ b/Widgets/SettingsWindow/Tabs/Bar.qml @@ -21,7 +21,7 @@ ColumnLayout { Layout.fillWidth: true Text { - text: "Bar Elements" + text: "Elements" font.pixelSize: 18 font.bold: true color: Theme.textPrimary diff --git a/Widgets/SettingsWindow/Tabs/General.qml b/Widgets/SettingsWindow/Tabs/General.qml index dab795a..66a88e2 100644 --- a/Widgets/SettingsWindow/Tabs/General.qml +++ b/Widgets/SettingsWindow/Tabs/General.qml @@ -107,11 +107,23 @@ ColumnLayout { } } + Rectangle { + Layout.topMargin: 26 + Layout.bottomMargin: 18 + anchors { + top: headerArea.bottom + left: parent.left + right: parent.right + } + height: 1 + color: Theme.outline + opacity: 0.3 + } ColumnLayout { spacing: 4 Layout.fillWidth: true - Layout.topMargin: 58 + Text { text: "User Interface" diff --git a/Widgets/SettingsWindow/Tabs/Network.qml b/Widgets/SettingsWindow/Tabs/Network.qml index d5cdd06..b159f78 100644 --- a/Widgets/SettingsWindow/Tabs/Network.qml +++ b/Widgets/SettingsWindow/Tabs/Network.qml @@ -97,11 +97,23 @@ ColumnLayout { } } + Rectangle { + Layout.topMargin: 26 + Layout.bottomMargin: 18 + anchors { + top: headerArea.bottom + left: parent.left + right: parent.right + } + height: 1 + color: Theme.outline + opacity: 0.3 + } + ColumnLayout { spacing: 16 Layout.fillWidth: true - Layout.topMargin: 58 Text { text: "Bluetooth" diff --git a/Widgets/SettingsWindow/Tabs/Recording.qml b/Widgets/SettingsWindow/Tabs/Recording.qml index 36234b4..1011538 100644 --- a/Widgets/SettingsWindow/Tabs/Recording.qml +++ b/Widgets/SettingsWindow/Tabs/Recording.qml @@ -1,17 +1,19 @@ import QtQuick import QtQuick.Controls import QtQuick.Layouts -import qs.Settings import qs.Components +import qs.Settings ColumnLayout { id: root + spacing: 0 anchors.fill: parent anchors.margins: 0 ScrollView { id: scrollView + Layout.fillWidth: true Layout.fillHeight: true padding: 0 @@ -29,784 +31,849 @@ ColumnLayout { Layout.preferredHeight: 0 } - ColumnLayout { - spacing: 4 - Layout.fillWidth: true - - Text { - text: "Screen Recording" - font.pixelSize: 18 - font.bold: true - color: Theme.textPrimary - Layout.bottomMargin: 8 - } - - - ColumnLayout { - spacing: 8 - Layout.fillWidth: true - - Text { - text: "Output Directory" - font.pixelSize: 13 - font.bold: true - color: Theme.textPrimary - } - - Text { - text: "Directory where screen recordings will be saved" - font.pixelSize: 12 - color: Theme.textSecondary - Layout.bottomMargin: 4 - } - - Rectangle { - Layout.fillWidth: true - Layout.preferredHeight: 40 - radius: 16 - color: Theme.surfaceVariant - border.color: videoPathInput.activeFocus ? Theme.accentPrimary : Theme.outline - border.width: 1 - - TextInput { - id: videoPathInput - anchors.fill: parent - anchors.leftMargin: 12 - anchors.rightMargin: 12 - anchors.topMargin: 6 - anchors.bottomMargin: 6 - text: Settings.settings.videoPath !== undefined ? Settings.settings.videoPath : "" - font.pixelSize: 13 - color: Theme.textPrimary - verticalAlignment: TextInput.AlignVCenter - clip: true - selectByMouse: true - activeFocusOnTab: true - inputMethodHints: Qt.ImhUrlCharactersOnly - onTextChanged: { - Settings.settings.videoPath = text; - } - MouseArea { - anchors.fill: parent - cursorShape: Qt.IBeamCursor - onClicked: videoPathInput.forceActiveFocus() - } - } - } - } - - - ColumnLayout { - spacing: 8 - Layout.fillWidth: true - Layout.topMargin: 8 - - Text { - text: "Frame Rate" - font.pixelSize: 13 - font.bold: true - color: Theme.textPrimary - } - - Text { - text: "Target frame rate for screen recordings (default: 60)" - font.pixelSize: 12 - color: Theme.textSecondary - Layout.bottomMargin: 4 - } - - SpinBox { - id: frameRateSpinBox - Layout.fillWidth: true - Layout.preferredHeight: 40 - from: 24 - to: 144 - value: Settings.settings.recordingFrameRate || 60 - stepSize: 1 - - onValueChanged: { - Settings.settings.recordingFrameRate = value; - } - - background: Rectangle { - implicitWidth: 120 - implicitHeight: 40 - color: Theme.surfaceVariant - border.color: frameRateSpinBox.activeFocus ? Theme.accentPrimary : Theme.outline - border.width: 1 - radius: 16 - } - - contentItem: TextInput { - text: frameRateSpinBox.textFromValue(frameRateSpinBox.value, frameRateSpinBox.locale) - font.pixelSize: 13 - color: Theme.textPrimary - selectionColor: Theme.accentPrimary - selectedTextColor: Theme.onAccent - horizontalAlignment: Qt.AlignHCenter - verticalAlignment: Qt.AlignVCenter - readOnly: false - selectByMouse: true - validator: IntValidator { - bottom: frameRateSpinBox.from - top: frameRateSpinBox.to - } - inputMethodHints: Qt.ImhDigitsOnly - - onTextChanged: { - var newValue = parseInt(text); - if (!isNaN(newValue) && newValue >= frameRateSpinBox.from && newValue <= frameRateSpinBox.to) { - frameRateSpinBox.value = newValue; - } - } - - onEditingFinished: { - var newValue = parseInt(text); - if (isNaN(newValue) || newValue < frameRateSpinBox.from || newValue > frameRateSpinBox.to) { - text = frameRateSpinBox.textFromValue(frameRateSpinBox.value, frameRateSpinBox.locale); - } - } - } - - up.indicator: Rectangle { - x: parent.width - width - height: parent.height - width: height - color: "transparent" - radius: 16 - - Text { - text: "add" - font.family: "Material Symbols Outlined" - font.pixelSize: 20 - color: Theme.textPrimary - anchors.centerIn: parent - } - } - - down.indicator: Rectangle { - x: 0 - height: parent.height - width: height - color: "transparent" - radius: 16 - - Text { - text: "remove" - font.family: "Material Symbols Outlined" - font.pixelSize: 20 - color: Theme.textPrimary - anchors.centerIn: parent - } - } - } - } - - - ColumnLayout { - spacing: 8 - Layout.fillWidth: true - Layout.topMargin: 8 - - Text { - text: "Audio Source" - font.pixelSize: 13 - font.bold: true - color: Theme.textPrimary - } - - Text { - text: "Audio source to capture during recording" - font.pixelSize: 12 - color: Theme.textSecondary - Layout.bottomMargin: 4 - } - - ComboBox { - id: audioSourceComboBox - Layout.fillWidth: true - Layout.preferredHeight: 40 - model: ["default_output", "default_input", "both"] - currentIndex: model.indexOf(Settings.settings.recordingAudioSource || "default_output") - - background: Rectangle { - implicitWidth: 120 - implicitHeight: 40 - color: Theme.surfaceVariant - border.color: audioSourceComboBox.activeFocus ? Theme.accentPrimary : Theme.outline - border.width: 1 - radius: 16 - } - - contentItem: Text { - leftPadding: 12 - rightPadding: audioSourceComboBox.indicator.width + audioSourceComboBox.spacing - text: { - switch(audioSourceComboBox.currentText) { - case "default_output": return "System Audio"; - case "default_input": return "Microphone"; - case "both": return "System Audio + Microphone"; - default: return audioSourceComboBox.currentText; - } - } - font.pixelSize: 13 - color: Theme.textPrimary - verticalAlignment: Text.AlignVCenter - elide: Text.ElideRight - } - - indicator: Text { - x: audioSourceComboBox.width - width - 12 - y: audioSourceComboBox.topPadding + (audioSourceComboBox.availableHeight - height) / 2 - text: "arrow_drop_down" - font.family: "Material Symbols Outlined" - font.pixelSize: 24 - color: Theme.textPrimary - } - - popup: Popup { - y: audioSourceComboBox.height - width: audioSourceComboBox.width - implicitHeight: contentItem.implicitHeight - padding: 1 - - contentItem: ListView { - clip: true - implicitHeight: contentHeight - model: audioSourceComboBox.popup.visible ? audioSourceComboBox.delegateModel : null - currentIndex: audioSourceComboBox.highlightedIndex - - ScrollIndicator.vertical: ScrollIndicator {} - } - - background: Rectangle { - color: Theme.surfaceVariant - border.color: Theme.outline - border.width: 1 - radius: 16 - } - } - - delegate: ItemDelegate { - width: audioSourceComboBox.width - contentItem: Text { - text: { - switch(modelData) { - case "default_output": return "System Audio"; - case "default_input": return "Microphone"; - case "both": return "System Audio + Microphone"; - default: return modelData; - } - } - font.pixelSize: 13 - color: Theme.textPrimary - verticalAlignment: Text.AlignVCenter - elide: Text.ElideRight - } - highlighted: audioSourceComboBox.highlightedIndex === index - - background: Rectangle { - color: highlighted ? Theme.accentPrimary.toString().replace(/#/, "#1A") : "transparent" - } - } - - onActivated: { - Settings.settings.recordingAudioSource = model[index]; - } - } - } - - - ColumnLayout { - spacing: 8 - Layout.fillWidth: true - Layout.topMargin: 8 - - Text { - text: "Video Quality" - font.pixelSize: 13 - font.bold: true - color: Theme.textPrimary - } - - Text { - text: "Higher quality results in larger file sizes" - font.pixelSize: 12 - color: Theme.textSecondary - Layout.bottomMargin: 4 - } - - ComboBox { - id: qualityComboBox - Layout.fillWidth: true - Layout.preferredHeight: 40 - model: ["medium", "high", "very_high", "ultra"] - currentIndex: model.indexOf(Settings.settings.recordingQuality || "very_high") - - background: Rectangle { - implicitWidth: 120 - implicitHeight: 40 - color: Theme.surfaceVariant - border.color: qualityComboBox.activeFocus ? Theme.accentPrimary : Theme.outline - border.width: 1 - radius: 16 - } - - contentItem: Text { - leftPadding: 12 - rightPadding: qualityComboBox.indicator.width + qualityComboBox.spacing - text: { - switch(qualityComboBox.currentText) { - case "medium": return "Medium"; - case "high": return "High"; - case "very_high": return "Very High"; - case "ultra": return "Ultra"; - default: return qualityComboBox.currentText; - } - } - font.pixelSize: 13 - color: Theme.textPrimary - verticalAlignment: Text.AlignVCenter - elide: Text.ElideRight - } - - indicator: Text { - x: qualityComboBox.width - width - 12 - y: qualityComboBox.topPadding + (qualityComboBox.availableHeight - height) / 2 - text: "arrow_drop_down" - font.family: "Material Symbols Outlined" - font.pixelSize: 24 - color: Theme.textPrimary - } - - popup: Popup { - y: qualityComboBox.height - width: qualityComboBox.width - implicitHeight: contentItem.implicitHeight - padding: 1 - - contentItem: ListView { - clip: true - implicitHeight: contentHeight - model: qualityComboBox.popup.visible ? qualityComboBox.delegateModel : null - currentIndex: qualityComboBox.highlightedIndex - - ScrollIndicator.vertical: ScrollIndicator {} - } - - background: Rectangle { - color: Theme.surfaceVariant - border.color: Theme.outline - border.width: 1 - radius: 16 - } - } - - delegate: ItemDelegate { - width: qualityComboBox.width - contentItem: Text { - text: { - switch(modelData) { - case "medium": return "Medium"; - case "high": return "High"; - case "very_high": return "Very High"; - case "ultra": return "Ultra"; - default: return modelData; - } - } - font.pixelSize: 13 - color: Theme.textPrimary - verticalAlignment: Text.AlignVCenter - elide: Text.ElideRight - } - highlighted: qualityComboBox.highlightedIndex === index - - background: Rectangle { - color: highlighted ? Theme.accentPrimary.toString().replace(/#/, "#1A") : "transparent" - } - } - - onActivated: { - Settings.settings.recordingQuality = model[index]; - } - } - } - - - ColumnLayout { - spacing: 8 - Layout.fillWidth: true - Layout.topMargin: 8 - - Text { - text: "Video Codec" - font.pixelSize: 13 - font.bold: true - color: Theme.textPrimary - } - - Text { - text: "Different codecs offer different compression and compatibility" - font.pixelSize: 12 - color: Theme.textSecondary - Layout.bottomMargin: 4 - } - - ComboBox { - id: codecComboBox - Layout.fillWidth: true - Layout.preferredHeight: 40 - model: ["h264", "hevc", "av1", "vp8", "vp9"] - currentIndex: model.indexOf(Settings.settings.recordingCodec || "h264") - - background: Rectangle { - implicitWidth: 120 - implicitHeight: 40 - color: Theme.surfaceVariant - border.color: codecComboBox.activeFocus ? Theme.accentPrimary : Theme.outline - border.width: 1 - radius: 16 - } - - contentItem: Text { - leftPadding: 12 - rightPadding: codecComboBox.indicator.width + codecComboBox.spacing - text: codecComboBox.currentText.toUpperCase() - font.pixelSize: 13 - color: Theme.textPrimary - verticalAlignment: Text.AlignVCenter - elide: Text.ElideRight - } - - indicator: Text { - x: codecComboBox.width - width - 12 - y: codecComboBox.topPadding + (codecComboBox.availableHeight - height) / 2 - text: "arrow_drop_down" - font.family: "Material Symbols Outlined" - font.pixelSize: 24 - color: Theme.textPrimary - } - - popup: Popup { - y: codecComboBox.height - width: codecComboBox.width - implicitHeight: contentItem.implicitHeight - padding: 1 - - contentItem: ListView { - clip: true - implicitHeight: contentHeight - model: codecComboBox.popup.visible ? codecComboBox.delegateModel : null - currentIndex: codecComboBox.highlightedIndex - - ScrollIndicator.vertical: ScrollIndicator {} - } - - background: Rectangle { - color: Theme.surfaceVariant - border.color: Theme.outline - border.width: 1 - radius: 16 - } - } - - delegate: ItemDelegate { - width: codecComboBox.width - contentItem: Text { - text: modelData.toUpperCase() - font.pixelSize: 13 - color: Theme.textPrimary - verticalAlignment: Text.AlignVCenter - elide: Text.ElideRight - } - highlighted: codecComboBox.highlightedIndex === index - - background: Rectangle { - color: highlighted ? Theme.accentPrimary.toString().replace(/#/, "#1A") : "transparent" - } - } - - onActivated: { - Settings.settings.recordingCodec = model[index]; - } - } - } - - - ColumnLayout { - spacing: 8 - Layout.fillWidth: true - Layout.topMargin: 8 - - Text { - text: "Audio Codec" - font.pixelSize: 13 - font.bold: true - color: Theme.textPrimary - } - - Text { - text: "Opus is recommended for best performance and smallest audio size" - font.pixelSize: 12 - color: Theme.textSecondary - Layout.bottomMargin: 4 - } - - ComboBox { - id: audioCodecComboBox - Layout.fillWidth: true - Layout.preferredHeight: 40 - model: ["opus", "aac"] - currentIndex: model.indexOf(Settings.settings.audioCodec || "opus") - - background: Rectangle { - implicitWidth: 120 - implicitHeight: 40 - color: Theme.surfaceVariant - border.color: audioCodecComboBox.activeFocus ? Theme.accentPrimary : Theme.outline - border.width: 1 - radius: 16 - } - - contentItem: Text { - leftPadding: 12 - rightPadding: audioCodecComboBox.indicator.width + audioCodecComboBox.spacing - text: audioCodecComboBox.currentText.toUpperCase() - font.pixelSize: 13 - color: Theme.textPrimary - verticalAlignment: Text.AlignVCenter - elide: Text.ElideRight - } - - indicator: Text { - x: audioCodecComboBox.width - width - 12 - y: audioCodecComboBox.topPadding + (audioCodecComboBox.availableHeight - height) / 2 - text: "arrow_drop_down" - font.family: "Material Symbols Outlined" - font.pixelSize: 24 - color: Theme.textPrimary - } - - popup: Popup { - y: audioCodecComboBox.height - width: audioCodecComboBox.width - implicitHeight: contentItem.implicitHeight - padding: 1 - - contentItem: ListView { - clip: true - implicitHeight: contentHeight - model: audioCodecComboBox.popup.visible ? audioCodecComboBox.delegateModel : null - currentIndex: audioCodecComboBox.highlightedIndex - - ScrollIndicator.vertical: ScrollIndicator {} - } - - background: Rectangle { - color: Theme.surfaceVariant - border.color: Theme.outline - border.width: 1 - radius: 16 - } - } - - delegate: ItemDelegate { - width: audioCodecComboBox.width - contentItem: Text { - text: modelData.toUpperCase() - font.pixelSize: 13 - color: Theme.textPrimary - verticalAlignment: Text.AlignVCenter - elide: Text.ElideRight - } - highlighted: audioCodecComboBox.highlightedIndex === index - - background: Rectangle { - color: highlighted ? Theme.accentPrimary.toString().replace(/#/, "#1A") : "transparent" - } - } - - onActivated: { - Settings.settings.audioCodec = model[index]; - } - } - } - - - ColumnLayout { - spacing: 8 - Layout.fillWidth: true - Layout.topMargin: 8 - - Text { - text: "Color Range" - font.pixelSize: 13 - font.bold: true - color: Theme.textPrimary - } - - Text { - text: "Limited is recommended for better compatibility" - font.pixelSize: 12 - color: Theme.textSecondary - Layout.bottomMargin: 4 - } - - ComboBox { - id: colorRangeComboBox - Layout.fillWidth: true - Layout.preferredHeight: 40 - model: ["limited", "full"] - currentIndex: model.indexOf(Settings.settings.colorRange || "limited") - - background: Rectangle { - implicitWidth: 120 - implicitHeight: 40 - color: Theme.surfaceVariant - border.color: colorRangeComboBox.activeFocus ? Theme.accentPrimary : Theme.outline - border.width: 1 - radius: 16 - } - - contentItem: Text { - leftPadding: 12 - rightPadding: colorRangeComboBox.indicator.width + colorRangeComboBox.spacing - text: colorRangeComboBox.currentText.charAt(0).toUpperCase() + colorRangeComboBox.currentText.slice(1) - font.pixelSize: 13 - color: Theme.textPrimary - verticalAlignment: Text.AlignVCenter - elide: Text.ElideRight - } - - indicator: Text { - x: colorRangeComboBox.width - width - 12 - y: colorRangeComboBox.topPadding + (colorRangeComboBox.availableHeight - height) / 2 - text: "arrow_drop_down" - font.family: "Material Symbols Outlined" - font.pixelSize: 24 - color: Theme.textPrimary - } - - popup: Popup { - y: colorRangeComboBox.height - width: colorRangeComboBox.width - implicitHeight: contentItem.implicitHeight - padding: 1 - - contentItem: ListView { - clip: true - implicitHeight: contentHeight - model: colorRangeComboBox.popup.visible ? colorRangeComboBox.delegateModel : null - currentIndex: colorRangeComboBox.highlightedIndex - - ScrollIndicator.vertical: ScrollIndicator {} - } - - background: Rectangle { - color: Theme.surfaceVariant - border.color: Theme.outline - border.width: 1 - radius: 16 - } - } - - delegate: ItemDelegate { - width: colorRangeComboBox.width - contentItem: Text { - text: modelData.charAt(0).toUpperCase() + modelData.slice(1) - font.pixelSize: 13 - color: Theme.textPrimary - verticalAlignment: Text.AlignVCenter - elide: Text.ElideRight - } - highlighted: colorRangeComboBox.highlightedIndex === index - - background: Rectangle { - color: highlighted ? Theme.accentPrimary.toString().replace(/#/, "#1A") : "transparent" - } - } - - onActivated: { - Settings.settings.colorRange = model[index]; - } - } - } - - - ColumnLayout { - spacing: 8 - Layout.fillWidth: true - Layout.topMargin: 8 - - RowLayout { - spacing: 8 + // Text { + // text: "Screen Recording" + // font.pixelSize: 18 + // font.bold: true + // color: Theme.textPrimary + // Layout.bottomMargin: 8 + // } + + spacing: 4 Layout.fillWidth: true ColumnLayout { - spacing: 4 + spacing: 8 Layout.fillWidth: true Text { - text: "Show Cursor" + text: "Output Directory" font.pixelSize: 13 font.bold: true color: Theme.textPrimary } Text { - text: "Record mouse cursor in the video" + text: "Directory where screen recordings will be saved" font.pixelSize: 12 color: Theme.textSecondary - wrapMode: Text.WordWrap - Layout.fillWidth: true + Layout.bottomMargin: 4 } - } - - Rectangle { - id: cursorSwitch - width: 52 - height: 32 - radius: 16 - color: Settings.settings.showCursor ? Theme.accentPrimary : Theme.surfaceVariant - border.color: Settings.settings.showCursor ? Theme.accentPrimary : Theme.outline - border.width: 2 Rectangle { - id: cursorThumb - width: 28 - height: 28 - radius: 14 - color: Theme.surface - border.color: Theme.outline + Layout.fillWidth: true + Layout.preferredHeight: 40 + radius: 16 + color: Theme.surfaceVariant + border.color: videoPathInput.activeFocus ? Theme.accentPrimary : Theme.outline border.width: 1 - y: 2 - x: Settings.settings.showCursor ? cursorSwitch.width - width - 2 : 2 - Behavior on x { - NumberAnimation { - duration: 200 - easing.type: Easing.OutCubic + TextInput { + id: videoPathInput + + anchors.fill: parent + anchors.leftMargin: 12 + anchors.rightMargin: 12 + anchors.topMargin: 6 + anchors.bottomMargin: 6 + text: Settings.settings.videoPath !== undefined ? Settings.settings.videoPath : "" + font.pixelSize: 13 + color: Theme.textPrimary + verticalAlignment: TextInput.AlignVCenter + clip: true + selectByMouse: true + activeFocusOnTab: true + inputMethodHints: Qt.ImhUrlCharactersOnly + onTextChanged: { + Settings.settings.videoPath = text; } + + MouseArea { + anchors.fill: parent + cursorShape: Qt.IBeamCursor + onClicked: videoPathInput.forceActiveFocus() + } + } + } - MouseArea { - anchors.fill: parent - cursorShape: Qt.PointingHandCursor - onClicked: { - Settings.settings.showCursor = !Settings.settings.showCursor; - } - } } + + ColumnLayout { + spacing: 8 + Layout.fillWidth: true + Layout.topMargin: 8 + + Text { + text: "Frame Rate" + font.pixelSize: 13 + font.bold: true + color: Theme.textPrimary + } + + Text { + text: "Target frame rate for screen recordings (default: 60)" + font.pixelSize: 12 + color: Theme.textSecondary + Layout.bottomMargin: 4 + } + + SpinBox { + id: frameRateSpinBox + + Layout.fillWidth: true + Layout.preferredHeight: 40 + from: 24 + to: 144 + value: Settings.settings.recordingFrameRate || 60 + stepSize: 1 + onValueChanged: { + Settings.settings.recordingFrameRate = value; + } + + background: Rectangle { + implicitWidth: 120 + implicitHeight: 40 + color: Theme.surfaceVariant + border.color: frameRateSpinBox.activeFocus ? Theme.accentPrimary : Theme.outline + border.width: 1 + radius: 16 + } + + contentItem: TextInput { + text: frameRateSpinBox.textFromValue(frameRateSpinBox.value, frameRateSpinBox.locale) + font.pixelSize: 13 + color: Theme.textPrimary + selectionColor: Theme.accentPrimary + selectedTextColor: Theme.onAccent + horizontalAlignment: Qt.AlignHCenter + verticalAlignment: Qt.AlignVCenter + readOnly: false + selectByMouse: true + inputMethodHints: Qt.ImhDigitsOnly + onTextChanged: { + var newValue = parseInt(text); + if (!isNaN(newValue) && newValue >= frameRateSpinBox.from && newValue <= frameRateSpinBox.to) + frameRateSpinBox.value = newValue; + + } + onEditingFinished: { + var newValue = parseInt(text); + if (isNaN(newValue) || newValue < frameRateSpinBox.from || newValue > frameRateSpinBox.to) + text = frameRateSpinBox.textFromValue(frameRateSpinBox.value, frameRateSpinBox.locale); + + } + + validator: IntValidator { + bottom: frameRateSpinBox.from + top: frameRateSpinBox.to + } + + } + + up.indicator: Rectangle { + x: parent.width - width + height: parent.height + width: height + color: "transparent" + radius: 16 + + Text { + text: "add" + font.family: "Material Symbols Outlined" + font.pixelSize: 20 + color: Theme.textPrimary + anchors.centerIn: parent + } + + } + + down.indicator: Rectangle { + x: 0 + height: parent.height + width: height + color: "transparent" + radius: 16 + + Text { + text: "remove" + font.family: "Material Symbols Outlined" + font.pixelSize: 20 + color: Theme.textPrimary + anchors.centerIn: parent + } + + } + + } + + } + + ColumnLayout { + spacing: 8 + Layout.fillWidth: true + Layout.topMargin: 8 + + Text { + text: "Audio Source" + font.pixelSize: 13 + font.bold: true + color: Theme.textPrimary + } + + Text { + text: "Audio source to capture during recording" + font.pixelSize: 12 + color: Theme.textSecondary + Layout.bottomMargin: 4 + } + + ComboBox { + id: audioSourceComboBox + + Layout.fillWidth: true + Layout.preferredHeight: 40 + model: ["default_output", "default_input", "both"] + currentIndex: model.indexOf(Settings.settings.recordingAudioSource || "default_output") + onActivated: { + Settings.settings.recordingAudioSource = model[index]; + } + + background: Rectangle { + implicitWidth: 120 + implicitHeight: 40 + color: Theme.surfaceVariant + border.color: audioSourceComboBox.activeFocus ? Theme.accentPrimary : Theme.outline + border.width: 1 + radius: 16 + } + + contentItem: Text { + leftPadding: 12 + rightPadding: audioSourceComboBox.indicator.width + audioSourceComboBox.spacing + text: { + switch (audioSourceComboBox.currentText) { + case "default_output": + return "System Audio"; + case "default_input": + return "Microphone"; + case "both": + return "System Audio + Microphone"; + default: + return audioSourceComboBox.currentText; + } + } + font.pixelSize: 13 + color: Theme.textPrimary + verticalAlignment: Text.AlignVCenter + elide: Text.ElideRight + } + + indicator: Text { + x: audioSourceComboBox.width - width - 12 + y: audioSourceComboBox.topPadding + (audioSourceComboBox.availableHeight - height) / 2 + text: "arrow_drop_down" + font.family: "Material Symbols Outlined" + font.pixelSize: 24 + color: Theme.textPrimary + } + + popup: Popup { + y: audioSourceComboBox.height + width: audioSourceComboBox.width + implicitHeight: contentItem.implicitHeight + padding: 1 + + contentItem: ListView { + clip: true + implicitHeight: contentHeight + model: audioSourceComboBox.popup.visible ? audioSourceComboBox.delegateModel : null + currentIndex: audioSourceComboBox.highlightedIndex + + ScrollIndicator.vertical: ScrollIndicator { + } + + } + + background: Rectangle { + color: Theme.surfaceVariant + border.color: Theme.outline + border.width: 1 + radius: 16 + } + + } + + delegate: ItemDelegate { + width: audioSourceComboBox.width + highlighted: audioSourceComboBox.highlightedIndex === index + + contentItem: Text { + text: { + switch (modelData) { + case "default_output": + return "System Audio"; + case "default_input": + return "Microphone"; + case "both": + return "System Audio + Microphone"; + default: + return modelData; + } + } + font.pixelSize: 13 + color: Theme.textPrimary + verticalAlignment: Text.AlignVCenter + elide: Text.ElideRight + } + + background: Rectangle { + color: highlighted ? Theme.accentPrimary.toString().replace(/#/, "#1A") : "transparent" + } + + } + + } + + } + + ColumnLayout { + spacing: 8 + Layout.fillWidth: true + Layout.topMargin: 8 + + Text { + text: "Video Quality" + font.pixelSize: 13 + font.bold: true + color: Theme.textPrimary + } + + Text { + text: "Higher quality results in larger file sizes" + font.pixelSize: 12 + color: Theme.textSecondary + Layout.bottomMargin: 4 + } + + ComboBox { + id: qualityComboBox + + Layout.fillWidth: true + Layout.preferredHeight: 40 + model: ["medium", "high", "very_high", "ultra"] + currentIndex: model.indexOf(Settings.settings.recordingQuality || "very_high") + onActivated: { + Settings.settings.recordingQuality = model[index]; + } + + background: Rectangle { + implicitWidth: 120 + implicitHeight: 40 + color: Theme.surfaceVariant + border.color: qualityComboBox.activeFocus ? Theme.accentPrimary : Theme.outline + border.width: 1 + radius: 16 + } + + contentItem: Text { + leftPadding: 12 + rightPadding: qualityComboBox.indicator.width + qualityComboBox.spacing + text: { + switch (qualityComboBox.currentText) { + case "medium": + return "Medium"; + case "high": + return "High"; + case "very_high": + return "Very High"; + case "ultra": + return "Ultra"; + default: + return qualityComboBox.currentText; + } + } + font.pixelSize: 13 + color: Theme.textPrimary + verticalAlignment: Text.AlignVCenter + elide: Text.ElideRight + } + + indicator: Text { + x: qualityComboBox.width - width - 12 + y: qualityComboBox.topPadding + (qualityComboBox.availableHeight - height) / 2 + text: "arrow_drop_down" + font.family: "Material Symbols Outlined" + font.pixelSize: 24 + color: Theme.textPrimary + } + + popup: Popup { + y: qualityComboBox.height + width: qualityComboBox.width + implicitHeight: contentItem.implicitHeight + padding: 1 + + contentItem: ListView { + clip: true + implicitHeight: contentHeight + model: qualityComboBox.popup.visible ? qualityComboBox.delegateModel : null + currentIndex: qualityComboBox.highlightedIndex + + ScrollIndicator.vertical: ScrollIndicator { + } + + } + + background: Rectangle { + color: Theme.surfaceVariant + border.color: Theme.outline + border.width: 1 + radius: 16 + } + + } + + delegate: ItemDelegate { + width: qualityComboBox.width + highlighted: qualityComboBox.highlightedIndex === index + + contentItem: Text { + text: { + switch (modelData) { + case "medium": + return "Medium"; + case "high": + return "High"; + case "very_high": + return "Very High"; + case "ultra": + return "Ultra"; + default: + return modelData; + } + } + font.pixelSize: 13 + color: Theme.textPrimary + verticalAlignment: Text.AlignVCenter + elide: Text.ElideRight + } + + background: Rectangle { + color: highlighted ? Theme.accentPrimary.toString().replace(/#/, "#1A") : "transparent" + } + + } + + } + + } + + ColumnLayout { + spacing: 8 + Layout.fillWidth: true + Layout.topMargin: 8 + + Text { + text: "Video Codec" + font.pixelSize: 13 + font.bold: true + color: Theme.textPrimary + } + + Text { + text: "Different codecs offer different compression and compatibility" + font.pixelSize: 12 + color: Theme.textSecondary + Layout.bottomMargin: 4 + } + + ComboBox { + id: codecComboBox + + Layout.fillWidth: true + Layout.preferredHeight: 40 + model: ["h264", "hevc", "av1", "vp8", "vp9"] + currentIndex: model.indexOf(Settings.settings.recordingCodec || "h264") + onActivated: { + Settings.settings.recordingCodec = model[index]; + } + + background: Rectangle { + implicitWidth: 120 + implicitHeight: 40 + color: Theme.surfaceVariant + border.color: codecComboBox.activeFocus ? Theme.accentPrimary : Theme.outline + border.width: 1 + radius: 16 + } + + contentItem: Text { + leftPadding: 12 + rightPadding: codecComboBox.indicator.width + codecComboBox.spacing + text: codecComboBox.currentText.toUpperCase() + font.pixelSize: 13 + color: Theme.textPrimary + verticalAlignment: Text.AlignVCenter + elide: Text.ElideRight + } + + indicator: Text { + x: codecComboBox.width - width - 12 + y: codecComboBox.topPadding + (codecComboBox.availableHeight - height) / 2 + text: "arrow_drop_down" + font.family: "Material Symbols Outlined" + font.pixelSize: 24 + color: Theme.textPrimary + } + + popup: Popup { + y: codecComboBox.height + width: codecComboBox.width + implicitHeight: contentItem.implicitHeight + padding: 1 + + contentItem: ListView { + clip: true + implicitHeight: contentHeight + model: codecComboBox.popup.visible ? codecComboBox.delegateModel : null + currentIndex: codecComboBox.highlightedIndex + + ScrollIndicator.vertical: ScrollIndicator { + } + + } + + background: Rectangle { + color: Theme.surfaceVariant + border.color: Theme.outline + border.width: 1 + radius: 16 + } + + } + + delegate: ItemDelegate { + width: codecComboBox.width + highlighted: codecComboBox.highlightedIndex === index + + contentItem: Text { + text: modelData.toUpperCase() + font.pixelSize: 13 + color: Theme.textPrimary + verticalAlignment: Text.AlignVCenter + elide: Text.ElideRight + } + + background: Rectangle { + color: highlighted ? Theme.accentPrimary.toString().replace(/#/, "#1A") : "transparent" + } + + } + + } + + } + + ColumnLayout { + spacing: 8 + Layout.fillWidth: true + Layout.topMargin: 8 + + Text { + text: "Audio Codec" + font.pixelSize: 13 + font.bold: true + color: Theme.textPrimary + } + + Text { + text: "Opus is recommended for best performance and smallest audio size" + font.pixelSize: 12 + color: Theme.textSecondary + Layout.bottomMargin: 4 + } + + ComboBox { + id: audioCodecComboBox + + Layout.fillWidth: true + Layout.preferredHeight: 40 + model: ["opus", "aac"] + currentIndex: model.indexOf(Settings.settings.audioCodec || "opus") + onActivated: { + Settings.settings.audioCodec = model[index]; + } + + background: Rectangle { + implicitWidth: 120 + implicitHeight: 40 + color: Theme.surfaceVariant + border.color: audioCodecComboBox.activeFocus ? Theme.accentPrimary : Theme.outline + border.width: 1 + radius: 16 + } + + contentItem: Text { + leftPadding: 12 + rightPadding: audioCodecComboBox.indicator.width + audioCodecComboBox.spacing + text: audioCodecComboBox.currentText.toUpperCase() + font.pixelSize: 13 + color: Theme.textPrimary + verticalAlignment: Text.AlignVCenter + elide: Text.ElideRight + } + + indicator: Text { + x: audioCodecComboBox.width - width - 12 + y: audioCodecComboBox.topPadding + (audioCodecComboBox.availableHeight - height) / 2 + text: "arrow_drop_down" + font.family: "Material Symbols Outlined" + font.pixelSize: 24 + color: Theme.textPrimary + } + + popup: Popup { + y: audioCodecComboBox.height + width: audioCodecComboBox.width + implicitHeight: contentItem.implicitHeight + padding: 1 + + contentItem: ListView { + clip: true + implicitHeight: contentHeight + model: audioCodecComboBox.popup.visible ? audioCodecComboBox.delegateModel : null + currentIndex: audioCodecComboBox.highlightedIndex + + ScrollIndicator.vertical: ScrollIndicator { + } + + } + + background: Rectangle { + color: Theme.surfaceVariant + border.color: Theme.outline + border.width: 1 + radius: 16 + } + + } + + delegate: ItemDelegate { + width: audioCodecComboBox.width + highlighted: audioCodecComboBox.highlightedIndex === index + + contentItem: Text { + text: modelData.toUpperCase() + font.pixelSize: 13 + color: Theme.textPrimary + verticalAlignment: Text.AlignVCenter + elide: Text.ElideRight + } + + background: Rectangle { + color: highlighted ? Theme.accentPrimary.toString().replace(/#/, "#1A") : "transparent" + } + + } + + } + + } + + ColumnLayout { + spacing: 8 + Layout.fillWidth: true + Layout.topMargin: 8 + + Text { + text: "Color Range" + font.pixelSize: 13 + font.bold: true + color: Theme.textPrimary + } + + Text { + text: "Limited is recommended for better compatibility" + font.pixelSize: 12 + color: Theme.textSecondary + Layout.bottomMargin: 4 + } + + ComboBox { + id: colorRangeComboBox + + Layout.fillWidth: true + Layout.preferredHeight: 40 + model: ["limited", "full"] + currentIndex: model.indexOf(Settings.settings.colorRange || "limited") + onActivated: { + Settings.settings.colorRange = model[index]; + } + + background: Rectangle { + implicitWidth: 120 + implicitHeight: 40 + color: Theme.surfaceVariant + border.color: colorRangeComboBox.activeFocus ? Theme.accentPrimary : Theme.outline + border.width: 1 + radius: 16 + } + + contentItem: Text { + leftPadding: 12 + rightPadding: colorRangeComboBox.indicator.width + colorRangeComboBox.spacing + text: colorRangeComboBox.currentText.charAt(0).toUpperCase() + colorRangeComboBox.currentText.slice(1) + font.pixelSize: 13 + color: Theme.textPrimary + verticalAlignment: Text.AlignVCenter + elide: Text.ElideRight + } + + indicator: Text { + x: colorRangeComboBox.width - width - 12 + y: colorRangeComboBox.topPadding + (colorRangeComboBox.availableHeight - height) / 2 + text: "arrow_drop_down" + font.family: "Material Symbols Outlined" + font.pixelSize: 24 + color: Theme.textPrimary + } + + popup: Popup { + y: colorRangeComboBox.height + width: colorRangeComboBox.width + implicitHeight: contentItem.implicitHeight + padding: 1 + + contentItem: ListView { + clip: true + implicitHeight: contentHeight + model: colorRangeComboBox.popup.visible ? colorRangeComboBox.delegateModel : null + currentIndex: colorRangeComboBox.highlightedIndex + + ScrollIndicator.vertical: ScrollIndicator { + } + + } + + background: Rectangle { + color: Theme.surfaceVariant + border.color: Theme.outline + border.width: 1 + radius: 16 + } + + } + + delegate: ItemDelegate { + width: colorRangeComboBox.width + highlighted: colorRangeComboBox.highlightedIndex === index + + contentItem: Text { + text: modelData.charAt(0).toUpperCase() + modelData.slice(1) + font.pixelSize: 13 + color: Theme.textPrimary + verticalAlignment: Text.AlignVCenter + elide: Text.ElideRight + } + + background: Rectangle { + color: highlighted ? Theme.accentPrimary.toString().replace(/#/, "#1A") : "transparent" + } + + } + + } + + } + + ColumnLayout { + spacing: 8 + Layout.fillWidth: true + Layout.topMargin: 8 + + RowLayout { + spacing: 8 + Layout.fillWidth: true + + ColumnLayout { + spacing: 4 + Layout.fillWidth: true + + Text { + text: "Show Cursor" + font.pixelSize: 13 + font.bold: true + color: Theme.textPrimary + } + + Text { + text: "Record mouse cursor in the video" + font.pixelSize: 12 + color: Theme.textSecondary + wrapMode: Text.WordWrap + Layout.fillWidth: true + } + + } + + Rectangle { + id: cursorSwitch + + width: 52 + height: 32 + radius: 16 + color: Settings.settings.showCursor ? Theme.accentPrimary : Theme.surfaceVariant + border.color: Settings.settings.showCursor ? Theme.accentPrimary : Theme.outline + border.width: 2 + + Rectangle { + id: cursorThumb + + width: 28 + height: 28 + radius: 14 + color: Theme.surface + border.color: Theme.outline + border.width: 1 + y: 2 + x: Settings.settings.showCursor ? cursorSwitch.width - width - 2 : 2 + + Behavior on x { + NumberAnimation { + duration: 200 + easing.type: Easing.OutCubic + } + + } + + } + + MouseArea { + anchors.fill: parent + cursorShape: Qt.PointingHandCursor + onClicked: { + Settings.settings.showCursor = !Settings.settings.showCursor; + } + } + + } + + } + + } + } - } - } Item { Layout.fillWidth: true Layout.preferredHeight: 24 } + } + } -} \ No newline at end of file + +} diff --git a/Widgets/SettingsWindow/Tabs/TimeWeather.qml b/Widgets/SettingsWindow/Tabs/TimeWeather.qml index e374dea..926b4c3 100644 --- a/Widgets/SettingsWindow/Tabs/TimeWeather.qml +++ b/Widgets/SettingsWindow/Tabs/TimeWeather.qml @@ -168,11 +168,23 @@ ColumnLayout { } } + Rectangle { + Layout.topMargin: 26 + Layout.bottomMargin: 18 + anchors { + top: headerArea.bottom + left: parent.left + right: parent.right + } + height: 1 + color: Theme.outline + opacity: 0.3 + } + ColumnLayout { spacing: 4 Layout.fillWidth: true - Layout.topMargin: 58 Text { text: "Weather" diff --git a/Widgets/SettingsWindow/Tabs/Wallpaper.qml b/Widgets/SettingsWindow/Tabs/Wallpaper.qml index 0453b27..cb5d964 100644 --- a/Widgets/SettingsWindow/Tabs/Wallpaper.qml +++ b/Widgets/SettingsWindow/Tabs/Wallpaper.qml @@ -1,20 +1,20 @@ import QtQuick import QtQuick.Controls import QtQuick.Layouts -import qs.Settings import qs.Components import qs.Services +import qs.Settings ColumnLayout { id: root + spacing: 0 anchors.fill: parent anchors.margins: 0 - - ScrollView { id: scrollView + Layout.fillWidth: true Layout.fillHeight: true padding: 0 @@ -36,15 +36,13 @@ ColumnLayout { spacing: 4 Layout.fillWidth: true - Text { - text: "Wallpaper" - font.pixelSize: 18 - font.bold: true - color: Theme.textPrimary - Layout.bottomMargin: 8 - } - - + Text { + text: "Wallpaper" + font.pixelSize: 18 + font.bold: true + color: Theme.textPrimary + Layout.bottomMargin: 8 + } // Wallpaper Settings Category ColumnLayout { @@ -93,6 +91,7 @@ ColumnLayout { TextInput { id: folderInput + anchors.fill: parent anchors.leftMargin: 12 anchors.rightMargin: 12 @@ -117,25 +116,38 @@ ColumnLayout { cursorShape: Qt.IBeamCursor onClicked: folderInput.forceActiveFocus() } + } + } + } + } - } + Rectangle { + Layout.topMargin: 26 + Layout.bottomMargin: 18 + anchors { + top: headerArea.bottom + left: parent.left + right: parent.right + } + height: 1 + color: Theme.outline + opacity: 0.3 + } - - ColumnLayout { - spacing: 4 - Layout.fillWidth: true - Layout.topMargin: 58 + ColumnLayout { + spacing: 4 + Layout.fillWidth: true - Text { - text: "Automation" - font.pixelSize: 18 - font.bold: true - color: Theme.textPrimary - Layout.bottomMargin: 8 - } + Text { + text: "Automation" + font.pixelSize: 18 + font.bold: true + color: Theme.textPrimary + Layout.bottomMargin: 8 + } // Random Wallpaper ColumnLayout { @@ -165,10 +177,12 @@ ColumnLayout { wrapMode: Text.WordWrap Layout.fillWidth: true } + } Rectangle { id: randomWallpaperSwitch + width: 52 height: 32 radius: 16 @@ -178,6 +192,7 @@ ColumnLayout { Rectangle { id: randomWallpaperThumb + width: 28 height: 28 radius: 14 @@ -192,7 +207,9 @@ ColumnLayout { duration: 200 easing.type: Easing.OutCubic } + } + } MouseArea { @@ -202,8 +219,11 @@ ColumnLayout { Settings.settings.randomWallpaper = !Settings.settings.randomWallpaper; } } + } + } + } // Use Wallpaper Theme @@ -234,10 +254,12 @@ ColumnLayout { wrapMode: Text.WordWrap Layout.fillWidth: true } + } Rectangle { id: wallpaperThemeSwitch + width: 52 height: 32 radius: 16 @@ -247,6 +269,7 @@ ColumnLayout { Rectangle { id: wallpaperThemeThumb + width: 28 height: 28 radius: 14 @@ -261,7 +284,9 @@ ColumnLayout { duration: 200 easing.type: Easing.OutCubic } + } + } MouseArea { @@ -271,8 +296,11 @@ ColumnLayout { Settings.settings.useWallpaperTheme = !Settings.settings.useWallpaperTheme; } } + } + } + } // Wallpaper Interval @@ -308,10 +336,12 @@ ColumnLayout { Item { Layout.fillWidth: true } + } Slider { id: intervalSlider + Layout.fillWidth: true from: 10 to: 900 @@ -338,6 +368,7 @@ ColumnLayout { color: Theme.accentPrimary radius: 2 } + } handle: Rectangle { @@ -350,95 +381,117 @@ ColumnLayout { border.color: Theme.accentPrimary border.width: 2 } + } + } + } - } + } - - ColumnLayout { - spacing: 4 - Layout.fillWidth: true - Layout.topMargin: 58 + Rectangle { + Layout.topMargin: 26 + Layout.bottomMargin: 18 + anchors { + top: headerArea.bottom + left: parent.left + right: parent.right + } + height: 1 + color: Theme.outline + opacity: 0.3 + } - Text { - text: "SWWW" - font.pixelSize: 18 - font.bold: true - color: Theme.textPrimary - Layout.bottomMargin: 8 - } + ColumnLayout { + spacing: 4 + Layout.fillWidth: true - // Use SWWW - ColumnLayout { + Text { + text: "SWWW" + font.pixelSize: 18 + font.bold: true + color: Theme.textPrimary + Layout.bottomMargin: 8 + } + + // Use SWWW + ColumnLayout { + spacing: 8 + Layout.fillWidth: true + Layout.topMargin: 8 + + RowLayout { spacing: 8 Layout.fillWidth: true - Layout.topMargin: 8 - RowLayout { - spacing: 8 + ColumnLayout { + spacing: 4 Layout.fillWidth: true - ColumnLayout { - spacing: 4 - Layout.fillWidth: true - - Text { - text: "Use SWWW" - font.pixelSize: 13 - font.bold: true - color: Theme.textPrimary - } - - Text { - text: "Use SWWW daemon for advanced wallpaper management" - font.pixelSize: 12 - color: Theme.textSecondary - wrapMode: Text.WordWrap - Layout.fillWidth: true - } + Text { + text: "Use SWWW" + font.pixelSize: 13 + font.bold: true + color: Theme.textPrimary } + Text { + text: "Use SWWW daemon for advanced wallpaper management" + font.pixelSize: 12 + color: Theme.textSecondary + wrapMode: Text.WordWrap + Layout.fillWidth: true + } + + } + + Rectangle { + id: swwwSwitch + + width: 52 + height: 32 + radius: 16 + color: Settings.settings.useSWWW ? Theme.accentPrimary : Theme.surfaceVariant + border.color: Settings.settings.useSWWW ? Theme.accentPrimary : Theme.outline + border.width: 2 + Rectangle { - id: swwwSwitch - width: 52 - height: 32 - radius: 16 - color: Settings.settings.useSWWW ? Theme.accentPrimary : Theme.surfaceVariant - border.color: Settings.settings.useSWWW ? Theme.accentPrimary : Theme.outline - border.width: 2 + id: swwwThumb - Rectangle { - id: swwwThumb - width: 28 - height: 28 - radius: 14 - color: Theme.surface - border.color: Theme.outline - border.width: 1 - y: 2 - x: Settings.settings.useSWWW ? swwwSwitch.width - width - 2 : 2 + width: 28 + height: 28 + radius: 14 + color: Theme.surface + border.color: Theme.outline + border.width: 1 + y: 2 + x: Settings.settings.useSWWW ? swwwSwitch.width - width - 2 : 2 - Behavior on x { - NumberAnimation { - duration: 200 - easing.type: Easing.OutCubic - } + Behavior on x { + NumberAnimation { + duration: 200 + easing.type: Easing.OutCubic } + } - MouseArea { - anchors.fill: parent - cursorShape: Qt.PointingHandCursor - onClicked: { - Settings.settings.useSWWW = !Settings.settings.useSWWW; - } + } + + MouseArea { + anchors.fill: parent + cursorShape: Qt.PointingHandCursor + onClicked: { + Settings.settings.useSWWW = !Settings.settings.useSWWW; } } + } + } + } + // SWWW Settings (only visible when useSWWW is enabled) ColumnLayout { spacing: 8 @@ -476,6 +529,7 @@ ColumnLayout { ComboBox { id: resizeComboBox + anchors.fill: parent anchors.leftMargin: 12 anchors.rightMargin: 12 @@ -511,7 +565,9 @@ ColumnLayout { model: resizeComboBox.popup.visible ? resizeComboBox.delegateModel : null currentIndex: resizeComboBox.highlightedIndex - ScrollIndicator.vertical: ScrollIndicator { } + ScrollIndicator.vertical: ScrollIndicator { + } + } background: Rectangle { @@ -520,10 +576,13 @@ ColumnLayout { border.width: 1 radius: 8 } + } delegate: ItemDelegate { width: resizeComboBox.width + highlighted: resizeComboBox.highlightedIndex === index + contentItem: Text { text: modelData color: Theme.textPrimary @@ -531,13 +590,17 @@ ColumnLayout { verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignLeft } - highlighted: resizeComboBox.highlightedIndex === index + background: Rectangle { color: parent.highlighted ? Theme.accentPrimary : "transparent" } + } + } + } + } // Transition Type @@ -571,6 +634,7 @@ ColumnLayout { ComboBox { id: transitionTypeComboBox + anchors.fill: parent anchors.leftMargin: 12 anchors.rightMargin: 12 @@ -606,7 +670,9 @@ ColumnLayout { model: transitionTypeComboBox.popup.visible ? transitionTypeComboBox.delegateModel : null currentIndex: transitionTypeComboBox.highlightedIndex - ScrollIndicator.vertical: ScrollIndicator { } + ScrollIndicator.vertical: ScrollIndicator { + } + } background: Rectangle { @@ -615,10 +681,13 @@ ColumnLayout { border.width: 1 radius: 8 } + } delegate: ItemDelegate { width: transitionTypeComboBox.width + highlighted: transitionTypeComboBox.highlightedIndex === index + contentItem: Text { text: modelData color: Theme.textPrimary @@ -626,13 +695,17 @@ ColumnLayout { verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignLeft } - highlighted: transitionTypeComboBox.highlightedIndex === index + background: Rectangle { color: parent.highlighted ? Theme.accentPrimary : "transparent" } + } + } + } + } // Transition FPS @@ -668,10 +741,12 @@ ColumnLayout { Item { Layout.fillWidth: true } + } Slider { id: fpsSlider + Layout.fillWidth: true from: 30 to: 500 @@ -698,6 +773,7 @@ ColumnLayout { color: Theme.accentPrimary radius: 2 } + } handle: Rectangle { @@ -710,7 +786,9 @@ ColumnLayout { border.color: Theme.accentPrimary border.width: 2 } + } + } // Transition Duration @@ -746,10 +824,12 @@ ColumnLayout { Item { Layout.fillWidth: true } + } Slider { id: durationSlider + Layout.fillWidth: true from: 0.25 to: 10 @@ -776,6 +856,7 @@ ColumnLayout { color: Theme.accentPrimary radius: 2 } + } handle: Rectangle { @@ -788,15 +869,22 @@ ColumnLayout { border.color: Theme.accentPrimary border.width: 2 } + } + } + } + } + } + } Item { Layout.fillWidth: true Layout.fillHeight: true } -} \ No newline at end of file + +}