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

Editor Tooltip has transparency background with transparent font color. #92712

Closed
hydescarf opened this issue Jun 3, 2024 · 7 comments · Fixed by #95009
Closed

Editor Tooltip has transparency background with transparent font color. #92712

hydescarf opened this issue Jun 3, 2024 · 7 comments · Fixed by #95009

Comments

@hydescarf
Copy link

Tested versions

  • Reproducible: v4.3.dev6, v4.3.beta1
  • Non-reproducible: v4.2, v4.3.dev1, v4.3.dev4, v4.3.dev5

System information

Godot v4.3.beta1 - Windows 10.0.22631 (Windows 11) - GLES3 (Compatibility) - NVIDIA GeForce GTX 1050 (NVIDIA; 31.0.15.3734) - 12th Gen Intel(R) Core(TM) i5-12400 (12 Threads)

Issue description

Tooltip has color issue, but I was not able to identify the problem through Editor Theming.
Removing Godot folders from AppData (Local & Roaming) does not fix the problem.
On the other hand, my old laptop runs v4.3.dev6 without issues. I suspect this to be related to system components (GPU?)
Old laptop specs:

  • Windows 10.0.19045 - GLES3 (Compatibility) - GeForce 820M () - Intel(R) Core(TM) i5-4200U CPU @ 1.60GHz (4 Threads)

Steps to reproduce

  1. Fresh install of Godot v4.3.dev6 / beta1, with related folders in AppData deleted.
  2. Hover to icons and stuff to pop up the tooltip.

During dark mode, background is transparency.
image
During light mode, text is fully transparent.
image

Compare to previous versions ~v4.3.dev5 (working normal colors):
image
image

Minimal reproduction project (MRP)

N/A

@AThousandShips
Copy link
Member

I can't confirm on Windows 10 with Compatibility or Forward+, so this seems like it'd be hardware specific

@Calinou
Copy link
Member

Calinou commented Jun 3, 2024

It looks like tooltips are using window transparency now (which is a good thing, so their rounded corners can actually be seen). However, premultiplied alpha is used for window transparency in 4.x. This means that transparent black is invisible, but transparent white is visible as pure additive white. See #83939.

@hydescarf
Copy link
Author

Update:
In case if anyone needs a temporary solution:
After exploring #94189 (comment) and #94615 (comment), enabling Single Window Mode fixed the issue, but that also means multi-window mode cannot be used at the meantime.

@akien-mga akien-mga added this to the 4.3 milestone Jul 26, 2024
@akien-mga akien-mga moved this from Unassessed to Bad in 4.x Release Blockers Jul 26, 2024
@akien-mga
Copy link
Member

I can't reproduce the issue on Linux (AMD GPU) with either Compatibility or Forward+ renderers:

image

Might be Windows specific, CC @bruvzg.

@hydescarf
Copy link
Author

hydescarf commented Jul 27, 2024

Further testings:

  • Enabling Single Window Mode (SWM) fixes the issue on beta-1 & rc-1.
  • If you have only one monitor, regardless of the SWM and the above version differences, tooltips are never in transparency.
  • If you have two monitors, issue persists as usual if SWM is not enabled. (Extra: the tooltips sometimes show up for 0.1s and disappear)

Edit: So the reason my old laptop wasn't able to reproduce the issue might be because of it only has a single screen.

@kitbdev
Copy link
Contributor

kitbdev commented Aug 1, 2024

I can reproduce.
Godot v4.3.dev6.official [89850d5] and v4.3.rc (3978628) - Windows 10.0.22631 - GLES3 (Compatibility) - NVIDIA GeForce RTX 2070 (NVIDIA; 31.0.15.5186) - Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz (12 Threads)
Only happens on Compatibility.
Single window mode must not be enabled. It happens even if there is only one monitor.

Likely caused by this line from #86553 when the popup window is made:

godot/scene/main/viewport.cpp

Lines 1486 to 1487 in 3978628

// A non-embedded tooltip window will only be transparent if per_pixel_transparency is allowed in the main Viewport.
panel->set_flag(Window::FLAG_TRANSPARENT, true);

image

@akien-mga
Copy link
Member

It's not clear to me why this was added in that PR, but ai think we could revert that flag change.

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