1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-30 00:12:50 -05:00

bar: change widget base hover blend logic

This commit is contained in:
bbedward
2025-12-27 00:49:11 -05:00
parent 9fc0d5efff
commit 0787c63fed
6 changed files with 26 additions and 29 deletions

View File

@@ -86,12 +86,10 @@ Item {
return "transparent";
}
if (privacyArea.containsMouse) {
return Theme.primaryPressed;
}
const baseColor = Theme.widgetBaseBackgroundColor;
const transparency = (root.barConfig && root.barConfig.widgetTransparency !== undefined) ? root.barConfig.widgetTransparency : 1.0;
const rawTransparency = (root.barConfig && root.barConfig.widgetTransparency !== undefined) ? root.barConfig.widgetTransparency : 1.0;
const isHovered = privacyArea.containsMouse;
const transparency = isHovered ? Math.max(0.3, rawTransparency) : rawTransparency;
const baseColor = isHovered ? Theme.widgetBaseHoverColor : Theme.widgetBaseBackgroundColor;
return Theme.withAlpha(baseColor, transparency);
}
}