From e85fafcd80f74045346a8eb26ecc9eed6f35b78d Mon Sep 17 00:00:00 2001 From: Ly-sec Date: Thu, 31 Jul 2025 15:51:32 +0200 Subject: [PATCH] Edit Workspace colors, make settings panels more uniform, update README.md --- Bar/Modules/Workspace.qml | 9 +- README.md | 8 + Widgets/Sidebar/Config/ProfileSettings.qml | 1148 +++++++++--------- Widgets/Sidebar/Config/WallpaperSettings.qml | 46 +- Widgets/Sidebar/Config/WeatherSettings.qml | 2 +- 5 files changed, 587 insertions(+), 626 deletions(-) diff --git a/Bar/Modules/Workspace.qml b/Bar/Modules/Workspace.qml index 8140d43..40a4023 100644 --- a/Bar/Modules/Workspace.qml +++ b/Bar/Modules/Workspace.qml @@ -170,15 +170,12 @@ Item { return Theme.accentPrimary; if (model.isUrgent) return Theme.error; - if (model.isActive) - return Theme.accentSecondary; - if (model.isOccupied) - return Qt.darker(Theme.accentSecondary, 1.5); - + if (model.isActive || model.isOccupied) + return Theme.accentTertiary; if (model.isUrgent) return Theme.error; - return Theme.surfaceVariant.lighter(1.5); + return Theme.outline; } scale: model.isFocused ? 1.0 : 0.9 z: 0 diff --git a/README.md b/README.md index 8b6e27f..f682de1 100644 --- a/README.md +++ b/README.md @@ -208,6 +208,14 @@ Contributions are welcome! Feel free to open issues or submit pull requests. --- +#### Donation + +--- +While I actually didn't want to accept donations, more and more people are asking to donate so... I don't know, if you really feel like donating then I obviously highly appreciate it but **PLEASE** never feel forced to donate or anything. It won't change how I work on Noctalia, it's a project that I work on for fun in the end. + +[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/R6R01IX85B) +--- + ## License This project is licensed under the terms of the [MIT License](./LICENSE). diff --git a/Widgets/Sidebar/Config/ProfileSettings.qml b/Widgets/Sidebar/Config/ProfileSettings.qml index 0171665..c591146 100644 --- a/Widgets/Sidebar/Config/ProfileSettings.qml +++ b/Widgets/Sidebar/Config/ProfileSettings.qml @@ -10,620 +10,108 @@ Rectangle { Layout.preferredHeight: 580 color: Theme.surface radius: 18 - border.color: "transparent" - border.width: 0 - Layout.bottomMargin: 16 - ScrollView { - id: scrollView + ColumnLayout { anchors.fill: parent - clip: true - padding: 12 - - ScrollBar.vertical: ScrollBar { - id: scrollBar - policy: ScrollBar.AsNeeded - visible: size < 1.0 - opacity: (active || hovered) && size < 1.0 ? 1 : 0 - width: 8 - padding: 0 - - background: Rectangle { - color: "transparent" + anchors.margins: 18 + spacing: 12 + + // Header + RowLayout { + Layout.fillWidth: true + spacing: 12 + Text { + text: "settings" + font.family: "Material Symbols Outlined" + font.pixelSize: 20 + color: Theme.accentPrimary } - - contentItem: Rectangle { - implicitWidth: 6 - radius: 3 - color: scrollBar.hovered ? Theme.accentPrimary : Qt.darker(Theme.surfaceVariant, 1.2) - - Behavior on opacity { - OpacityAnimator { duration: 200 } - } - } - - Behavior on opacity { - OpacityAnimator { duration: 300 } + Text { + text: "Profile Settings" + font.family: Theme.fontFamily + font.pixelSize: 16 + font.bold: true + color: Theme.textPrimary + Layout.fillWidth: true } } + // Profile Image Input Section ColumnLayout { - id: mainLayout - width: scrollView.availableWidth - (scrollBar.visible ? scrollBar.width + 4 : 0) - spacing: 12 - anchors.margins: 18 + spacing: 8 + Layout.fillWidth: true - RowLayout { - Layout.fillWidth: true - spacing: 12 - - Text { - text: "settings" - font.family: "Material Symbols Outlined" - font.pixelSize: 20 - color: Theme.accentPrimary - } - - Text { - text: "System Settings" - font.family: Theme.fontFamily - font.pixelSize: 16 - font.bold: true - color: Theme.textPrimary - Layout.fillWidth: true - } + Text { + text: "Profile Image" + font.family: Theme.fontFamily + font.pixelSize: 13 + font.bold: true + color: Theme.textPrimary } - // Profile Image Input Section - ColumnLayout { - spacing: 8 - Layout.fillWidth: true - - Text { - text: "Profile Image" - font.family: Theme.fontFamily - font.pixelSize: 13 - font.bold: true - color: Theme.textPrimary - } - - RowLayout { - spacing: 8 - Layout.fillWidth: true - - Rectangle { - width: 40 - height: 40 - radius: 20 - color: Theme.surfaceVariant - border.color: profileImageInput.activeFocus ? Theme.accentPrimary : Theme.outline - border.width: 1 - - Image { - id: avatarImage - 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 !== "" - } - - Text { - anchors.centerIn: parent - text: "person" - font.family: "Material Symbols Outlined" - font.pixelSize: 20 - color: Theme.accentPrimary - visible: Settings.settings.profileImage === "" - } - } - - Rectangle { - Layout.fillWidth: true - Layout.preferredHeight: 40 - radius: 8 - color: Theme.surfaceVariant - border.color: profileImageInput.activeFocus ? Theme.accentPrimary : Theme.outline - border.width: 1 - - TextInput { - id: profileImageInput - anchors.fill: parent - anchors.leftMargin: 12 - anchors.rightMargin: 12 - anchors.topMargin: 6 - anchors.bottomMargin: 6 - text: Settings.settings.profileImage - font.family: Theme.fontFamily - font.pixelSize: 13 - color: Theme.textPrimary - verticalAlignment: TextInput.AlignVCenter - clip: true - focus: true - selectByMouse: true - activeFocusOnTab: true - inputMethodHints: Qt.ImhNone - onTextChanged: { - Settings.settings.profileImage = text - } - MouseArea { - anchors.fill: parent - cursorShape: Qt.IBeamCursor - onClicked: { - profileImageInput.forceActiveFocus() - } - } - } - } - } - } - - // Show Active Window Icon Setting RowLayout { spacing: 8 Layout.fillWidth: true - Layout.topMargin: 8 - - Text { - text: "Show Active Window Icon" - font.family: Theme.fontFamily - font.pixelSize: 13 - font.bold: true - color: Theme.textPrimary - } - - Item { - Layout.fillWidth: true - } Rectangle { - id: customSwitch - width: 52 - height: 32 - radius: 16 - color: Settings.settings.showActiveWindowIcon ? Theme.accentPrimary : Theme.surfaceVariant - border.color: Settings.settings.showActiveWindowIcon ? Theme.accentPrimary : Theme.outline - border.width: 2 - - Rectangle { - id: thumb - width: 28 - height: 28 - radius: 14 - color: Theme.surface - border.color: Theme.outline - border.width: 1 - y: 2 - x: Settings.settings.showActiveWindowIcon ? customSwitch.width - width - 2 : 2 - - Behavior on x { - NumberAnimation { duration: 200; easing.type: Easing.OutCubic } - } - } - - MouseArea { - anchors.fill: parent - cursorShape: Qt.PointingHandCursor - onClicked: { - Settings.settings.showActiveWindowIcon = !Settings.settings.showActiveWindowIcon - } - } - } - } - - // Show System Info In Bar Setting - RowLayout { - spacing: 8 - Layout.fillWidth: true - Layout.topMargin: 8 - - Text { - text: "Show System Info In Bar" - font.family: Theme.fontFamily - font.pixelSize: 13 - font.bold: true - color: Theme.textPrimary - Layout.alignment: Qt.AlignVCenter - } - - Item { - Layout.fillWidth: true - } - - Rectangle { - id: customSwitch2 - width: 52 - height: 32 - radius: 16 - color: Settings.settings.showSystemInfoInBar ? Theme.accentPrimary : Theme.surfaceVariant - border.color: Settings.settings.showSystemInfoInBar ? Theme.accentPrimary : Theme.outline - border.width: 2 - - Rectangle { - id: thumb2 - width: 28 - height: 28 - radius: 14 - color: Theme.surface - border.color: Theme.outline - border.width: 1 - y: 2 - x: Settings.settings.showSystemInfoInBar ? customSwitch2.width - width - 2 : 2 - - Behavior on x { - NumberAnimation { duration: 200; easing.type: Easing.OutCubic } - } - } - - MouseArea { - anchors.fill: parent - cursorShape: Qt.PointingHandCursor - onClicked: { - Settings.settings.showSystemInfoInBar = !Settings.settings.showSystemInfoInBar - } - } - } - } - - // Show Corners In Bar Setting - RowLayout { - spacing: 8 - Layout.fillWidth: true - Layout.topMargin: 8 - - Text { - text: "Show Corners" - font.family: Theme.fontFamily - font.pixelSize: 13 - font.bold: true - color: Theme.textPrimary - Layout.alignment: Qt.AlignVCenter - } - - Item { - Layout.fillWidth: true - } - - Rectangle { - id: customSwitch4 - width: 52 - height: 32 - radius: 16 - color: Settings.settings.showCorners ? Theme.accentPrimary : Theme.surfaceVariant - border.color: Settings.settings.showCorners ? Theme.accentPrimary : Theme.outline - border.width: 2 - - Rectangle { - id: thumb4 - width: 28 - height: 28 - radius: 14 - color: Theme.surface - border.color: Theme.outline - border.width: 1 - y: 2 - x: Settings.settings.showCorners ? customSwitch4.width - width - 2 : 2 - - Behavior on x { - NumberAnimation { duration: 200; easing.type: Easing.OutCubic } - } - } - - MouseArea { - anchors.fill: parent - cursorShape: Qt.PointingHandCursor - onClicked: { - Settings.settings.showCorners = !Settings.settings.showCorners - } - } - } - } - - // Show Taskbar in Bar Setting - RowLayout { - spacing: 8 - Layout.fillWidth: true - Layout.topMargin: 8 - - Text { - text: "Show Taskbar" - font.family: Theme.fontFamily - font.pixelSize: 13 - font.bold: true - color: Theme.textPrimary - Layout.alignment: Qt.AlignVCenter - } - - Item { - Layout.fillWidth: true - } - - Rectangle { - id: customSwitch5 - width: 52 - height: 32 - radius: 16 - color: Settings.settings.showTaskbar ? Theme.accentPrimary : Theme.surfaceVariant - border.color: Settings.settings.showTaskbar ? Theme.accentPrimary : Theme.outline - border.width: 2 - - Rectangle { - id: thumb5 - width: 28 - height: 28 - radius: 14 - color: Theme.surface - border.color: Theme.outline - border.width: 1 - y: 2 - x: Settings.settings.showTaskbar ? customSwitch5.width - width - 2 : 2 - - Behavior on x { - NumberAnimation { duration: 200; easing.type: Easing.OutCubic } - } - } - - MouseArea { - anchors.fill: parent - cursorShape: Qt.PointingHandCursor - onClicked: { - Settings.settings.showTaskbar = !Settings.settings.showTaskbar - } - } - } - } - - // Show Media In Bar Setting - RowLayout { - spacing: 8 - Layout.fillWidth: true - Layout.topMargin: 8 - - Text { - text: "Show Media In Bar" - font.family: Theme.fontFamily - font.pixelSize: 13 - font.bold: true - color: Theme.textPrimary - Layout.alignment: Qt.AlignVCenter - } - - Item { - Layout.fillWidth: true - } - - Rectangle { - id: customSwitch3 - width: 52 - height: 32 - radius: 16 - color: Settings.settings.showMediaInBar ? Theme.accentPrimary : Theme.surfaceVariant - border.color: Settings.settings.showMediaInBar ? Theme.accentPrimary : Theme.outline - border.width: 2 - - Rectangle { - id: thumb3 - width: 28 - height: 28 - radius: 14 - color: Theme.surface - border.color: Theme.outline - border.width: 1 - y: 2 - x: Settings.settings.showMediaInBar ? customSwitch3.width - width - 2 : 2 - - Behavior on x { - NumberAnimation { duration: 200; easing.type: Easing.OutCubic } - } - } - - MouseArea { - anchors.fill: parent - cursorShape: Qt.PointingHandCursor - onClicked: { - Settings.settings.showMediaInBar = !Settings.settings.showMediaInBar - } - } - } - } - - // Dim Windows Setting - RowLayout { - spacing: 8 - Layout.fillWidth: true - Layout.topMargin: 8 - - Text { - text: "Dim Desktop" - font.family: Theme.fontFamily - font.pixelSize: 13 - font.bold: true - color: Theme.textPrimary - } - - Item { - Layout.fillWidth: true - } - - Rectangle { - id: dimWindowsSwitch - width: 52 - height: 32 - radius: 16 - color: Settings.settings.dimPanels ? Theme.accentPrimary : Theme.surfaceVariant - border.color: Settings.settings.dimPanels ? Theme.accentPrimary : Theme.outline - border.width: 2 - - Rectangle { - id: dimWindowsThumb - width: 28 - height: 28 - radius: 14 - color: Theme.surface - border.color: Theme.outline - border.width: 1 - y: 2 - x: Settings.settings.dimPanels ? dimWindowsSwitch.width - width - 2 : 2 - - Behavior on x { - NumberAnimation { duration: 200; easing.type: Easing.OutCubic } - } - } - - MouseArea { - anchors.fill: parent - cursorShape: Qt.PointingHandCursor - onClicked: { - Settings.settings.dimPanels = !Settings.settings.dimPanels - } - } - } - } - - // Visualizer Type Selection - ColumnLayout { - spacing: 8 - Layout.fillWidth: true - Layout.topMargin: 16 - - Text { - text: "Visualizer Type" - font.family: Theme.fontFamily - font.pixelSize: 13 - font.bold: true - color: Theme.textPrimary - } - - ComboBox { - id: visualizerTypeComboBox - Layout.fillWidth: true - Layout.preferredHeight: 40 - model: ["radial", "fire", "diamond"] - currentIndex: model.indexOf(Settings.settings.visualizerType) - - background: Rectangle { - implicitWidth: 120 - implicitHeight: 40 - color: Theme.surfaceVariant - border.color: visualizerTypeComboBox.activeFocus ? Theme.accentPrimary : Theme.outline - border.width: 1 - radius: 8 - } - - contentItem: Text { - leftPadding: 12 - rightPadding: visualizerTypeComboBox.indicator.width + visualizerTypeComboBox.spacing - text: visualizerTypeComboBox.displayText.charAt(0).toUpperCase() + visualizerTypeComboBox.displayText.slice(1) - font.family: Theme.fontFamily - font.pixelSize: 13 - color: Theme.textPrimary - verticalAlignment: Text.AlignVCenter - elide: Text.ElideRight - } - - indicator: Text { - x: visualizerTypeComboBox.width - width - 12 - y: visualizerTypeComboBox.topPadding + (visualizerTypeComboBox.availableHeight - height) / 2 - text: "arrow_drop_down" - font.family: "Material Symbols Outlined" - font.pixelSize: 24 - color: Theme.textPrimary - } - - popup: Popup { - y: visualizerTypeComboBox.height - width: visualizerTypeComboBox.width - implicitHeight: contentItem.implicitHeight - padding: 1 - - contentItem: ListView { - clip: true - implicitHeight: contentHeight - model: visualizerTypeComboBox.popup.visible ? visualizerTypeComboBox.delegateModel : null - currentIndex: visualizerTypeComboBox.highlightedIndex - - ScrollIndicator.vertical: ScrollIndicator {} - } - - background: Rectangle { - color: Theme.surfaceVariant - border.color: Theme.outline - border.width: 1 - radius: 8 - } - } - - delegate: ItemDelegate { - width: visualizerTypeComboBox.width - contentItem: Text { - text: modelData.charAt(0).toUpperCase() + modelData.slice(1) - font.family: Theme.fontFamily - font.pixelSize: 13 - color: Theme.textPrimary - verticalAlignment: Text.AlignVCenter - elide: Text.ElideRight - } - highlighted: visualizerTypeComboBox.highlightedIndex === index - - background: Rectangle { - color: highlighted ? Theme.accentPrimary.toString().replace(/#/, "#1A") : "transparent" - } - } - - onActivated: { - Settings.settings.visualizerType = model[index]; - } - } - } - - // Video Path Input Section - ColumnLayout { - spacing: 8 - Layout.fillWidth: true - Layout.topMargin: 8 - - Text { - text: "Video Path" - font.family: Theme.fontFamily - font.pixelSize: 13 - font.bold: true - color: Theme.textPrimary - } - - Rectangle { - Layout.fillWidth: true - Layout.preferredHeight: 40 - radius: 8 + width: 40 + height: 40 + radius: 20 color: Theme.surfaceVariant - border.color: videoPathInput.activeFocus ? Theme.accentPrimary : Theme.outline + border.color: profileImageInput.activeFocus ? Theme.accentPrimary : Theme.outline + border.width: 1 + + Image { + id: avatarImage + 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 !== "" + } + + Text { + anchors.centerIn: parent + text: "person" + font.family: "Material Symbols Outlined" + font.pixelSize: 20 + color: Theme.accentPrimary + visible: Settings.settings.profileImage === "" + } + } + + Rectangle { + Layout.fillWidth: true + Layout.preferredHeight: 40 + radius: 16 + color: Theme.surfaceVariant + border.color: profileImageInput.activeFocus ? Theme.accentPrimary : Theme.outline border.width: 1 TextInput { - id: videoPathInput - anchors.left: parent.left - anchors.right: parent.right - anchors.top: parent.top - anchors.bottom: parent.bottom + id: profileImageInput + anchors.fill: parent anchors.leftMargin: 12 anchors.rightMargin: 12 anchors.topMargin: 6 anchors.bottomMargin: 6 - text: Settings.settings.videoPath !== undefined ? Settings.settings.videoPath : "" + text: Settings.settings.profileImage font.family: Theme.fontFamily font.pixelSize: 13 color: Theme.textPrimary @@ -633,21 +121,489 @@ Rectangle { activeFocusOnTab: true inputMethodHints: Qt.ImhUrlCharactersOnly onTextChanged: { - Settings.settings.videoPath = text + Settings.settings.profileImage = text } MouseArea { anchors.fill: parent cursorShape: Qt.IBeamCursor - onClicked: videoPathInput.forceActiveFocus() + onClicked: profileImageInput.forceActiveFocus() } } } } + } + + // Show Active Window Icon Setting + RowLayout { + spacing: 8 + Layout.fillWidth: true + Layout.topMargin: 8 + + Text { + text: "Show Active Window Icon" + font.pixelSize: 13 + font.bold: true + color: Theme.textPrimary + } - // Add an extra spacer at the bottom to ensure all content is reachable Item { - Layout.fillHeight: true - Layout.minimumHeight: 20 + Layout.fillWidth: true + } + + Rectangle { + id: activeWindowIconSwitch + width: 52 + height: 32 + radius: 16 + color: Settings.settings.showActiveWindowIcon ? Theme.accentPrimary : Theme.surfaceVariant + border.color: Settings.settings.showActiveWindowIcon ? Theme.accentPrimary : Theme.outline + border.width: 2 + + Rectangle { + id: activeWindowIconThumb + width: 28 + height: 28 + radius: 14 + color: Theme.surface + border.color: Theme.outline + border.width: 1 + y: 2 + x: Settings.settings.showActiveWindowIcon ? activeWindowIconSwitch.width - width - 2 : 2 + + Behavior on x { + NumberAnimation { + duration: 200 + easing.type: Easing.OutCubic + } + } + } + + MouseArea { + anchors.fill: parent + cursorShape: Qt.PointingHandCursor + onClicked: { + Settings.settings.showActiveWindowIcon = !Settings.settings.showActiveWindowIcon + } + } + } + } + + // Show System Info In Bar Setting + RowLayout { + spacing: 8 + Layout.fillWidth: true + Layout.topMargin: 8 + + Text { + text: "Show System Info In Bar" + font.pixelSize: 13 + font.bold: true + color: Theme.textPrimary + } + + Item { + Layout.fillWidth: true + } + + Rectangle { + id: systemInfoSwitch + width: 52 + height: 32 + radius: 16 + color: Settings.settings.showSystemInfoInBar ? Theme.accentPrimary : Theme.surfaceVariant + border.color: Settings.settings.showSystemInfoInBar ? Theme.accentPrimary : Theme.outline + border.width: 2 + + Rectangle { + id: systemInfoThumb + width: 28 + height: 28 + radius: 14 + color: Theme.surface + border.color: Theme.outline + border.width: 1 + y: 2 + x: Settings.settings.showSystemInfoInBar ? systemInfoSwitch.width - width - 2 : 2 + + Behavior on x { + NumberAnimation { + duration: 200 + easing.type: Easing.OutCubic + } + } + } + + MouseArea { + anchors.fill: parent + cursorShape: Qt.PointingHandCursor + onClicked: { + Settings.settings.showSystemInfoInBar = !Settings.settings.showSystemInfoInBar + } + } + } + } + + // Show Corners Setting + RowLayout { + spacing: 8 + Layout.fillWidth: true + Layout.topMargin: 8 + + Text { + text: "Show Corners" + font.pixelSize: 13 + font.bold: true + color: Theme.textPrimary + } + + Item { + Layout.fillWidth: true + } + + Rectangle { + id: cornersSwitch + width: 52 + height: 32 + radius: 16 + color: Settings.settings.showCorners ? Theme.accentPrimary : Theme.surfaceVariant + border.color: Settings.settings.showCorners ? Theme.accentPrimary : Theme.outline + border.width: 2 + + Rectangle { + id: cornersThumb + width: 28 + height: 28 + radius: 14 + color: Theme.surface + border.color: Theme.outline + border.width: 1 + y: 2 + x: Settings.settings.showCorners ? cornersSwitch.width - width - 2 : 2 + + Behavior on x { + NumberAnimation { + duration: 200 + easing.type: Easing.OutCubic + } + } + } + + MouseArea { + anchors.fill: parent + cursorShape: Qt.PointingHandCursor + onClicked: { + Settings.settings.showCorners = !Settings.settings.showCorners + } + } + } + } + + // Show Taskbar Setting + RowLayout { + spacing: 8 + Layout.fillWidth: true + Layout.topMargin: 8 + + Text { + text: "Show Taskbar" + font.pixelSize: 13 + font.bold: true + color: Theme.textPrimary + } + + Item { + Layout.fillWidth: true + } + + Rectangle { + id: taskbarSwitch + width: 52 + height: 32 + radius: 16 + color: Settings.settings.showTaskbar ? Theme.accentPrimary : Theme.surfaceVariant + border.color: Settings.settings.showTaskbar ? Theme.accentPrimary : Theme.outline + border.width: 2 + + Rectangle { + id: taskbarThumb + width: 28 + height: 28 + radius: 14 + color: Theme.surface + border.color: Theme.outline + border.width: 1 + y: 2 + x: Settings.settings.showTaskbar ? 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.showTaskbar = !Settings.settings.showTaskbar + } + } + } + } + + // Show Media In Bar Setting + RowLayout { + spacing: 8 + Layout.fillWidth: true + Layout.topMargin: 8 + + Text { + text: "Show Media In Bar" + font.pixelSize: 13 + font.bold: true + color: Theme.textPrimary + } + + Item { + Layout.fillWidth: true + } + + Rectangle { + id: mediaSwitch + width: 52 + height: 32 + radius: 16 + color: Settings.settings.showMediaInBar ? Theme.accentPrimary : Theme.surfaceVariant + border.color: Settings.settings.showMediaInBar ? Theme.accentPrimary : Theme.outline + border.width: 2 + + Rectangle { + id: mediaThumb + width: 28 + height: 28 + radius: 14 + color: Theme.surface + border.color: Theme.outline + border.width: 1 + y: 2 + x: Settings.settings.showMediaInBar ? mediaSwitch.width - width - 2 : 2 + + Behavior on x { + NumberAnimation { + duration: 200 + easing.type: Easing.OutCubic + } + } + } + + MouseArea { + anchors.fill: parent + cursorShape: Qt.PointingHandCursor + onClicked: { + Settings.settings.showMediaInBar = !Settings.settings.showMediaInBar + } + } + } + } + + // Dim Windows Setting + RowLayout { + spacing: 8 + Layout.fillWidth: true + Layout.topMargin: 8 + + Text { + text: "Dim Desktop" + font.pixelSize: 13 + font.bold: true + color: Theme.textPrimary + } + + Item { + Layout.fillWidth: true + } + + Rectangle { + id: dimSwitch + width: 52 + height: 32 + radius: 16 + color: Settings.settings.dimPanels ? Theme.accentPrimary : Theme.surfaceVariant + border.color: Settings.settings.dimPanels ? Theme.accentPrimary : Theme.outline + border.width: 2 + + Rectangle { + id: dimThumb + width: 28 + height: 28 + radius: 14 + color: Theme.surface + border.color: Theme.outline + border.width: 1 + y: 2 + x: Settings.settings.dimPanels ? dimSwitch.width - width - 2 : 2 + + Behavior on x { + NumberAnimation { + duration: 200 + easing.type: Easing.OutCubic + } + } + } + + MouseArea { + anchors.fill: parent + cursorShape: Qt.PointingHandCursor + onClicked: { + Settings.settings.dimPanels = !Settings.settings.dimPanels + } + } + } + } + + // Visualizer Type Selection + ColumnLayout { + spacing: 8 + Layout.fillWidth: true + Layout.topMargin: 16 + + Text { + text: "Visualizer Type" + font.pixelSize: 13 + font.bold: true + color: Theme.textPrimary + } + + ComboBox { + id: visualizerTypeComboBox + Layout.fillWidth: true + Layout.preferredHeight: 40 + model: ["radial", "fire", "diamond"] + currentIndex: model.indexOf(Settings.settings.visualizerType) + + background: Rectangle { + implicitWidth: 120 + implicitHeight: 40 + color: Theme.surfaceVariant + border.color: visualizerTypeComboBox.activeFocus ? Theme.accentPrimary : Theme.outline + border.width: 1 + radius: 16 + } + + contentItem: Text { + leftPadding: 12 + rightPadding: visualizerTypeComboBox.indicator.width + visualizerTypeComboBox.spacing + text: visualizerTypeComboBox.displayText.charAt(0).toUpperCase() + visualizerTypeComboBox.displayText.slice(1) + font.family: Theme.fontFamily + font.pixelSize: 13 + color: Theme.textPrimary + verticalAlignment: Text.AlignVCenter + elide: Text.ElideRight + } + + indicator: Text { + x: visualizerTypeComboBox.width - width - 12 + y: visualizerTypeComboBox.topPadding + (visualizerTypeComboBox.availableHeight - height) / 2 + text: "arrow_drop_down" + font.family: "Material Symbols Outlined" + font.pixelSize: 24 + color: Theme.textPrimary + } + + popup: Popup { + y: visualizerTypeComboBox.height + width: visualizerTypeComboBox.width + implicitHeight: contentItem.implicitHeight + padding: 1 + + contentItem: ListView { + clip: true + implicitHeight: contentHeight + model: visualizerTypeComboBox.popup.visible ? visualizerTypeComboBox.delegateModel : null + currentIndex: visualizerTypeComboBox.highlightedIndex + + ScrollIndicator.vertical: ScrollIndicator {} + } + + background: Rectangle { + color: Theme.surfaceVariant + border.color: Theme.outline + border.width: 1 + radius: 16 + } + } + + delegate: ItemDelegate { + width: visualizerTypeComboBox.width + contentItem: Text { + text: modelData.charAt(0).toUpperCase() + modelData.slice(1) + font.family: Theme.fontFamily + font.pixelSize: 13 + color: Theme.textPrimary + verticalAlignment: Text.AlignVCenter + elide: Text.ElideRight + } + highlighted: visualizerTypeComboBox.highlightedIndex === index + + background: Rectangle { + color: highlighted ? Theme.accentPrimary.toString().replace(/#/, "#1A") : "transparent" + } + } + + onActivated: { + Settings.settings.visualizerType = model[index]; + } + } + } + + // Video Path Input Section + ColumnLayout { + spacing: 8 + Layout.fillWidth: true + Layout.topMargin: 16 + + Text { + text: "Video Path" + font.pixelSize: 13 + font.bold: true + color: Theme.textPrimary + } + + 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.family: Theme.fontFamily + 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() + } + } } } } diff --git a/Widgets/Sidebar/Config/WallpaperSettings.qml b/Widgets/Sidebar/Config/WallpaperSettings.qml index cf52903..c824721 100644 --- a/Widgets/Sidebar/Config/WallpaperSettings.qml +++ b/Widgets/Sidebar/Config/WallpaperSettings.qml @@ -15,25 +15,25 @@ 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 - Layout.fillWidth: true - } + // 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 + Layout.fillWidth: true + } + } ColumnLayout { spacing: 8 @@ -51,7 +51,7 @@ Rectangle { Rectangle { Layout.fillWidth: true Layout.preferredHeight: 40 - radius: 8 + radius: 16 color: Theme.surfaceVariant border.color: folderInput.activeFocus ? Theme.accentPrimary : Theme.outline border.width: 1 @@ -350,7 +350,7 @@ Rectangle { color: Theme.surfaceVariant border.color: resizeComboBox.activeFocus ? Theme.accentPrimary : Theme.outline border.width: 1 - radius: 8 + radius: 16 } contentItem: Text { @@ -392,7 +392,7 @@ Rectangle { color: Theme.surfaceVariant border.color: Theme.outline border.width: 1 - radius: 8 + radius: 16 } } @@ -445,7 +445,7 @@ Rectangle { color: Theme.surfaceVariant border.color: transitionTypeComboBox.activeFocus ? Theme.accentPrimary : Theme.outline border.width: 1 - radius: 8 + radius: 16 } contentItem: Text { @@ -487,7 +487,7 @@ Rectangle { color: Theme.surfaceVariant border.color: Theme.outline border.width: 1 - radius: 8 + radius: 16 } } diff --git a/Widgets/Sidebar/Config/WeatherSettings.qml b/Widgets/Sidebar/Config/WeatherSettings.qml index ebb1ad6..d7689dc 100644 --- a/Widgets/Sidebar/Config/WeatherSettings.qml +++ b/Widgets/Sidebar/Config/WeatherSettings.qml @@ -52,7 +52,7 @@ Rectangle { Rectangle { Layout.fillWidth: true Layout.preferredHeight: 40 - radius: 8 + radius: 16 color: Theme.surfaceVariant border.color: cityInput.activeFocus ? Theme.accentPrimary : Theme.outline border.width: 1