-
-
Notifications
You must be signed in to change notification settings - Fork 687
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
Tree does not implement styles #3005
Comments
Do other style properties work on Tree on your platform? Font settings, text alignment, dimensions? |
font_family and font_weight works. color and background color have no effect. This appears to be using toga-gtk 0.4.7 |
Thanks for the report - it seems like there's likely 2 bugs here:
The latter might be an issue with the specific GTK theme you're using; if that theme doesn't define a dark mode palette for the Table widget, then the default colors won't follow dark mode. |
Honestly I may be misleading by referring to "dark mode" now that I see there are enhancements directed that way. I am just cycling through all widgets and changing color and background color. No themes or other techniques but manual style change. |
Thanks for that detail. FWIW, I'd strongly recommend that if you're manually tweaking the colors of each individual widget, you're not using Toga the way it was intended to be used. Toga deliberately tries to honor native platform look and feel; to that end, there are some facilities to modify colors on widget, but broadly speaking, they should be considered an edge case for minor UI tweaks, not the basis of a "whole of app theming system". That doesn't change the fact that what you've found is a bug, and we'll merge a fix if one was submitted as a PR. However, in the scope of the rest of Toga, we consider it a low priority bug, because broadly speaking you shouldn't need to change the colors of widgets. If you don't like the colors that your operating system is providing for apps, take that up with your operating system. On the other hand, if we're not honoring an OS-level dark mode setting, that would be a bug. However, in this case, it sounds like that isn't what is happening. |
Well my concern isn't following OS theme. I want to give the option of toggling between light and dark mode independently of OS setting. Did not find a way other than manually resetting colors. Is there a more Toga-ish approach to that? |
No - because "independent of OS setting" isn't a usage pattern Toga encourages. The OS defines what widgets look like. In Toga's worldview, it's not up to the app designer to determine how the app should look to the user, outside of minor UX-related tweaks (e.g., making text red to make it stand out as an alert). The user is the best arbiter of what their apps should look like, and they can configure their preferences at the operating system level. |
Describe the bug
Working on adding a dark mode to an application. All widgets except tree can be restyled with color and background color.
Steps to reproduce
Expected behavior
Tree control should allow changing color and background color.
Screenshots
Environment
Logs
Additional context
No response
The text was updated successfully, but these errors were encountered: