NIconButtonHot: Hover state is always prioritized

This commit is contained in:
Lemmy
2026-02-10 21:29:25 -05:00
parent 4edb4a177d
commit 75ab4b5b21
+3 -8
View File
@@ -47,15 +47,13 @@ Rectangle {
// Appearance
opacity: root.enabled ? Style.opacityFull : Style.opacityMedium
color: {
if (pressed) {
if (root.enabled && root.hovering || pressed) {
return colorBgHover;
}
if (hot) {
return colorBgHot;
}
if (root.enabled && root.hovering) {
return colorBgHover;
}
return colorBg;
}
radius: Math.min(Style.iRadiusL, width / 2)
@@ -76,15 +74,12 @@ Rectangle {
pointSize: Math.max(1, Math.round(root.width * 0.48))
applyUiScale: root.applyUiScale
color: {
if (pressed) {
if (root.enabled && root.hovering || pressed) {
return colorFgHover;
}
if (hot) {
return colorFgHot;
}
if (root.enabled && root.hovering) {
return colorFgHover;
}
return colorFg;
}
// Center horizontally