Commit f68b2908 authored by Bharadwaj Raju's avatar Bharadwaj Raju
Browse files

kcms/nightcolor: Activate Night Color *after* setting mode

Otherwise, a bug can be seen on a fresh system: if NC is currently "Always off", trying to set it to manual actually sets it to current, which is obviously not ideal.


(cherry picked from commit 509280d8)
parent c2b84336
Pipeline #241596 passed with stage
in 13 minutes and 25 seconds
......@@ -119,10 +119,10 @@ KCM.SimpleKCM {
}
}
onCurrentIndexChanged: {
kcm.nightColorSettings.active = (currentIndex !== 0);
if (currentIndex !== 0) {
kcm.nightColorSettings.mode = currentIndex - 1;
}
kcm.nightColorSettings.active = (currentIndex !== 0);
if (currentIndex - 1 == NightColorMode.Automatic && kcm.nightColorSettings.active) {
startLocator();
} else {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment