Skip to content

Commit

Permalink
Merge pull request #81669 from kleonc/gui-tooltip-transparent-background
Browse files Browse the repository at this point in the history
Enable transparent background for GUI tooltips
  • Loading branch information
YuriSizov committed Sep 15, 2023
2 parents e5ad3d4 + c66dfd2 commit dd3638d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scene/main/viewport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit dd3638d

Please sign in to comment.