Skip to content

Commit 9779ecf

Browse files
committed
fix(dock): fix hover bottom border invisible for non-active app items
When AppItemBackground overrides outsideBorderColor from the base class, the hovered state was incorrectly set to :normal, causing non-active app items to use the normal color (transparent) on hover - making the bottom border completely invisible. Unify outsideBorderColor with the same palette definition as activeOutsideBorderColor to ensure hover state has dedicated visible color values. AppItemBackground子类覆盖基类outsideBorderColor时,hovered状态 错误地设为:normal,导致非活跃应用的hover底边使用normal色 (transparent)而完全不可见。将outsideBorderColor统一为与 activeOutsideBorderColor相同的完整palette定义,使hover态有独立的 可见颜色值。 Log: 修复任务栏非活跃应用hover底边描边不可见的问题 PMS: BUG-364205 Influence: 仅影响任务栏应用图标hover底边效果,非活跃应用hover时底边描边恢复正常显示,不影响托盘等其他组件。
1 parent c37a0d8 commit 9779ecf

1 file changed

Lines changed: 22 additions & 6 deletions

File tree

panels/dock/taskmanager/package/AppItemBackground.qml

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,30 @@ AppletItemBackground {
105105
pressedDark: pressed
106106
}
107107
outsideBorderColor: Palette {
108-
normal: {
109-
crystal: ("transparent")
108+
normal {
109+
crystal: if (displayMode === Dock.Efficient) {
110+
return Qt.rgba(0, 0, 0, 0.1)
111+
} else {
112+
return ("transparent")
113+
}
114+
}
115+
normalDark {
116+
crystal: if (displayMode === Dock.Efficient) {
117+
return Qt.rgba(0, 0, 0, 0.05)
118+
} else {
119+
return ("transparent")
120+
}
121+
}
122+
hovered {
123+
crystal: Qt.rgba(0.0, 0.0, 0.0, 0.10)
110124
}
111-
normalDark: normal
112-
hovered : normal
113125
hoveredDark: hovered
114-
pressed: hovered
115-
pressedDark: pressed
126+
pressed {
127+
crystal: Qt.rgba(0.0, 0.0, 0.0, 0.10)
128+
}
129+
pressedDark {
130+
crystal: Qt.rgba(0.0, 0.0, 0.0, 0.05)
131+
}
116132
}
117133
activeOutsideBorderColor: Palette {
118134
normal {

0 commit comments

Comments
 (0)