[PR #1429] [MERGED] fix(tray): preserve tooltip when icon widget changes #4177

Closed
opened 2026-05-22 23:57:55 +01:00 by JakeStanger · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/JakeStanger/ironbar/pull/1429
Author: @nazya
Created: 3/23/2026
Status: Merged
Merged: 3/28/2026
Merged by: @JakeStanger

Base: masterHead: fix/tray-tooltip-after-icon-update


📝 Commits (1)

  • b310ce3 fix(tray): preserve tooltip when icon widget changes

📊 Changes

1 file changed (+8 additions, -2 deletions)

View changed files

📝 src/modules/tray/interface.rs (+8 -2)

📄 Description

UpdateEvent::Icon rebuilds the tray image widget via set_image().
When that happens, the old widget is removed and the new Picture does not inherit the existing tooltip.
As a result, tray item tooltips can disappear after an icon change and stop appearing on later hover events.

What this changes

  • Preserves the current tooltip before replacing the image widget.
  • Reapplies that tooltip to the new Picture.
  • Also sets the tooltip on the root tray Button so tooltip state survives child widget replacement.

Reproduction

  • Run a StatusNotifierItem that updates IconName dynamically.
  • Hover the tray item and confirm the tooltip is visible.
  • Change the icon at runtime, for example:
    • mute/unmute a volume tray item
    • cross a volume icon threshold
  • Before this patch, the tooltip can disappear after the icon update and never return on later hover.
  • After this patch, the tooltip remains available after icon changes.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/JakeStanger/ironbar/pull/1429 **Author:** [@nazya](https://github.com/nazya) **Created:** 3/23/2026 **Status:** ✅ Merged **Merged:** 3/28/2026 **Merged by:** [@JakeStanger](https://github.com/JakeStanger) **Base:** `master` ← **Head:** `fix/tray-tooltip-after-icon-update` --- ### 📝 Commits (1) - [`b310ce3`](https://github.com/JakeStanger/ironbar/commit/b310ce3ac293b030f13935fa331a75c64cf2798f) fix(tray): preserve tooltip when icon widget changes ### 📊 Changes **1 file changed** (+8 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/modules/tray/interface.rs` (+8 -2) </details> ### 📄 Description `UpdateEvent::Icon` rebuilds the tray image widget via `set_image()`. When that happens, the old widget is removed and the new `Picture` does not inherit the existing tooltip. As a result, tray item tooltips can disappear after an icon change and stop appearing on later hover events. ## What this changes - Preserves the current tooltip before replacing the image widget. - Reapplies that tooltip to the new `Picture`. - Also sets the tooltip on the root tray `Button` so tooltip state survives child widget replacement. ## Reproduction - Run a `StatusNotifierItem` that updates `IconName` dynamically. - Hover the tray item and confirm the tooltip is visible. - Change the icon at runtime, for example: - mute/unmute a volume tray item - cross a volume icon threshold - Before this patch, the tooltip can disappear after the icon update and never return on later hover. - After this patch, the tooltip remains available after icon changes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
JakeStanger 2026-05-22 23:57:55 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
JakeStanger/ironbar#4177
No description provided.