mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-28 15:32:50 -05:00
theme: add colorful bar widget option
This commit is contained in:
@@ -665,6 +665,34 @@ Singleton {
|
||||
}
|
||||
}
|
||||
|
||||
property color widgetIconColor: {
|
||||
if (typeof SettingsData === "undefined") {
|
||||
return surfaceText
|
||||
}
|
||||
|
||||
switch (SettingsData.widgetColorMode) {
|
||||
case "colorful":
|
||||
return surfaceText
|
||||
case "default":
|
||||
default:
|
||||
return surfaceText
|
||||
}
|
||||
}
|
||||
|
||||
property color widgetTextColor: {
|
||||
if (typeof SettingsData === "undefined") {
|
||||
return surfaceText
|
||||
}
|
||||
|
||||
switch (SettingsData.widgetColorMode) {
|
||||
case "colorful":
|
||||
return primary
|
||||
case "default":
|
||||
default:
|
||||
return surfaceText
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function isColorDark(c) {
|
||||
return (0.299 * c.r + 0.587 * c.g + 0.114 * c.b) < 0.5
|
||||
|
||||
Reference in New Issue
Block a user