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

Gradient editor displays bright magenta background instead of checker background for transparent colors #41561

Closed
Calinou opened this issue Aug 27, 2020 · 4 comments · Fixed by #43158

Comments

@Calinou
Copy link
Member

Calinou commented Aug 27, 2020

Godot version: Git 7a62b94

OS/device including version: Fedora 31, GeForce GTX 1080 (NVIDIA 440.100)

Issue description:

The Gradient editor fails to display its checker background for transparent colors and will display a bright magenta color instead.

image

This GUI component is drawn by scene/gui/gradient_edit.cpp.

Steps to reproduce: Create a Gradient resource in the Inspector dock by using the New Resource button, then edit one of its points to have an alpha value lower than 1.0.

Minimal reproduction project: N/A

@callumW
Copy link

callumW commented Oct 10, 2020

Hey there,

I'd like to take a crack at this no one minds?

I've got a potential fix in place but I'm not sure if it's exactly what is wanted:

image

I assume it would better if it matched the color picker sample area?

image

@Calinou
Copy link
Member Author

Calinou commented Oct 10, 2020

@callumW That's a good start! Ideally, it should display a repeating checkerboard like it did in 3.2.3:

image

The larger the transparent area, the more repetitions you can see (like in image editors).

@callumW
Copy link

callumW commented Oct 10, 2020

Cool, I think that would look better too. I'll take a look 😀

It looks like the color picker is a little broken too as it doesn't repeat like that, rather it displays stretched out as shown above.

Should that be raised as a separate issue or fixed in this one?

@Calinou
Copy link
Member Author

Calinou commented Oct 11, 2020

@callumW What do you mean by the color picker being broken? Other than the "pick" icon being offset, I don't see any differences.

If you meant the checkerboard texture stretched instead of repeating, that's something you need to reimplement in your PR.

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