Fix missing tooltips for selected buttons (#18435)

Reverts #13857. Hiding tooltips for selected buttons prevents tooltips
like "Close x dock" from showing up, see #14938 for an example.
The intention of the original PR was to hide the "Show application menu"
tooltip, while the context menu is open.
In order to fix this without breaking other UI elements, we track the
state of the context menu using `PopoverMenuHandle` now, which allows us
to prevent the tooltip from showing up while the context menu is open.

Closes #14938

Release Notes:

- Fixed an issue where some tooltips would not show up
This commit is contained in:
Bennet Bo Fenner authored and GitHub committed 2024-09-27 14:16:14 +02:00
1 parent 9aa4562564
commit 2c4e67ea32
5 files changed
+47 -25

No files matched your search

@@ -523,10 +523,8 @@ impl RenderOnce for ButtonLike {
})
},
)
.when(!self.selected, |this| {
this.when_some(self.tooltip, |this, tooltip| {
this.tooltip(move |cx| tooltip(cx))
})
.when_some(self.tooltip, |this, tooltip| {
this.tooltip(move |cx| tooltip(cx))
})
.children(self.children)
}