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

Custom theme in Project Settings causes Controls to render incorrectly. #16344

Closed
ghost opened this issue Feb 3, 2018 · 5 comments
Closed

Custom theme in Project Settings causes Controls to render incorrectly. #16344

ghost opened this issue Feb 3, 2018 · 5 comments
Assignees
Milestone

Comments

@ghost
Copy link

ghost commented Feb 3, 2018

Godot version:
3.0

OS/device including version:
Linux 64 bit.

Issue description:
Setting a custom theme causes some Controls to be invisble except for a bit of poorly-rendered text that says "ERROR". So far I've confirmed this only with the several controls that are in the example project. I haven't tested further but I suspect it probably affects all Controls.

Steps to reproduce:

  • Make a theme resource
  • Add a default font to it
  • Save it as a .tres
  • Project > Project Settings > Gui > Theme
  • On the row that says Custom, click the folder icon on the right, and click File
  • Navigate to the .tres file you just made.
  • Run your project and see messed up widgets
  • Go back into Project Settings and clear the custom theme
  • Your widgets are back!

Or just use the minimal example project! Extract, open, run.

Minimal reproduction project:
CustomThemeBug.zip

@AaronWizard
Copy link

I have this error too. This is what happens when I have a label while trying to use a custom theme.

screen shot 2018-02-07 at 5 37 04 pm

I'm not sure if the label's black text is a bug or if I just missed something in my theme. I'm more concerned about the "ERROR" that appears in the background. I've seen this with multiple font TTFs.

My own example project:
themetest.zip

@Mintormo
Copy link

Mintormo commented Apr 21, 2018

This is not a bug. When you make empty theme, values of styleboxes in control is null so It's used default style value. It's maked from .png with "Error" text.
Here: scene/resources/default_theme/default_theme.cpp: 872
I think this issue is worth to close. Else It's maybe change default style to empty style box.

@ghost
Copy link
Author

ghost commented Apr 22, 2018

Else It's maybe change default style to empty style box.

That definitely needs to happen. Right now, for example, I have a HScrollBar. I don't want to have increment or decrement icons for it, so I left them blank. But instead it looks like this:
godot-theme-error

It's kind of dark, but you can see the problem. I don't think it should be necessary to manually set every stylebox that you don't intend to use.

@AaronWizard
Copy link

I agree. It wasn't clear to me that controls all have a style box, even labels, and that a null style box causes the "error" background.

@reduz
Copy link
Member

reduz commented Sep 6, 2018

I am wondering whether the error icon should just be a small empty one.. is there much point on showing it?

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.

4 participants