-
Notifications
You must be signed in to change notification settings - Fork 112
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
Wrong stripe color of elements inside folder with custom theme. #36
Comments
Apply the theme after adding all the components to the folder. Individual components (folders, buttons, etc) do not store a reference to any applied themes like a gui does. This may change in the future but for now you'll have to apply the theme after constructing the folder. |
Thanks for the reply :) It still does not work after doing that. Here's my code and a screenshot of the rendered GUI.
All of that is within the setup() method |
Hi, I just copied and pasted your code into a new project, applied one of the stock themes and this is what I'm seeing.
Are you using the latest on master? |
Closing as I'm not able to reproduce the issue. Feel free to reopen if you can provide more information. |
May I ask which theme you applied? I saw that all of them, except the default one hide the stripe, so the issue would not be visible. Also, note that I'm applying a custom theme. Maybe this is a feature, not a bug. Let's see: When you are using the default theme, are the elements within a folder supposed to "inherit" the stripe color from the folder? If so, then this is a bug. If not, it's expected behavior. To reproduce, create and apply a custom theme by inheriting and overriding some properties from the default theme (not the stripe color). The posted example is exactly what I'm describing. |
Hi, sorry this is a bug. I didn't at first realize what you were describing but I see now what you mean. I just pushed up a patch that should resolve this. 64d7f79 Let me know if this resolves the issue. |
I created a custom theme that only changes width and font size:
Then I created a gui, applied the theme (gui->setTheme(new AppGuiTheme())), added two folders (gui->addFolder()) and some elements within the folders (f1->addButton()).
The elements within the folders end up with the default theme stripe color instead of the color for the folder. The expected behavior is that the elements have the folder's color.
If I remove the gui->setTheme() statement, the default theme is used and the elements within the folders correctly render with the folder's color.
The text was updated successfully, but these errors were encountered: