forked from Shinonome/dots-hyprland
action center: toggles barely working
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user