mirror of
https://github.com/emilk/egui.git
synced 2026-06-28 15:33:14 -04:00
Don't show backdrop for popupkind tooltip
This commit is contained in:
@@ -623,8 +623,10 @@ impl<'a> Popup<'a> {
|
||||
// - Explicit per-instance override takes priority
|
||||
// - Otherwise, fall back to global style
|
||||
// - Submenus (parent layer is Foreground) never show a backdrop
|
||||
// - Tooltips never show a backdrop
|
||||
let is_submenu = layer_id.order == Order::Foreground;
|
||||
let show_backdrop = !is_submenu
|
||||
&& kind != PopupKind::Tooltip
|
||||
&& backdrop.unwrap_or_else(|| ctx.global_style().visuals.popup_backdrop);
|
||||
|
||||
let mut backdrop_clicked = false;
|
||||
|
||||
@@ -28,8 +28,7 @@ impl Tooltip<'_> {
|
||||
popup: Popup::new(parent_widget, ctx, anchor.into(), parent_layer)
|
||||
.kind(PopupKind::Tooltip)
|
||||
.gap(4.0)
|
||||
.sense(Sense::hover())
|
||||
.backdrop(false),
|
||||
.sense(Sense::hover()),
|
||||
parent_layer,
|
||||
parent_widget,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user