Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable transparent background for GUI tooltips #81669

Merged

Conversation

kleonc
Copy link
Member

@kleonc kleonc commented Sep 14, 2023

Fixes #76071.

@kleonc kleonc added bug regression topic:gui cherrypick:4.0 cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release labels Sep 14, 2023
@kleonc kleonc added this to the 4.2 milestone Sep 14, 2023
@kleonc kleonc requested a review from a team as a code owner September 14, 2023 21:42
@YuriSizov YuriSizov merged commit dd3638d into godotengine:master Sep 15, 2023
15 checks passed
@YuriSizov
Copy link
Contributor

Thanks!

@kleonc kleonc deleted the gui-tooltip-transparent-background branch September 15, 2023 20:48
@YuriSizov YuriSizov removed the cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release label Sep 20, 2023
@YuriSizov
Copy link
Contributor

Cherry-picked for 4.1.2.

@tropical32
Copy link

Would this also need to be applied to MenuButton and OptionButton?

image

@kleonc
Copy link
Member Author

kleonc commented Oct 11, 2023

Would this also need to be applied to MenuButton and OptionButton?

For their PopupMenus (obtainable with MenuButton.get_popup()/OptionButton.get_popup()), yes.

In general any Viewport (Popup extends Viewport) can have such issue.

When such Nodes are user-created then the relevant Viewport's background transparency can be enabled manually though, see: #81669 (comment). So for runtime things it should already be solvable by the user. In case of nodes using a Viewport themselves (like MenuButton, OptionButton or ColorPickerButton) the background transparency can be still enabled easily as long as there's a method like get_popup allowing to obtain such Viewport. Tooltips aren't directly created by the user so this was kinda a different case (default tooltip Popup is not easily obtainable AFAICT).

But in-editor created nodes don't have transparency enabled (at least in most cases), meaning e.g. a custom editor Theme with transparent parts for Popups currently have the same issue:
firefox_pOTYKDeooN

So this editor part probably needs addressing.

The simplest solution (for both editor and user projects) would be to change Viewport background transparency to be enabled by default in some cases (like for Popups drawing StyleBoxes). I guess the question is whether doing so could hurt the performance in general case. If yes, then it probably shouldn't be done (then the question would be whether editor stuff should enable backgroud transparency by default).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tooltips and PopupMenus can't be made transparent anymore (DisplayServer regression)
3 participants