diff --git a/Common/Colors.qml b/Common/Colors.qml index 6b55f31f..e540b118 100644 --- a/Common/Colors.qml +++ b/Common/Colors.qml @@ -21,14 +21,26 @@ Singleton { property string matugenJson: "" property var matugenColors: ({}) property bool extractionRequested: false + property int colorUpdateTrigger: 0 // Force property re-evaluation Component.onCompleted: { console.log("Colors.qml → home =", homeDir) // Don't automatically run color extraction - only when requested matugenCheck.running = true // Just check if matugen is available - - // Start monitoring for wallpaper changes - wallpaperMonitorTimer.start() + + // Connect to Theme light mode changes to update colors + if (typeof Theme !== "undefined") { + Theme.isLightModeChanged.connect(root.onLightModeChanged) + } + } + + function onLightModeChanged() { + // Force color properties to update when light mode changes + if (matugenColors && Object.keys(matugenColors).length > 0) { + console.log("Light mode changed - updating dynamic colors") + colorUpdateTrigger++ // This will trigger re-evaluation of all color properties + colorsUpdated() + } } /* ──────────────── availability checks ──────────────── */ @@ -113,7 +125,12 @@ Singleton { } function getMatugenColor(path, fallback) { - let cur = matugenColors?.colors?.dark + // Include colorUpdateTrigger in the function to make properties reactive to changes + colorUpdateTrigger // This dependency forces re-evaluation when colorUpdateTrigger changes + + // Use light or dark colors based on Theme.isLightMode + const colorMode = (typeof Theme !== "undefined" && Theme.isLightMode) ? "light" : "dark" + let cur = matugenColors?.colors?.[colorMode] for (const part of path.split(".")) { if (!cur || typeof cur !== "object" || !(part in cur)) return fallback diff --git a/Services/CalendarService.qml b/Services/CalendarService.qml index a09aaa16..0f81bbdc 100644 --- a/Services/CalendarService.qml +++ b/Services/CalendarService.qml @@ -210,16 +210,10 @@ Singleton { root.lastError = "" console.log("CalendarService: Loaded events for", Object.keys(newEventsByDate).length, "days") - - // Debug: log parsed events - for (let dateKey in newEventsByDate) { - console.log(" " + dateKey + ":", newEventsByDate[dateKey].map(e => e.title).join(", ")) - } - + } catch (error) { root.lastError = "Failed to parse events JSON: " + error.toString() console.error("CalendarService:", root.lastError) - console.error("CalendarService: Raw output was:", eventsProcess.rawOutput) root.eventsByDate = {} } diff --git a/Widgets/ControlCenter/DisplayTab.qml b/Widgets/ControlCenter/DisplayTab.qml index 71b3f252..0705a6c6 100644 --- a/Widgets/ControlCenter/DisplayTab.qml +++ b/Widgets/ControlCenter/DisplayTab.qml @@ -62,7 +62,7 @@ ScrollView { // Night mode toggle Rectangle { width: (parent.width - Theme.spacingM) / 2 - height: 50 + height: 80 radius: Theme.cornerRadius color: Prefs.nightModeEnabled ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : @@ -72,19 +72,19 @@ ScrollView { Column { anchors.centerIn: parent - spacing: Theme.spacingXS + spacing: Theme.spacingS Text { text: Prefs.nightModeEnabled ? "nightlight" : "dark_mode" font.family: Theme.iconFont - font.pixelSize: Theme.iconSize + font.pixelSize: Theme.iconSizeLarge color: Prefs.nightModeEnabled ? Theme.primary : Theme.surfaceText anchors.horizontalCenter: parent.horizontalCenter } Text { text: "Night Mode" - font.pixelSize: Theme.fontSizeSmall + font.pixelSize: Theme.fontSizeMedium color: Prefs.nightModeEnabled ? Theme.primary : Theme.surfaceText font.weight: Font.Medium anchors.horizontalCenter: parent.horizontalCenter @@ -114,7 +114,7 @@ ScrollView { // Light/Dark mode toggle Rectangle { width: (parent.width - Theme.spacingM) / 2 - height: 50 + height: 80 radius: Theme.cornerRadius color: Theme.isLightMode ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : @@ -124,19 +124,19 @@ ScrollView { Column { anchors.centerIn: parent - spacing: Theme.spacingXS + spacing: Theme.spacingS Text { text: Theme.isLightMode ? "light_mode" : "palette" font.family: Theme.iconFont - font.pixelSize: Theme.iconSize + font.pixelSize: Theme.iconSizeLarge color: Theme.isLightMode ? Theme.primary : Theme.surfaceText anchors.horizontalCenter: parent.horizontalCenter } Text { text: Theme.isLightMode ? "Light Mode" : "Dark Mode" - font.pixelSize: Theme.fontSizeSmall + font.pixelSize: Theme.fontSizeMedium color: Theme.isLightMode ? Theme.primary : Theme.surfaceText font.weight: Font.Medium anchors.horizontalCenter: parent.horizontalCenter