-
-
Notifications
You must be signed in to change notification settings - Fork 191
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
Checkbox does not render properly when MacosApp.theme is set #552
Comments
Note: I poked around in the source, traced while running in debugger, but couldn't find any obvious reason for this behavior. As far as I could see, values for checkbox graphic, fill color generation and icon selection seemed to be "fine". I'd be happy to fix this and submit a pull request, but I can't find the issue on my own. |
Wait a second, why is your checkbox red when all other widgets are blue? |
Sorry! Red I put in to make it easier to see what I was referring to in screenshots. Meant to mention in my comments, and forgot. I can see how that would raise a red flag (if you'll pardon the pun). Modified:
I changed that only for the screenshot. No other mods to source files. If you run your sample project with my added Theme line and don't see the behavior, that in itself would be interesting. But I tested both by using as a dependency in my own project, and with cloned stand-alone download of the full repo by running that example code directly. Same behavior. Lots of debugging and experimenting to eventually figure out what the source of the issue was, but don't know how directly the MacosWindow + Theme connects directly to the actual underlying issue. May just be triggering some infrequently used bit of code elsewhere. Edits: fixed wording/spelling. |
Additional information from further testing: If I add the line to MacosWindow declaration as:
Then it has two notable effects:
I think (2) is expected, as it creates a default theme instance with default Blue accent color setting. But even if I change the Theme accent color as follows, all controls in example still render in Blue rather than the specified (and system setting) color Green:
Mac blue is lovely... but if I specify a theme value then it should either inherit my system setting (green) as the default, or at least let me specify a value explicitly. Neither works. If I set any .theme value at all, I get Blue. |
I unfortunately currently have little bandwidth to tend to this issue, but if what you’re trying to achieve is simply changing the accent color of the app, you can follow this guide to do so. If you’re trying to override the lightness of the app, the radio buttons in the example seem to do just that (correctly, as far as I can tell), so you could just check how they’re implemented. |
I understand. Not a paid job, and it's a community contribution as-is, so certainly not entitled to any demand on your time. [Edit: removed comment that starts a different discussion. Separate issue.] I understand there's no time to work on this, but if someone could confirm that adding the theme line causes the issue with the checkbox, that would help. That would let me know whether it's an actual issue, or "just me." Also: no, not trying to change the accent color. Accent color was just to provide more facts about effects and side-effects. Trying to fix an issue (if it exists) starts with being able to reproduce it. Was just trying to find other effects that could be checked/traced as a path towards finding something reproducible. |
Fixed by giving up on themes entirely while using macos_ui. |
Description
When .theme property is set when declaring MacosApp() widget, it causes checkbox rendering to be wrong when checkbox is true/on.
I have verified the the example app renders a "checked" checkbox fine when no .theme value is specified for MacosApp() widget.
Steps To Reproduce
Code sample
Expected behavior
When I add this line, rendering of checkbox should not change.
Actual behavior
Checkbox appears with fully white interior. Looks like it might actually be trying to render a white circle (?). The expected checkmark icon does not appear.
Screenshots
When example is run unmodified (no .theme value specified for MacosApp() widget):
When MacosApp( ... theme: MacosThemeData.light(), ...) is added:
Logs
Log text volume is too long to include in this issue report (can't submit). I can get them to you by email or something if needed. There are no errors.
This is your own Example application, so you can of course generate the log yourself.
The text was updated successfully, but these errors were encountered: