diff options
author | Yuri Sizov <yuris@humnom.net> | 2023-09-15 19:48:37 +0200 |
---|---|---|
committer | Yuri Sizov <yuris@humnom.net> | 2023-09-15 19:48:37 +0200 |
commit | dd3638d425eb8c93ff2142dff1b566475b34340f (patch) | |
tree | 6dcf7536d8afac49aa24ae82729d7b23606b421b | |
parent | e5ad3d4d58fff417a9306bd802d622402ba303c7 (diff) | |
parent | c66dfd2cfe8f2bb11b1ac5b237b9aba63fdd069f (diff) | |
download | redot-engine-dd3638d425eb8c93ff2142dff1b566475b34340f.tar.gz |
Merge pull request #81669 from kleonc/gui-tooltip-transparent-background
Enable transparent background for GUI tooltips
-rw-r--r-- | scene/main/viewport.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index 518cc4b7c9..ad11c80c42 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -1489,6 +1489,9 @@ void Viewport::_gui_show_tooltip() { PopupPanel *panel = memnew(PopupPanel); panel->set_theme_type_variation(SNAME("TooltipPanel")); + // Ensure no opaque background behind the panel as its StyleBox can be partially transparent (e.g. corners). + panel->set_transparent_background(true); + // Controls can implement `make_custom_tooltip` to provide their own tooltip. // This should be a Control node which will be added as child to a TooltipPanel. Control *base_tooltip = tooltip_owner->make_custom_tooltip(tooltip_text); |