Skip to content

Commit 68f5079

Browse files
committed
fix: update tooltip window property bindings and hover behavior
1. Changed tooltip window property bindings from "width"/"height" to "requestedWidth"/"requestedHeight" in PanelToolTip.qml 2. Added tooltip close functionality when quick panel is opened in PanelTrayItem.qml 3. Removed hover handler enabled condition to ensure consistent hover behavior The changes update tooltip property bindings to use more appropriate property names ("requestedWidth"/"requestedHeight") which better reflect their purpose. Also fixes tooltip behavior by closing it when the quick panel opens, preventing tooltips from remaining visible when they shouldn't be. The hover handler condition removal ensures hover detection works consistently regardless of panel state. Log: Fixed tooltip behavior in quick panel - tooltips now properly close when panel opens Influence: 1. Test tooltip display when hovering over quick panel icon 2. Verify tooltip disappears when quick panel is opened 3. Check tooltip positioning and sizing with different content 4. Test hover behavior consistency when panel is open/closed 5. Verify no visual artifacts or overlapping elements fix: 更新工具提示窗口属性绑定和悬停行为 1. 在 PanelToolTip.qml 中将工具提示窗口属性绑定从 "width"/"height" 改为 "requestedWidth"/"requestedHeight" 2. 在 PanelTrayItem.qml 中添加快速面板打开时关闭工具提示的功能 3. 移除悬停处理器的启用条件以确保一致的悬停行为 这些更改将工具提示属性绑定更新为使用更合适的属性名称 ("requestedWidth"/"requestedHeight"),更好地反映其用途。同时修复了工具 提示行为,在快速面板打开时关闭工具提示,防止工具提示在不应该显示时仍然可 见。移除悬停处理器条件可确保悬停检测无论面板状态如何都能一致工作。 Log: 修复快速面板中的工具提示行为 - 面板打开时工具提示现在能正确关闭 Influence: 1. 测试悬停在快速面板图标上时工具提示的显示 2. 验证打开快速面板时工具提示是否消失 3. 检查不同内容下工具提示的定位和大小调整 4. 测试面板打开/关闭时的悬停行为一致性 5. 验证没有视觉伪影或元素重叠 PMS: BUG-296251
1 parent df3f55c commit 68f5079

3 files changed

Lines changed: 10 additions & 5 deletions

File tree

frame/qml/PanelMenu.qml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ Item {
2222

2323
Binding {
2424
when: readyBinding
25-
target: menuWindow; property: "width"
25+
target: menuWindow; property: "requestedWidth"
2626
value: menu.width
2727
}
2828
Binding {
2929
when: readyBinding
30-
target: menuWindow; property: "height"
30+
target: menuWindow; property: "requestedHeight"
3131
value: menu.height
3232
}
3333
Binding {

frame/qml/PanelToolTip.qml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ Item {
2525

2626
Binding {
2727
when: readyBinding
28-
target: toolTipWindow; property: "width"
28+
target: toolTipWindow; property: "requestedWidth"
2929
value: toolTip.width + toolTip.leftPadding + toolTip.rightPadding
3030
}
3131
Binding {
3232
when: readyBinding
33-
target: toolTipWindow; property: "height"
33+
target: toolTipWindow; property: "requestedHeight"
3434
value: toolTip.height
3535
}
3636
Binding {

panels/dock/tray/quickpanel/PanelTrayItem.qml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ Control {
2525
property Palette textColor: DockPalette.iconTextPalette
2626
palette.windowText: ColorSelector.textColor
2727

28+
onIsOpenedChanged: {
29+
if (root.isOpened) {
30+
toolTip.close()
31+
}
32+
}
33+
2834
PanelToolTip {
2935
id: toolTip
3036
text: qsTr("Quick actions")
@@ -60,7 +66,6 @@ Control {
6066
smooth: false
6167
}
6268
HoverHandler {
63-
enabled: !root.isOpened
6469
onHoveredChanged: function () {
6570
root.contentHovered = hovered
6671
if (hovered && !root.isOpened) {

0 commit comments

Comments
 (0)