Repository navigation
refactor(launchpad): use shared tooltip timing #865
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -486,15 +486,6 @@ AppletItem { | |
| onXChanged: updateLaunchpadPos() | ||
| onYChanged: updateLaunchpadPos() | ||
| } | ||
| Timer { | ||
| id: toolTipShowTimer | ||
| interval: 50 | ||
| onTriggered: { | ||
| var point = Applet.rootObject.mapToItem(null, Applet.rootObject.width / 2, Applet.rootObject.height / 2) | ||
| toolTip.DockPanelPositioner.bounding = Qt.rect(point.x, point.y, toolTip.width, toolTip.height) | ||
| toolTip.open() | ||
| } | ||
| } | ||
|
|
||
| TapHandler { | ||
| id: tapHandler | ||
|
|
@@ -518,12 +509,10 @@ AppletItem { | |
| HoverHandler { | ||
| onHoveredChanged: { | ||
| if (hovered) { | ||
| toolTipShowTimer.start() | ||
| const point = launcher.mapToItem(null, launcher.width / 2, launcher.height / 2) | ||
| toolTip.DockPanelPositioner.bounding = Qt.rect(point.x, point.y, toolTip.width, toolTip.height) | ||
| toolTip.open() | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Medium · Tooltip appears after right-click When the pointer is hovering over the icon and the user right-clicks before the shared tooltip delay expires, the right-button tap is accepted, but the handler only calls Cancel or close the pending tooltip when the handler accepts a right-button tap. Also at Prompt for AI agentsIn `shell-launcher-applet/package/launcheritem.qml` at line 514:
**Tooltip appears after right-click**
When the pointer is hovering over the icon and the user right-clicks before the shared tooltip delay expires, the right-button tap is accepted, but the handler only calls `toggleLauncher()` for left-button clicks and does not close or cancel the pending tooltip. `PanelToolTip.open()` therefore completes its delay and the tooltip appears after the right-click.
Cancel or close the pending tooltip when the handler accepts a right-button tap.
Also at `shell-launcher-applet/package/launcheritem.qml:515`. |
||
| } else { | ||
| if (toolTipShowTimer.running) { | ||
| toolTipShowTimer.stop() | ||
| } | ||
|
|
||
| toolTip.close() | ||
| } | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 Medium · Tooltip appears at old position
When the dock or launcher moves or resizes while the tooltip is waiting to open, the hover handler captures the launcher bounds before
PanelToolTip.open()waits for the shared delay. The dock movement leavesDockPanelPositioner.boundingstale, so the tooltip appears at the launcher’s previous position.Update
DockPanelPositioner.boundingafter the delay using the launcher’s current position and size.Prompt for AI agents