action center: toggles barely working

This commit is contained in:
end-4
2025-11-18 21:28:34 +01:00
parent f3bfe8a374
commit b650120fd4
85 changed files with 739 additions and 273 deletions
@@ -581,7 +581,7 @@ Singleton {
property bool leftAlignApps: false
}
property JsonObject actionCenter: JsonObject {
property list<string> toggles: []
property list<string> toggles: [ "network", "bluetooth", "easyEffects", "powerProfile", "idleInhibitor", "antiFlashbang", "nightLight", "darkMode", "cloudflareWarp", "mic", "audio", "musicRecognition", "notifications", "onScreenKeyboard", "gameMode", "screenSnip", "colorPicker" ]
}
}
}
@@ -124,4 +124,15 @@ Singleton {
var a = Math.max(0, Math.min(1, alpha));
return Qt.rgba(c.r, c.g, c.b, a);
}
/**
* Returns true if the color is considered "dark" (hslLightness < 0.5).
*
* @param {string} color - The color to check (any Qt.color-compatible string).
* @returns {boolean} True if dark, false otherwise.
*/
function isDark(color) {
var c = Qt.color(color);
return c.hslLightness < 0.5;
}
}