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

Tooltips and PopupMenus can't be made transparent anymore (DisplayServer regression) #76071

Closed
shmellyorc opened this issue Apr 14, 2023 · 11 comments · Fixed by #81669
Closed

Comments

@shmellyorc
Copy link

shmellyorc commented Apr 14, 2023

Godot version

4.0

System information

Windows 10

Issue description

If you modify a theme with ToolTipPanel and you modify the texture of the tooltip, some odd color is behind it.

I tried going through almost every theme node and tried to set the color or panel empty and nothing removes the background color.

I even set the tooltip panel, panel to none/empty and it still shows some black texture behind it.

IMO, if its not broke, dont fix it

when ran:
ApplicationFrameHost_H7004DMbK4

texture:
Aseprite_lhJJaFwi12

theme menu thingy:
Godot_Zhwfs9zFpf

Steps to reproduce

  1. Make a project
  2. add a button
  3. set the button tooltip text to anything
  4. make a theme from the button
  5. add tooltip panel to the theme
  6. add panel style
  7. set the panel style to styelboxtexture
  8. add a texture
  9. run the game
  10. move your mouse over the button and wait for the tooltip to appear

it will show a color behind it. Very annoying.

Minimal reproduction project

do what is shown in "Steps to reproduce"

@Calinou
Copy link
Member

Calinou commented Apr 14, 2023

@shmellyorc Please upload a minimal reproduction project to make this easier to troubleshoot.

Is Embed Subwindows enabled in the advanced Project Settings? If not, tooltips are spawned as separate windows, which means that they cannot have things drawn behind unless per-pixel transparency is enabled for them. (There's currently no way to enable per-pixel transparency globally for all tooltips if they're separate windows.)

IMO, if its not broke, dont fix it

This isn't an intentional decision. Assume good faith 🙂

@folleah
Copy link

folleah commented Apr 25, 2023

Столкнулся с такой же проблемой.

@Zireael07
Copy link
Contributor

Please use English when posting to this repo. Very few contributors know Russian. I can only tell that "..... same problem"

@YuriSizov
Copy link
Contributor

@Zireael07 They just confirmed they have the same problem. But indeed, this is an international board and everyone should use English, even if through an automatic translator.

@aldocd4
Copy link

aldocd4 commented May 6, 2023

Hello, I had the same issue when using tooltip, still no solution on my side.

I'm overriding the TooltipPanel "panel" property to StyleboxEmpty for example, but it seems there is still a grey background on the tooltip.

image

Here is what happens when I set a red background color with a radius:

image

Thanks.

@Calinou Calinou changed the title Remove background color on tooltips. I cannot remove it myself thru themes. Tooltips can't be made transparent anymore (DisplayServer regression) May 6, 2023
@filkata
Copy link

filkata commented Jun 18, 2023

Suffering from the same issue on 4.0.2, changing the Embed Subwindows setting had no effect.

@akien-mga
Copy link
Member

#78823 has a minimum reproduction project: tooltip_bug.zip

@Calinou Calinou changed the title Tooltips can't be made transparent anymore (DisplayServer regression) Tooltips and PopupMenus can't be made transparent anymore (DisplayServer regression) Jul 27, 2023
@Distantz
Copy link
Contributor

Can confirm this issue on 4.1.1.

@kleonc
Copy link
Member

kleonc commented Sep 14, 2023

The issue is the tooltip PopupPanel has no transparent background enabled (PopupPanel extends Viewport).

As a workaround e.g. autoloading such script does the thing:

extends Node

func _enter_tree() -> void:
	get_tree().node_added.connect(on_node_added)

func on_node_added(node: Node) -> void:
	var pp := node as PopupPanel
	if pp and pp.theme_type_variation == "TooltipPanel":
		pp.transparent_bg = true

@alpapaydin
Copy link

same problem with 4.2.1

@AThousandShips
Copy link
Member

Please open a new report as this was solved in 4.2 so you are experiencing a different bug, assuming you are configuring things correctly

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

Successfully merging a pull request may close this issue.