1- // SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd.
1+ // SPDX-FileCopyrightText: 2024 - 2026 UnionTech Software Technology Co., Ltd.
22//
33// SPDX-License-Identifier: GPL-3.0-or-later
44
@@ -17,16 +17,12 @@ Item {
1717 property int toolTipVOffset: 0
1818 signal popupCreated (var surfaceId)
1919
20- PanelToolTipWindow {
21- id: toolTipWindow
22- onVisibleChanged : function (arg ) {
23- if (arg && menuWindow .visible )
24- menuWindow .close ()
25- }
26- }
2720 PanelToolTip {
2821 id: toolTip
29- toolTipWindow: toolTipWindow
22+ onToolTipVisibleChanged : function (visible ) {
23+ if (visible && menuWindow .visible )
24+ menuWindow .close ()
25+ }
3026
3127 property alias shellSurface: surfaceLayer .shellSurface
3228 ShellSurfaceItemProxy {
4844 PanelMenuWindow {
4945 id: menuWindow
5046 onVisibleChanged : function (arg ) {
51- if (arg && toolTipWindow . visible )
52- toolTipWindow .close ()
47+ if (arg && toolTip . toolTipVisible )
48+ toolTip .close ()
5349 }
5450 onUpdateGeometryFinished : function () {
5551 if (! menu .shellSurface )
@@ -128,10 +124,10 @@ Item {
128124
129125 toolTip .shellSurface = popupSurface
130126 toolTip .toolTipX = Qt .binding (function () {
131- return toolTip .shellSurface .x - toolTip .width / 2
127+ return Panel . popupWindow . xOffset + toolTip .shellSurface .x - toolTip .width / 2
132128 })
133129 toolTip .toolTipY = Qt .binding (function () {
134- return toolTip .shellSurface .y - toolTip .height - toolTipVOffset
130+ return Panel . popupWindow . yOffset + toolTip .shellSurface .y - toolTip .height - toolTipVOffset
135131 })
136132 toolTip .open ()
137133 } else if (popupSurface .popupType === Dock .TrayPopupTypeMenu ) {
0 commit comments