-
-
Notifications
You must be signed in to change notification settings - Fork 186
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 PushButton color #486
Comments
Thanks for reporting this bug @pyxiscloud. I've reproduced it. @Adrian-Samoticha could this be related to the changes we shipped for As highlighted, line 285 shows that we default to the I observed that we were not adding the However, adding it to the I am stumped. |
That’s interesting. I’ll try to reproduce it and see what I can find out. EDIT: The container exists solely to apply the “click effect” decoration because the
The reason why adding the background color to the You can assign me to that issue, I think I know how to fix it. That said, @pyxiscloud, if the reason for why you would like to change the background color of the button is that you would like to style the entire application in that particular color, the proper way to do so is like this: Open the Rename the newly created color set to Then, go to Violà: The benefit of this approach is that, for one, macos_ui will choose a gradient that matches those of native macOS applications, and for two, the user will still be able to override the color via the System Settings, which is how native macOS applications behave. I guess it wouldn’t hurt to add this guide to macos_ui’s readme, come to think of it. |
will "color" be deprecated for PushButton? |
I used a pushbutton to remove the background color and use it like a text button. Is this impossible now? |
No, but if you’re trying to style the entire application, rather than just a single button, the way I described is the way to do so. The fact that the |
That’s possible, but this is considered a bug, so it will be fixed. EDIT: That said, I am not aware of any native text buttons. Are you trying to emulate a specific macOS UI component that is missing in macos_ui? |
The workaround doesn't work for all buttons/UI elements for me :-( I wonder why it doesn't just use the On the other hand, the workaround fixes #395. |
Currently, only the buttons support accent colors. #484 introduces accent color support for the sidebar items but has not yet been merged. The other widgets are, of course, planned, but development is rather slow right now. |
I tried applying the colors provided by appkit_ui_element_colors to the widgets directly, however, this didn’t make them look accurate to their native counterparts. It’s necessary to overhaul each widget individually to make it look good. |
@GroovinChip While #484 is somewhat related to this issue, it doesn’t actually resolve it. I’ll quickly reopen this issue and see if I’ll have time to work on it sometime. |
Ah yeah, you're right. My bad. Thanks for catching this! |
I don't know if each widget should read the color from the system itself. Then, the theme's primary color becomes useless. If a user of this library wants to overwrite the color, he has to do this manually for each widget, as the theme no longer supports it (the IMHO, this should be done by the theme ( |
In order to make the macos_ui components’ appearance as accurate to their native counterparts as possible, the supported colors currently use hard-coded gradients for each system accent color setting, rather than being generated from a single color. Therefore, that wouldn’t really be possible without sacrificing accuracy to macOS’ native UI components. The intended way to theme the entire application is the one I’ve outlined above, and I am planning to add this guide to macos_ui’s readme, once all widget actually support system accent colors. |
I know it’s been a while, but version 2.0.7 applies the accent color to most widgets now. |
My use case for this is to make destructive buttons like delete red. Is there another way of doing this? |
Description
After update to 2.0.2, PushButton colors always blue, even if I set it to another color
Steps To Reproduce
PushButton( controlSize: ControlSize.large, color: Colors.redAccent, )
Tasks
Tasks
The text was updated successfully, but these errors were encountered: