summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkleonc <9283098+kleonc@users.noreply.github.com>2023-09-14 23:37:28 +0200
committerkleonc <9283098+kleonc@users.noreply.github.com>2023-09-14 23:39:28 +0200
commitc66dfd2cfe8f2bb11b1ac5b237b9aba63fdd069f (patch)
tree43672933b680d187643d3ddba91d2afc668a291a
parent98b50eb3083094a352b36b184d7b60b77ad982fe (diff)
downloadredot-engine-c66dfd2cfe8f2bb11b1ac5b237b9aba63fdd069f.tar.gz
Enable transparent background for GUI tooltips
-rw-r--r--scene/main/viewport.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index 5f8f5225c9..1da6f20335 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);