From 176a997018d797b3af78f66b1d13f7d4de2e3030 Mon Sep 17 00:00:00 2001 From: quadbyte Date: Mon, 18 Aug 2025 09:27:05 -0400 Subject: [PATCH] Formatting + tray menu bg color back to "surface" --- Modules/Bar/SystemMonitor.qml | 3 +-- Modules/Bar/TrayMenu.qml | 2 +- Modules/SettingsPanel/Tabs/ColorSchemeTab.qml | 11 ++++++----- Services/ColorSchemeService.qml | 4 +++- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Modules/Bar/SystemMonitor.qml b/Modules/Bar/SystemMonitor.qml index 253c6f8..22491f8 100644 --- a/Modules/Bar/SystemMonitor.qml +++ b/Modules/Bar/SystemMonitor.qml @@ -93,8 +93,7 @@ Row { } } } -}// Row { -// id: layout +} // Row {// id: layout // anchors.verticalCenter: parent.verticalCenter // spacing: Style.marginSmall * scaling // visible: Settings.data.bar.showSystemInfo diff --git a/Modules/Bar/TrayMenu.qml b/Modules/Bar/TrayMenu.qml index cf58a25..355e313 100644 --- a/Modules/Bar/TrayMenu.qml +++ b/Modules/Bar/TrayMenu.qml @@ -83,7 +83,7 @@ PopupWindow { Rectangle { anchors.fill: parent - color: Color.mSurfaceVariant + color: Color.mSurface border.color: Color.mOutline border.width: Math.max(1, Style.borderThin * scaling) radius: Style.radiusMedium * scaling diff --git a/Modules/SettingsPanel/Tabs/ColorSchemeTab.qml b/Modules/SettingsPanel/Tabs/ColorSchemeTab.qml index 5f310cb..f9ed334 100644 --- a/Modules/SettingsPanel/Tabs/ColorSchemeTab.qml +++ b/Modules/SettingsPanel/Tabs/ColorSchemeTab.qml @@ -23,7 +23,8 @@ ColumnLayout { if (entry.dark || entry.light) { variant = Settings.data.colorSchemes.darkMode ? (entry.dark || entry.light) : (entry.light || entry.dark) } - if (variant && variant[colorKey]) return variant[colorKey] + if (variant && variant[colorKey]) + return variant[colorKey] } // Return a default color if not cached yet @@ -122,9 +123,7 @@ ColumnLayout { // Dark Mode Toggle (affects both Matugen and predefined schemes that provide variants) NToggle { label: "Dark Mode" - description: Settings.data.colorSchemes.useWallpaperColors - ? "Generate dark theme colors when using Matugen. Disable for light theme." - : "If the selected predefined scheme has light/dark variants, this chooses which one." + description: Settings.data.colorSchemes.useWallpaperColors ? "Generate dark theme colors when using Matugen. Disable for light theme." : "If the selected predefined scheme has light/dark variants, this chooses which one." checked: Settings.data.colorSchemes.darkMode enabled: true onToggled: checked => { @@ -135,7 +134,9 @@ ColumnLayout { // Re-apply current scheme to pick the right variant ColorSchemeService.applyScheme(Settings.data.colorSchemes.predefinedScheme) // Force refresh of previews - var tmp = schemeColorsCache; schemeColorsCache = {}; schemeColorsCache = tmp + var tmp = schemeColorsCache + schemeColorsCache = {} + schemeColorsCache = tmp } } } diff --git a/Services/ColorSchemeService.qml b/Services/ColorSchemeService.qml index 575ddd9..c65edd9 100644 --- a/Services/ColorSchemeService.qml +++ b/Services/ColorSchemeService.qml @@ -113,7 +113,9 @@ Singleton { } function writeColorsToDisk(obj) { - function pick(o, a, b, fallback) { return (o && (o[a] || o[b])) || fallback } + function pick(o, a, b, fallback) { + return (o && (o[a] || o[b])) || fallback + } out.mPrimary = pick(obj, "mPrimary", "primary", out.mPrimary) out.mOnPrimary = pick(obj, "mOnPrimary", "onPrimary", out.mOnPrimary) out.mSecondary = pick(obj, "mSecondary", "secondary", out.mSecondary)