apply reduced light mode opacity also to dock, notifications & OSD

This commit is contained in:
notiant
2026-03-28 23:11:39 +01:00
committed by GitHub
parent decb65ae95
commit 39a6671151
9 changed files with 23 additions and 25 deletions
+6 -7
View File
@@ -324,23 +324,22 @@ Singleton {
}
}
// Smart alpha calculation: automatically makes light mode more transparent
// Adaptive opacity calculation: automatically makes light mode more transparent
function adaptiveOpacity(baseOpacity) {
return Settings.data.colorSchemes.darkMode ? baseOpacity : Math.pow(baseOpacity, 1.5);
}
function smartAlpha(baseColor, minAlpha = 0.4) {
if (!Settings.data.ui.translucentWidgets)
return baseColor;
let alpha = Math.max(root.panelBackgroundOpacity, minAlpha);
let alpha = Math.max(adaptiveOpacity(Settings.data.ui.panelBackgroundOpacity), minAlpha);
// Combine with the base color's existing alpha
let resultAlpha = Math.max(0, baseColor.a - (1.0 - alpha));
return Qt.alpha(baseColor, resultAlpha);
}
readonly property real panelBackgroundOpacity: {
let baseOpacity = Settings.data.ui.panelBackgroundOpacity;
return Settings.data.colorSchemes.darkMode ? baseOpacity : Math.pow(baseOpacity, 2);
}
readonly property var colorKeyModel: [
{
"key": "none",