Fix panel button context menu overlap with tooltip hint (#30108)
This fix works by disabling the tooltip whenever the menu is being rendered. ### Before  ### After  Release Notes: - Fix panel button tooltip overlapping with the panel button's right click menu
This commit is contained in:
parent
02765947e0
commit
7bc3f74cab
4 changed files with 239 additions and 229 deletions
|
@ -889,7 +889,7 @@ impl Render for PanelButtons {
|
|||
})
|
||||
.anchor(menu_anchor)
|
||||
.attach(menu_attach)
|
||||
.trigger(
|
||||
.trigger(move |is_active| {
|
||||
IconButton::new(name, icon)
|
||||
.icon_size(IconSize::Small)
|
||||
.toggle_state(is_active_button)
|
||||
|
@ -899,10 +899,12 @@ impl Render for PanelButtons {
|
|||
window.dispatch_action(action.boxed_clone(), cx)
|
||||
}
|
||||
})
|
||||
.tooltip(move |window, cx| {
|
||||
Tooltip::for_action(tooltip.clone(), &*action, window, cx)
|
||||
}),
|
||||
),
|
||||
.when(!is_active, |this| {
|
||||
this.tooltip(move |window, cx| {
|
||||
Tooltip::for_action(tooltip.clone(), &*action, window, cx)
|
||||
})
|
||||
})
|
||||
}),
|
||||
)
|
||||
})
|
||||
.collect();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue