mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
NIconButtonHot: Hover state is always prioritized
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user