From 91747c71f27e3da10a655c4c3d49dca19a7bd2c4 Mon Sep 17 00:00:00 2001 From: LemmyCook Date: Sun, 7 Sep 2025 23:18:10 -0400 Subject: [PATCH] Main Settings: cleaned tabs since we removed many settings --- .../SettingsPanel/Bar/BarSectionEditor.qml | 2 +- Modules/SettingsPanel/Tabs/AudioTab.qml | 16 +- Modules/SettingsPanel/Tabs/BarTab.qml | 2 +- Modules/SettingsPanel/Tabs/ColorSchemeTab.qml | 315 +++++++++--------- Modules/SettingsPanel/Tabs/GeneralTab.qml | 109 +++--- Modules/SettingsPanel/Tabs/LauncherTab.qml | 32 +- 6 files changed, 240 insertions(+), 236 deletions(-) diff --git a/Modules/SettingsPanel/Bar/BarSectionEditor.qml b/Modules/SettingsPanel/Bar/BarSectionEditor.qml index 14cf45a..df1ed3e 100644 --- a/Modules/SettingsPanel/Bar/BarSectionEditor.qml +++ b/Modules/SettingsPanel/Bar/BarSectionEditor.qml @@ -65,7 +65,7 @@ NBox { text: sectionName + " Section" font.pointSize: Style.fontSizeL * scaling font.weight: Style.fontWeightBold - color: Color.mSecondary + color: Color.mOnSurface Layout.alignment: Qt.AlignVCenter } diff --git a/Modules/SettingsPanel/Tabs/AudioTab.qml b/Modules/SettingsPanel/Tabs/AudioTab.qml index a5dd9a1..d60ae38 100644 --- a/Modules/SettingsPanel/Tabs/AudioTab.qml +++ b/Modules/SettingsPanel/Tabs/AudioTab.qml @@ -242,21 +242,7 @@ ColumnLayout { Layout.bottomMargin: Style.marginS * scaling } - // Miniplayer section - NToggle { - label: "Show Album Art In Bar Media Player" - description: "Show the album art of the currently playing song next to the title." - checked: Settings.data.audio.showMiniplayerAlbumArt - onToggled: checked => Settings.data.audio.showMiniplayerAlbumArt = checked - } - - NToggle { - label: "Show Audio Visualizer In Bar Media Player" - description: "Shows an audio visualizer in the background of the miniplayer." - checked: Settings.data.audio.showMiniplayerCava - onToggled: checked => Settings.data.audio.showMiniplayerCava = checked - } - // Preferred player (persistent) + // Preferred player NTextInput { label: "Preferred Player" description: "Substring to match MPRIS player (identity/bus/desktop)." diff --git a/Modules/SettingsPanel/Tabs/BarTab.qml b/Modules/SettingsPanel/Tabs/BarTab.qml index 7180642..c543018 100644 --- a/Modules/SettingsPanel/Tabs/BarTab.qml +++ b/Modules/SettingsPanel/Tabs/BarTab.qml @@ -87,7 +87,7 @@ ColumnLayout { text: "Widgets Positioning" font.pointSize: Style.fontSizeXXL * scaling font.weight: Style.fontWeightBold - color: Color.mOnSurface + color: Color.mSecondary Layout.bottomMargin: Style.marginS * scaling } diff --git a/Modules/SettingsPanel/Tabs/ColorSchemeTab.qml b/Modules/SettingsPanel/Tabs/ColorSchemeTab.qml index 5196387..b564371 100644 --- a/Modules/SettingsPanel/Tabs/ColorSchemeTab.qml +++ b/Modules/SettingsPanel/Tabs/ColorSchemeTab.qml @@ -8,6 +8,7 @@ import qs.Widgets ColumnLayout { id: root + spacing: 0 // Cache for scheme JSON (can be flat or {dark, light}) property var schemeColorsCache: ({}) @@ -103,14 +104,8 @@ ColumnLayout { } } - ColumnLayout { - spacing: 0 - - Item { - Layout.fillWidth: true - Layout.preferredHeight: 0 - } + // Main Toggles - Dark Mode / Matugen ColumnLayout { spacing: Style.marginL * scaling Layout.fillWidth: true @@ -144,190 +139,194 @@ ColumnLayout { } } } + } - NDivider { - Layout.fillWidth: true - Layout.topMargin: Style.marginXL * scaling - Layout.bottomMargin: Style.marginXL * scaling + NDivider { + Layout.fillWidth: true + Layout.topMargin: Style.marginXL * scaling + Layout.bottomMargin: Style.marginXL * scaling + } + + // Predefined Color Schemes + ColumnLayout { + spacing: Style.marginM * scaling + Layout.fillWidth: true + + NText { + text: "Predefined Color Schemes" + font.pointSize: Style.fontSizeXXL * scaling + font.weight: Style.fontWeightBold + color: Color.mSecondary } - ColumnLayout { - spacing: Style.marginS * scaling + NText { + text: "To use these color schemes, you must turn off Matugen. With Matugen enabled, colors are automatically generated from your wallpaper." + font.pointSize: Style.fontSizeM * scaling + color: Color.mOnSurfaceVariant Layout.fillWidth: true + wrapMode: Text.WordWrap + } - NText { - text: "Predefined Color Schemes" - font.pointSize: Style.fontSizeXXL * scaling - font.weight: Style.fontWeightBold - color: Color.mSecondary - } + // Color Schemes Grid + GridLayout { + columns: 3 + rowSpacing: Style.marginM * scaling + columnSpacing: Style.marginM * scaling + Layout.fillWidth: true + + Repeater { + model: ColorSchemeService.schemes + + Rectangle { + id: schemeCard + + property string schemePath: modelData - NText { - text: "These color schemes are only active when 'Use Matugen' is turned off. With Matugen enabled, colors will be automatically generated from your wallpaper. You can still switch between light and dark themes while using Matugen." - font.pointSize: Style.fontSizeM * scaling - color: Color.mOnSurfaceVariant Layout.fillWidth: true - wrapMode: Text.WordWrap - } - } + Layout.preferredHeight: 120 * scaling + radius: Style.radiusM * scaling + color: getSchemeColor(modelData, "mSurface") + border.width: Math.max(1, Style.borderL * scaling) + border.color: (!Settings.data.colorSchemes.useWallpaperColors + && (Settings.data.colorSchemes.predefinedScheme === modelData)) ? Color.mPrimary : Color.mOutline + scale: root.cardScaleLow - // Color Schemes Grid - GridLayout { - columns: 3 - rowSpacing: Style.marginM * scaling - columnSpacing: Style.marginM * scaling - Layout.fillWidth: true + // Mouse area for selection + MouseArea { + anchors.fill: parent + onClicked: { + // Disable useWallpaperColors when picking a predefined color scheme + Settings.data.colorSchemes.useWallpaperColors = false + Logger.log("ColorSchemeTab", "Disabled matugen setting") - Repeater { - model: ColorSchemeService.schemes + Settings.data.colorSchemes.predefinedScheme = schemePath + ColorSchemeService.applyScheme(schemePath) + } + hoverEnabled: true + cursorShape: Qt.PointingHandCursor - Rectangle { - id: schemeCard - - property string schemePath: modelData - - Layout.fillWidth: true - Layout.preferredHeight: 120 * scaling - radius: Style.radiusM * scaling - color: getSchemeColor(modelData, "mSurface") - border.width: Math.max(1, Style.borderL * scaling) - border.color: (!Settings.data.colorSchemes.useWallpaperColors - && (Settings.data.colorSchemes.predefinedScheme === modelData)) ? Color.mPrimary : Color.mOutline - scale: root.cardScaleLow - - // Mouse area for selection - MouseArea { - anchors.fill: parent - onClicked: { - // Disable useWallpaperColors when picking a predefined color scheme - Settings.data.colorSchemes.useWallpaperColors = false - Logger.log("ColorSchemeTab", "Disabled matugen setting") - - Settings.data.colorSchemes.predefinedScheme = schemePath - ColorSchemeService.applyScheme(schemePath) - } - hoverEnabled: true - cursorShape: Qt.PointingHandCursor - - onEntered: { - schemeCard.scale = root.cardScaleHigh - } - - onExited: { - schemeCard.scale = root.cardScaleLow - } + onEntered: { + schemeCard.scale = root.cardScaleHigh } - // Card content - ColumnLayout { - anchors.fill: parent - anchors.margins: Style.marginXL * scaling + onExited: { + schemeCard.scale = root.cardScaleLow + } + } + + // Card content + ColumnLayout { + anchors.fill: parent + anchors.margins: Style.marginXL * scaling + spacing: Style.marginS * scaling + + // Scheme name + NText { + text: { + // Remove json and the full path + var chunks = schemePath.replace(".json", "").split("/") + return chunks[chunks.length - 1] + } + font.pointSize: Style.fontSizeM * scaling + font.weight: Style.fontWeightBold + color: getSchemeColor(modelData, "mOnSurface") + Layout.fillWidth: true + elide: Text.ElideRight + horizontalAlignment: Text.AlignHCenter + } + + // Color swatches + RowLayout { + id: swatches + spacing: Style.marginS * scaling + Layout.fillWidth: true + Layout.alignment: Qt.AlignHCenter - // Scheme name - NText { - text: { - // Remove json and the full path - var chunks = schemePath.replace(".json", "").split("/") - return chunks[chunks.length - 1] - } - font.pointSize: Style.fontSizeM * scaling - font.weight: Style.fontWeightBold - color: getSchemeColor(modelData, "mOnSurface") - Layout.fillWidth: true - elide: Text.ElideRight - horizontalAlignment: Text.AlignHCenter + readonly property int swatchSize: 20 * scaling + + // Primary color swatch + Rectangle { + width: swatches.swatchSize + height: swatches.swatchSize + radius: width * 0.5 + color: getSchemeColor(modelData, "mPrimary") } - // Color swatches - RowLayout { - id: swatches + // Secondary color swatch + Rectangle { + width: swatches.swatchSize + height: swatches.swatchSize + radius: width * 0.5 + color: getSchemeColor(modelData, "mSecondary") + } - spacing: Style.marginS * scaling - Layout.fillWidth: true - Layout.alignment: Qt.AlignHCenter + // Tertiary color swatch + Rectangle { + width: swatches.swatchSize + height: swatches.swatchSize + radius: width * 0.5 + color: getSchemeColor(modelData, "mTertiary") + } - readonly property int swatchSize: 20 * scaling - - // Primary color swatch - Rectangle { - width: swatches.swatchSize - height: swatches.swatchSize - radius: width * 0.5 - color: getSchemeColor(modelData, "mPrimary") - } - - // Secondary color swatch - Rectangle { - width: swatches.swatchSize - height: swatches.swatchSize - radius: width * 0.5 - color: getSchemeColor(modelData, "mSecondary") - } - - // Tertiary color swatch - Rectangle { - width: swatches.swatchSize - height: swatches.swatchSize - radius: width * 0.5 - color: getSchemeColor(modelData, "mTertiary") - } - - // Error color swatch - Rectangle { - width: swatches.swatchSize - height: swatches.swatchSize - radius: width * 0.5 - color: getSchemeColor(modelData, "mError") - } + // Error color swatch + Rectangle { + width: swatches.swatchSize + height: swatches.swatchSize + radius: width * 0.5 + color: getSchemeColor(modelData, "mError") } } + } - // Selection indicator (Checkmark) - Rectangle { - visible: !Settings.data.colorSchemes.useWallpaperColors - && (Settings.data.colorSchemes.predefinedScheme === schemePath) - anchors.right: parent.right - anchors.top: parent.top - anchors.margins: Style.marginS * scaling - width: 24 * scaling - height: 24 * scaling - radius: width * 0.5 - color: Color.mPrimary + // Selection indicator (Checkmark) + Rectangle { + visible: !Settings.data.colorSchemes.useWallpaperColors + && (Settings.data.colorSchemes.predefinedScheme === schemePath) + anchors.right: parent.right + anchors.top: parent.top + anchors.margins: Style.marginS * scaling + width: 24 * scaling + height: 24 * scaling + radius: width * 0.5 + color: Color.mPrimary - NText { - anchors.centerIn: parent - text: "✓" - font.pointSize: Style.fontSizeXS * scaling - font.weight: Style.fontWeightBold - color: Color.mOnPrimary - } + NText { + anchors.centerIn: parent + text: "✓" + font.pointSize: Style.fontSizeXS * scaling + font.weight: Style.fontWeightBold + color: Color.mOnPrimary } + } - // Smooth animations - Behavior on scale { - NumberAnimation { - duration: Style.animationNormal - easing.type: Easing.OutCubic - } + // Smooth animations + Behavior on scale { + NumberAnimation { + duration: Style.animationNormal + easing.type: Easing.OutCubic } + } - Behavior on border.color { - ColorAnimation { - duration: Style.animationNormal - } + Behavior on border.color { + ColorAnimation { + duration: Style.animationNormal } + } - Behavior on border.width { - NumberAnimation { - duration: Style.animationFast - } + Behavior on border.width { + NumberAnimation { + duration: Style.animationFast } } } } } - } + } + + + + NDivider { Layout.fillWidth: true diff --git a/Modules/SettingsPanel/Tabs/GeneralTab.qml b/Modules/SettingsPanel/Tabs/GeneralTab.qml index f619eda..fe4dbcd 100644 --- a/Modules/SettingsPanel/Tabs/GeneralTab.qml +++ b/Modules/SettingsPanel/Tabs/GeneralTab.qml @@ -70,52 +70,6 @@ ColumnLayout { onToggled: checked => Settings.data.general.dimDesktop = checked } - NToggle { - label: "Auto-hide Dock" - description: "Automatically hide the dock when not in use." - checked: Settings.data.dock.autoHide - onToggled: checked => Settings.data.dock.autoHide = checked - } - - ColumnLayout { - spacing: Style.marginXXS * scaling - Layout.fillWidth: true - - NText { - text: "Dock Background Opacity" - font.pointSize: Style.fontSizeL * scaling - font.weight: Style.fontWeightBold - color: Color.mOnSurface - } - - NText { - text: "Adjust the background opacity of the dock." - font.pointSize: Style.fontSizeXS * scaling - color: Color.mOnSurfaceVariant - wrapMode: Text.WordWrap - Layout.fillWidth: true - } - - RowLayout { - NSlider { - Layout.fillWidth: true - from: 0 - to: 1 - stepSize: 0.01 - value: Settings.data.dock.backgroundOpacity - onMoved: Settings.data.dock.backgroundOpacity = value - cutoutColor: Color.mSurface - } - - NText { - text: Math.floor(Settings.data.dock.backgroundOpacity * 100) + "%" - Layout.alignment: Qt.AlignVCenter - Layout.leftMargin: Style.marginS * scaling - color: Color.mOnSurface - } - } - } - ColumnLayout { spacing: Style.marginXXS * scaling Layout.fillWidth: true @@ -175,7 +129,70 @@ ColumnLayout { } } } + NDivider { + Layout.fillWidth: true + Layout.topMargin: Style.marginXL * scaling + Layout.bottomMargin: Style.marginXL * scaling + } + // Dock + ColumnLayout { + spacing: Style.marginL * scaling + Layout.fillWidth: true + NText { + text: "Dock" + font.pointSize: Style.fontSizeXXL * scaling + font.weight: Style.fontWeightBold + color: Color.mSecondary + Layout.bottomMargin: Style.marginS * scaling + } + + NToggle { + label: "Auto-hide Dock" + description: "Automatically hide the dock when not in use." + checked: Settings.data.dock.autoHide + onToggled: checked => Settings.data.dock.autoHide = checked + } + + ColumnLayout { + spacing: Style.marginXXS * scaling + Layout.fillWidth: true + + NText { + text: "Dock Background Opacity" + font.pointSize: Style.fontSizeL * scaling + font.weight: Style.fontWeightBold + color: Color.mOnSurface + } + + NText { + text: "Adjust the background opacity of the dock." + font.pointSize: Style.fontSizeXS * scaling + color: Color.mOnSurfaceVariant + wrapMode: Text.WordWrap + Layout.fillWidth: true + } + + RowLayout { + NSlider { + Layout.fillWidth: true + from: 0 + to: 1 + stepSize: 0.01 + value: Settings.data.dock.backgroundOpacity + onMoved: Settings.data.dock.backgroundOpacity = value + cutoutColor: Color.mSurface + } + + NText { + text: Math.floor(Settings.data.dock.backgroundOpacity * 100) + "%" + Layout.alignment: Qt.AlignVCenter + Layout.leftMargin: Style.marginS * scaling + color: Color.mOnSurface + } + } + } + } NDivider { Layout.fillWidth: true Layout.topMargin: Style.marginXL * scaling diff --git a/Modules/SettingsPanel/Tabs/LauncherTab.qml b/Modules/SettingsPanel/Tabs/LauncherTab.qml index 6ca4ece..0b3a992 100644 --- a/Modules/SettingsPanel/Tabs/LauncherTab.qml +++ b/Modules/SettingsPanel/Tabs/LauncherTab.qml @@ -52,21 +52,7 @@ ColumnLayout { } } - NToggle { - label: "Enable Clipboard History" - description: "Show clipboard history in the launcher." - checked: Settings.data.appLauncher.enableClipboardHistory - onToggled: checked => Settings.data.appLauncher.enableClipboardHistory = checked - } - - NToggle { - label: "Use App2Unit for Launching" - description: "Use app2unit -- 'desktop-entry' when launching applications for better systemd integration." - checked: Settings.data.appLauncher.useApp2Unit - onToggled: checked => Settings.data.appLauncher.useApp2Unit = checked - } - - ColumnLayout { + ColumnLayout { spacing: Style.marginXXS * scaling Layout.fillWidth: true @@ -105,6 +91,22 @@ ColumnLayout { } } } + + NToggle { + label: "Enable Clipboard History" + description: "Show clipboard history in the launcher." + checked: Settings.data.appLauncher.enableClipboardHistory + onToggled: checked => Settings.data.appLauncher.enableClipboardHistory = checked + } + + NToggle { + label: "Use App2Unit for Launching" + description: "Use app2unit -- 'desktop-entry' when launching applications for better systemd integration." + checked: Settings.data.appLauncher.useApp2Unit + onToggled: checked => Settings.data.appLauncher.useApp2Unit = checked + } + + } NDivider {