1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-28 23:42:51 -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

@@ -92,13 +92,11 @@ Item {
return "transparent";
}
const rawTransparency = (root.barConfig && root.barConfig.widgetTransparency !== undefined) ? root.barConfig.widgetTransparency : 1.0;
const isHovered = mouseArea.containsMouse || (root.isHovered || false);
if (isHovered) {
return Theme.primaryPressed;
}
const transparency = isHovered ? Math.max(0.3, rawTransparency) : rawTransparency;
const baseColor = isHovered ? Theme.widgetBaseHoverColor : Theme.widgetBaseBackgroundColor;
const baseColor = Theme.widgetBaseBackgroundColor;
const transparency = (root.barConfig && root.barConfig.widgetTransparency !== undefined) ? root.barConfig.widgetTransparency : 1.0;
if (Theme.widgetBackgroundHasAlpha) {
return Qt.rgba(baseColor.r, baseColor.g, baseColor.b, baseColor.a * transparency);
}