Settings rework...
This commit is contained in:
parent
74b233798d
commit
fb68300746
63 changed files with 7139 additions and 1026 deletions
|
|
@ -1,13 +1,15 @@
|
|||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Effects
|
||||
import QtQuick.Controls
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import Quickshell.Widgets
|
||||
import qs.Components
|
||||
import qs.Settings
|
||||
|
||||
Rectangle {
|
||||
id: profileSettingsCard
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 650
|
||||
Layout.preferredHeight: 690
|
||||
color: Theme.surface
|
||||
radius: 18
|
||||
|
||||
|
|
@ -53,47 +55,23 @@ Rectangle {
|
|||
spacing: 8
|
||||
Layout.fillWidth: true
|
||||
|
||||
// Profile image
|
||||
Rectangle {
|
||||
width: 40
|
||||
height: 40
|
||||
radius: 20
|
||||
color: Theme.surfaceVariant
|
||||
border.color: profileImageInput.activeFocus ? Theme.accentPrimary : Theme.outline
|
||||
border.width: 1
|
||||
width: 48
|
||||
height: 48
|
||||
radius: 24
|
||||
|
||||
Image {
|
||||
id: avatarImage
|
||||
// Border
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
anchors.margins: 2
|
||||
source: Settings.settings.profileImage
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
visible: false
|
||||
asynchronous: true
|
||||
cache: false
|
||||
sourceSize.width: 64
|
||||
sourceSize.height: 64
|
||||
}
|
||||
|
||||
OpacityMask {
|
||||
anchors.fill: avatarImage
|
||||
source: avatarImage
|
||||
maskSource: Rectangle {
|
||||
width: avatarImage.width
|
||||
height: avatarImage.height
|
||||
radius: avatarImage.width / 2
|
||||
visible: false
|
||||
}
|
||||
visible: Settings.settings.profileImage !== ""
|
||||
color: "transparent"
|
||||
radius: 24
|
||||
border.color: profileImageInput.activeFocus ? Theme.accentPrimary : Theme.outline
|
||||
border.width: 2
|
||||
z: 2
|
||||
}
|
||||
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
text: "person"
|
||||
font.family: "Material Symbols Outlined"
|
||||
font.pixelSize: 20
|
||||
color: Theme.accentPrimary
|
||||
visible: Settings.settings.profileImage === ""
|
||||
}
|
||||
Avatar {}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
|
|
@ -121,7 +99,7 @@ Rectangle {
|
|||
activeFocusOnTab: true
|
||||
inputMethodHints: Qt.ImhUrlCharactersOnly
|
||||
onTextChanged: {
|
||||
Settings.settings.profileImage = text
|
||||
Settings.settings.profileImage = text;
|
||||
}
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
|
|
@ -182,7 +160,7 @@ Rectangle {
|
|||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
Settings.settings.showActiveWindowIcon = !Settings.settings.showActiveWindowIcon
|
||||
Settings.settings.showActiveWindowIcon = !Settings.settings.showActiveWindowIcon;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -237,7 +215,7 @@ Rectangle {
|
|||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
Settings.settings.showSystemInfoInBar = !Settings.settings.showSystemInfoInBar
|
||||
Settings.settings.showSystemInfoInBar = !Settings.settings.showSystemInfoInBar;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -292,7 +270,7 @@ Rectangle {
|
|||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
Settings.settings.showCorners = !Settings.settings.showCorners
|
||||
Settings.settings.showCorners = !Settings.settings.showCorners;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -347,7 +325,62 @@ Rectangle {
|
|||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
Settings.settings.showTaskbar = !Settings.settings.showTaskbar
|
||||
Settings.settings.showTaskbar = !Settings.settings.showTaskbar;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Show Dock Setting
|
||||
RowLayout {
|
||||
spacing: 8
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 8
|
||||
|
||||
Text {
|
||||
text: "Show Dock"
|
||||
font.pixelSize: 13
|
||||
font.bold: true
|
||||
color: Theme.textPrimary
|
||||
}
|
||||
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: dockSwitch
|
||||
width: 52
|
||||
height: 32
|
||||
radius: 16
|
||||
color: Settings.settings.showDock ? Theme.accentPrimary : Theme.surfaceVariant
|
||||
border.color: Settings.settings.showDock ? Theme.accentPrimary : Theme.outline
|
||||
border.width: 2
|
||||
|
||||
Rectangle {
|
||||
id: dockThumb
|
||||
width: 28
|
||||
height: 28
|
||||
radius: 14
|
||||
color: Theme.surface
|
||||
border.color: Theme.outline
|
||||
border.width: 1
|
||||
y: 2
|
||||
x: Settings.settings.showDock ? taskbarSwitch.width - width - 2 : 2
|
||||
|
||||
Behavior on x {
|
||||
NumberAnimation {
|
||||
duration: 200
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
Settings.settings.showDock = !Settings.settings.showDock;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -402,7 +435,7 @@ Rectangle {
|
|||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
Settings.settings.showMediaInBar = !Settings.settings.showMediaInBar
|
||||
Settings.settings.showMediaInBar = !Settings.settings.showMediaInBar;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -457,7 +490,7 @@ Rectangle {
|
|||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
Settings.settings.dimPanels = !Settings.settings.dimPanels
|
||||
Settings.settings.dimPanels = !Settings.settings.dimPanels;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -596,7 +629,7 @@ Rectangle {
|
|||
activeFocusOnTab: true
|
||||
inputMethodHints: Qt.ImhUrlCharactersOnly
|
||||
onTextChanged: {
|
||||
Settings.settings.videoPath = text
|
||||
Settings.settings.videoPath = text;
|
||||
}
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
|
|
@ -607,4 +640,4 @@ Rectangle {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ PanelWindow {
|
|||
Rectangle {
|
||||
anchors.fill: parent
|
||||
color: Theme.backgroundPrimary
|
||||
radius: 24
|
||||
radius: 20
|
||||
z: 0
|
||||
|
||||
ColumnLayout {
|
||||
|
|
@ -31,7 +31,6 @@ PanelWindow {
|
|||
anchors.leftMargin: 32
|
||||
anchors.rightMargin: 32
|
||||
anchors.topMargin: 32
|
||||
|
||||
spacing: 24
|
||||
|
||||
// Header
|
||||
|
|
@ -85,14 +84,14 @@ PanelWindow {
|
|||
}
|
||||
}
|
||||
|
||||
// Tabs bar (moved here)
|
||||
// Tabs bar (reordered)
|
||||
Tabs {
|
||||
id: settingsTabs
|
||||
Layout.fillWidth: true
|
||||
tabsModel: [
|
||||
{ icon: "cloud", label: "Weather" },
|
||||
{ icon: "settings", label: "System" },
|
||||
{ icon: "wallpaper", label: "Wallpaper" }
|
||||
{ icon: "wallpaper", label: "Wallpaper" },
|
||||
{ icon: "cloud", label: "Weather" }
|
||||
]
|
||||
}
|
||||
|
||||
|
|
@ -115,7 +114,32 @@ PanelWindow {
|
|||
id: tabContentLoader
|
||||
anchors.top: parent.top
|
||||
width: parent.width
|
||||
sourceComponent: settingsTabs.currentIndex === 0 ? weatherTab : settingsTabs.currentIndex === 1 ? systemTab : wallpaperTab
|
||||
sourceComponent: settingsTabs.currentIndex === 0 ? systemTab : settingsTabs.currentIndex === 1 ? wallpaperTab : weatherTab
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: systemTab
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
ProfileSettings {
|
||||
Layout.fillWidth: true
|
||||
Layout.alignment: Qt.AlignTop
|
||||
anchors.margins: 16
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: wallpaperTab
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
WallpaperSettings {
|
||||
id: wallpaperSettings
|
||||
Layout.fillWidth: true
|
||||
Layout.alignment: Qt.AlignTop
|
||||
anchors.margins: 16
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -130,29 +154,6 @@ PanelWindow {
|
|||
}
|
||||
}
|
||||
}
|
||||
Component {
|
||||
id: systemTab
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
ProfileSettings {
|
||||
Layout.fillWidth: true
|
||||
Layout.alignment: Qt.AlignTop
|
||||
anchors.margins: 16
|
||||
}
|
||||
}
|
||||
}
|
||||
Component {
|
||||
id: wallpaperTab
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
WallpaperSettings {
|
||||
id: wallpaperSettings
|
||||
Layout.fillWidth: true
|
||||
Layout.alignment: Qt.AlignTop
|
||||
anchors.margins: 16
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -160,7 +161,6 @@ PanelWindow {
|
|||
// Function to open the modal and initialize temp values
|
||||
function openSettings() {
|
||||
visible = true;
|
||||
// Force focus on the text input after a short delay
|
||||
focusTimer.start();
|
||||
}
|
||||
|
||||
|
|
@ -174,20 +174,16 @@ PanelWindow {
|
|||
interval: 100
|
||||
repeat: false
|
||||
onTriggered: {
|
||||
if (visible)
|
||||
// Focus will be handled by the individual components
|
||||
{}
|
||||
}
|
||||
}
|
||||
|
||||
// Release focus when modal becomes invisible
|
||||
onVisibleChanged: {
|
||||
if (!visible) {
|
||||
// Focus will be handled by the individual components
|
||||
if (typeof weather !== 'undefined' && weather !== null && weather.fetchCityWeather) {
|
||||
weather.fetchCityWeather();
|
||||
if (visible) {
|
||||
// Focus logic can go here if needed
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Refresh weather data when hidden
|
||||
onVisibleChanged: {
|
||||
if (!visible && typeof weather !== 'undefined' && weather !== null && weather.fetchCityWeather) {
|
||||
weather.fetchCityWeather();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import qs.Settings
|
||||
|
||||
Rectangle {
|
||||
id: wallpaperSettingsCard
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 720
|
||||
Layout.preferredHeight: Settings.settings.useSWWW ? 720 : 360
|
||||
color: Theme.surface
|
||||
radius: 18
|
||||
|
||||
|
|
@ -15,25 +16,28 @@ Rectangle {
|
|||
anchors.margins: 18
|
||||
spacing: 12
|
||||
|
||||
// Header
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
spacing: 12
|
||||
Text {
|
||||
text: "image"
|
||||
font.family: "Material Symbols Outlined"
|
||||
font.pixelSize: 20
|
||||
color: Theme.accentPrimary
|
||||
}
|
||||
Text {
|
||||
text: "Wallpaper Settings"
|
||||
font.family: Theme.fontFamily
|
||||
font.pixelSize: 16
|
||||
font.bold: true
|
||||
color: Theme.textPrimary
|
||||
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
spacing: 12
|
||||
|
||||
Text {
|
||||
text: "image"
|
||||
font.family: "Material Symbols Outlined"
|
||||
font.pixelSize: 20
|
||||
color: Theme.accentPrimary
|
||||
}
|
||||
|
||||
Text {
|
||||
text: "Wallpaper Settings"
|
||||
font.family: Theme.fontFamily
|
||||
font.pixelSize: 16
|
||||
font.bold: true
|
||||
color: Theme.textPrimary
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ColumnLayout {
|
||||
spacing: 8
|
||||
|
|
@ -47,7 +51,7 @@ Rectangle {
|
|||
color: Theme.textPrimary
|
||||
}
|
||||
|
||||
// Folder Path Input
|
||||
|
||||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 40
|
||||
|
|
@ -55,8 +59,10 @@ Rectangle {
|
|||
color: Theme.surfaceVariant
|
||||
border.color: folderInput.activeFocus ? Theme.accentPrimary : Theme.outline
|
||||
border.width: 1
|
||||
|
||||
TextInput {
|
||||
id: folderInput
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
|
|
@ -77,72 +83,22 @@ Rectangle {
|
|||
onTextChanged: {
|
||||
Settings.settings.wallpaperFolder = text;
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.IBeamCursor
|
||||
onClicked: folderInput.forceActiveFocus()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Use SWWW Setting
|
||||
RowLayout {
|
||||
spacing: 8
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 8
|
||||
|
||||
Text {
|
||||
text: "Use SWWW"
|
||||
font.pixelSize: 13
|
||||
font.bold: true
|
||||
color: Theme.textPrimary
|
||||
}
|
||||
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
// Custom Material 3 Switch
|
||||
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: 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
|
||||
|
||||
Behavior on x {
|
||||
NumberAnimation {
|
||||
duration: 200
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
Settings.settings.useSWWW = !Settings.settings.useSWWW;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Random Wallpaper Setting
|
||||
RowLayout {
|
||||
spacing: 8
|
||||
Layout.fillWidth: true
|
||||
|
|
@ -162,6 +118,7 @@ Rectangle {
|
|||
// Custom Material 3 Switch
|
||||
Rectangle {
|
||||
id: randomWallpaperSwitch
|
||||
|
||||
width: 52
|
||||
height: 32
|
||||
radius: 16
|
||||
|
|
@ -171,6 +128,7 @@ Rectangle {
|
|||
|
||||
Rectangle {
|
||||
id: randomWallpaperThumb
|
||||
|
||||
width: 28
|
||||
height: 28
|
||||
radius: 14
|
||||
|
|
@ -185,7 +143,9 @@ Rectangle {
|
|||
duration: 200
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
|
|
@ -195,10 +155,12 @@ Rectangle {
|
|||
Settings.settings.randomWallpaper = !Settings.settings.randomWallpaper;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Use Wallpaper Theme Setting
|
||||
|
||||
RowLayout {
|
||||
spacing: 8
|
||||
Layout.fillWidth: true
|
||||
|
|
@ -218,6 +180,7 @@ Rectangle {
|
|||
// Custom Material 3 Switch
|
||||
Rectangle {
|
||||
id: wallpaperThemeSwitch
|
||||
|
||||
width: 52
|
||||
height: 32
|
||||
radius: 16
|
||||
|
|
@ -227,6 +190,7 @@ Rectangle {
|
|||
|
||||
Rectangle {
|
||||
id: wallpaperThemeThumb
|
||||
|
||||
width: 28
|
||||
height: 28
|
||||
radius: 14
|
||||
|
|
@ -241,7 +205,9 @@ Rectangle {
|
|||
duration: 200
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
|
|
@ -251,10 +217,12 @@ Rectangle {
|
|||
Settings.settings.useWallpaperTheme = !Settings.settings.useWallpaperTheme;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Wallpaper Interval Setting
|
||||
|
||||
ColumnLayout {
|
||||
spacing: 12
|
||||
Layout.fillWidth: true
|
||||
|
|
@ -262,6 +230,7 @@ Rectangle {
|
|||
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
|
||||
Text {
|
||||
text: "Wallpaper Interval (seconds)"
|
||||
font.pixelSize: 13
|
||||
|
|
@ -278,16 +247,21 @@ Rectangle {
|
|||
font.pixelSize: 13
|
||||
color: Theme.textPrimary
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Slider {
|
||||
id: intervalSlider
|
||||
|
||||
Layout.fillWidth: true
|
||||
from: 10
|
||||
to: 900
|
||||
stepSize: 10
|
||||
value: Settings.settings.wallpaperInterval
|
||||
snapMode: Slider.SnapAlways
|
||||
onMoved: {
|
||||
Settings.settings.wallpaperInterval = Math.round(value);
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
x: intervalSlider.leftPadding
|
||||
|
|
@ -305,6 +279,7 @@ Rectangle {
|
|||
color: Theme.accentPrimary
|
||||
radius: 2
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
handle: Rectangle {
|
||||
|
|
@ -318,17 +293,78 @@ Rectangle {
|
|||
border.width: 2
|
||||
}
|
||||
|
||||
onMoved: {
|
||||
Settings.settings.wallpaperInterval = Math.round(value);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Resize Mode Setting
|
||||
|
||||
RowLayout {
|
||||
spacing: 8
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 8
|
||||
|
||||
Text {
|
||||
text: "Use SWWW"
|
||||
font.pixelSize: 13
|
||||
font.bold: true
|
||||
color: Theme.textPrimary
|
||||
}
|
||||
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
// Custom Material 3 Switch
|
||||
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: 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
|
||||
|
||||
Behavior on x {
|
||||
NumberAnimation {
|
||||
duration: 200
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
Settings.settings.useSWWW = !Settings.settings.useSWWW;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
ColumnLayout {
|
||||
spacing: 12
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 16
|
||||
visible: Settings.settings.useSWWW
|
||||
|
||||
Text {
|
||||
text: "Resize Mode"
|
||||
|
|
@ -339,10 +375,14 @@ Rectangle {
|
|||
|
||||
ComboBox {
|
||||
id: resizeComboBox
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 40
|
||||
model: ["no", "crop", "fit", "stretch"]
|
||||
currentIndex: model.indexOf(Settings.settings.wallpaperResize)
|
||||
onActivated: {
|
||||
Settings.settings.wallpaperResize = model[index];
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
implicitWidth: 120
|
||||
|
|
@ -385,7 +425,9 @@ Rectangle {
|
|||
model: resizeComboBox.popup.visible ? resizeComboBox.delegateModel : null
|
||||
currentIndex: resizeComboBox.highlightedIndex
|
||||
|
||||
ScrollIndicator.vertical: ScrollIndicator {}
|
||||
ScrollIndicator.vertical: ScrollIndicator {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
|
|
@ -394,10 +436,13 @@ Rectangle {
|
|||
border.width: 1
|
||||
radius: 16
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
delegate: ItemDelegate {
|
||||
width: resizeComboBox.width
|
||||
highlighted: resizeComboBox.highlightedIndex === index
|
||||
|
||||
contentItem: Text {
|
||||
text: modelData
|
||||
font.family: Theme.fontFamily
|
||||
|
|
@ -406,24 +451,23 @@ Rectangle {
|
|||
verticalAlignment: Text.AlignVCenter
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
highlighted: resizeComboBox.highlightedIndex === index
|
||||
|
||||
background: Rectangle {
|
||||
color: highlighted ? Theme.accentPrimary.toString().replace(/#/, "#1A") : "transparent"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
onActivated: {
|
||||
Settings.settings.wallpaperResize = model[index];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Transition Type Setting
|
||||
|
||||
ColumnLayout {
|
||||
spacing: 12
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 16
|
||||
visible: Settings.settings.useSWWW
|
||||
|
||||
Text {
|
||||
text: "Transition Type"
|
||||
|
|
@ -434,10 +478,14 @@ Rectangle {
|
|||
|
||||
ComboBox {
|
||||
id: transitionTypeComboBox
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 40
|
||||
model: ["none", "simple", "fade", "left", "right", "top", "bottom", "wipe", "wave", "grow", "center", "any", "outer", "random"]
|
||||
currentIndex: model.indexOf(Settings.settings.transitionType)
|
||||
onActivated: {
|
||||
Settings.settings.transitionType = model[index];
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
implicitWidth: 120
|
||||
|
|
@ -480,7 +528,9 @@ Rectangle {
|
|||
model: transitionTypeComboBox.popup.visible ? transitionTypeComboBox.delegateModel : null
|
||||
currentIndex: transitionTypeComboBox.highlightedIndex
|
||||
|
||||
ScrollIndicator.vertical: ScrollIndicator {}
|
||||
ScrollIndicator.vertical: ScrollIndicator {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
|
|
@ -489,10 +539,13 @@ Rectangle {
|
|||
border.width: 1
|
||||
radius: 16
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
delegate: ItemDelegate {
|
||||
width: transitionTypeComboBox.width
|
||||
highlighted: transitionTypeComboBox.highlightedIndex === index
|
||||
|
||||
contentItem: Text {
|
||||
text: modelData
|
||||
font.family: Theme.fontFamily
|
||||
|
|
@ -501,27 +554,27 @@ Rectangle {
|
|||
verticalAlignment: Text.AlignVCenter
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
highlighted: transitionTypeComboBox.highlightedIndex === index
|
||||
|
||||
background: Rectangle {
|
||||
color: highlighted ? Theme.accentPrimary.toString().replace(/#/, "#1A") : "transparent"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
onActivated: {
|
||||
Settings.settings.transitionType = model[index];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Transition FPS Setting
|
||||
|
||||
ColumnLayout {
|
||||
spacing: 12
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 16
|
||||
visible: Settings.settings.useSWWW
|
||||
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
|
||||
Text {
|
||||
text: "Transition FPS"
|
||||
font.pixelSize: 13
|
||||
|
|
@ -538,16 +591,21 @@ Rectangle {
|
|||
font.pixelSize: 13
|
||||
color: Theme.textPrimary
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Slider {
|
||||
id: fpsSlider
|
||||
|
||||
Layout.fillWidth: true
|
||||
from: 30
|
||||
to: 500
|
||||
stepSize: 5
|
||||
value: Settings.settings.transitionFps
|
||||
snapMode: Slider.SnapAlways
|
||||
onMoved: {
|
||||
Settings.settings.transitionFps = Math.round(value);
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
x: fpsSlider.leftPadding
|
||||
|
|
@ -565,6 +623,7 @@ Rectangle {
|
|||
color: Theme.accentPrimary
|
||||
radius: 2
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
handle: Rectangle {
|
||||
|
|
@ -578,20 +637,20 @@ Rectangle {
|
|||
border.width: 2
|
||||
}
|
||||
|
||||
onMoved: {
|
||||
Settings.settings.transitionFps = Math.round(value);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Transition Duration Setting
|
||||
|
||||
ColumnLayout {
|
||||
spacing: 12
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 16
|
||||
|
||||
visible: Settings.settings.useSWWW
|
||||
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
|
||||
Text {
|
||||
text: "Transition Duration (seconds)"
|
||||
font.pixelSize: 13
|
||||
|
|
@ -608,16 +667,21 @@ Rectangle {
|
|||
font.pixelSize: 13
|
||||
color: Theme.textPrimary
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Slider {
|
||||
id: durationSlider
|
||||
|
||||
Layout.fillWidth: true
|
||||
from: 0.250
|
||||
to: 10.0
|
||||
stepSize: 0.050
|
||||
from: 0.25
|
||||
to: 10
|
||||
stepSize: 0.05
|
||||
value: Settings.settings.transitionDuration
|
||||
snapMode: Slider.SnapAlways
|
||||
onMoved: {
|
||||
Settings.settings.transitionDuration = value;
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
x: durationSlider.leftPadding
|
||||
|
|
@ -635,6 +699,7 @@ Rectangle {
|
|||
color: Theme.accentPrimary
|
||||
radius: 2
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
handle: Rectangle {
|
||||
|
|
@ -648,10 +713,10 @@ Rectangle {
|
|||
border.width: 2
|
||||
}
|
||||
|
||||
onMoved: {
|
||||
Settings.settings.transitionDuration = value;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ Rectangle {
|
|||
anchors.margins: 18
|
||||
spacing: 12
|
||||
|
||||
// Weather Settings Header
|
||||
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
spacing: 12
|
||||
|
|
@ -36,7 +36,7 @@ Rectangle {
|
|||
}
|
||||
}
|
||||
|
||||
// Weather City Setting
|
||||
|
||||
ColumnLayout {
|
||||
spacing: 8
|
||||
Layout.fillWidth: true
|
||||
|
|
@ -93,7 +93,7 @@ Rectangle {
|
|||
}
|
||||
}
|
||||
|
||||
// Temperature Unit Setting
|
||||
|
||||
RowLayout {
|
||||
spacing: 12
|
||||
Layout.fillWidth: true
|
||||
|
|
@ -160,7 +160,7 @@ Rectangle {
|
|||
|
||||
}
|
||||
|
||||
// Random Wallpaper Setting
|
||||
|
||||
RowLayout {
|
||||
spacing: 8
|
||||
Layout.fillWidth: true
|
||||
|
|
@ -216,7 +216,7 @@ Rectangle {
|
|||
}
|
||||
}
|
||||
|
||||
// Reverse Day Month Setting
|
||||
|
||||
RowLayout {
|
||||
spacing: 8
|
||||
Layout.fillWidth: true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue