Repository navigation
refactor(launchpad): use shared tooltip timing #866
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 · Right-click leaves tooltip open When the pointer remains over the icon and the user right-clicks before the shared tooltip delay expires, Handle right-button taps by closing the tooltip and cancelling its pending display. Also at Prompt for AI agentsIn `shell-launcher-applet/package/launcheritem.qml` at line 514:
**Right-click leaves tooltip open**
When the pointer remains over the icon and the user right-clicks before the shared tooltip delay expires, `TapHandler.onTapped` accepts right-button taps but only calls `toggleLauncher()` for the left button, so it does not close or cancel the pending tooltip and the tooltip appears after the delay.
Handle right-button taps by closing the tooltip and cancelling its pending display.
Also at `shell-launcher-applet/package/launcheritem.qml:515`.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 · Older shell loses tooltip delay When the launcher is deployed with a dde-shell build that satisfies the current dependency but predates the shared timing change, Require the first dde-shell version containing the shared tooltip timing change, or preserve a local fallback for older versions. Prompt for AI agentsIn `shell-launcher-applet/package/launcheritem.qml` at line 514:
**Older shell loses tooltip delay**
When the launcher is deployed with a dde-shell build that satisfies the current dependency but predates the shared timing change, `toolTip.open()` relies on the shared delay added by the companion dde-shell change. With an older dde-shell build, the removed local timer is no longer there and the tooltip opens immediately instead of using the common delay.
Require the first dde-shell version containing the shared tooltip timing change, or preserve a local fallback for older versions. |
||
| } 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 during the shared tooltip delay,
DockPanelPositioner.boundingretains the coordinates assigned on hover entry whiletoolTip.open()waits for the shared delay, so the tooltip appears detached from the launcher.Update
DockPanelPositioner.boundingafter the delay using the launcher’s current position and size.Prompt for AI agents