godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.17k stars 21.2k forks source link

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

Closed shmellyorc closed 1 year ago

shmellyorc commented 1 year ago

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 commented 1 year ago

@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 :slightly_smiling_face:

folleah commented 1 year ago

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

Zireael07 commented 1 year ago

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

YuriSizov commented 1 year ago

@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 commented 1 year ago

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.

filkata commented 1 year ago

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

akien-mga commented 1 year ago

78823 has a minimum reproduction project: tooltip_bug.zip

Distantz commented 1 year ago

Can confirm this issue on 4.1.1.

kleonc commented 1 year ago

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 commented 8 months ago

same problem with 4.2.1

AThousandShips commented 8 months ago

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