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

[AppKitBackend] Implement foregroundColor modifier #79

Closed
stackotter opened this issue Apr 7, 2024 · 2 comments
Closed

[AppKitBackend] Implement foregroundColor modifier #79

stackotter opened this issue Apr 7, 2024 · 2 comments

Comments

@stackotter
Copy link
Owner

We'll need to figure out how to cascade styles through the AppKit view hierarchy. Similarly to what Lorenzo faced with WinUIBackend, this seems to be a little tricky since it's not really how the framework is intended to be used.

@stackotter
Copy link
Owner Author

This will likely be best addressed by allowing modifiers to be propagated down the view graph and given to all backend methods so that modifiers like foregroundColor can be applied directly to leaf widgets instead of relying on the underlying UI frameworks having cascading styles.

@stackotter
Copy link
Owner Author

The new layout system implements the concept of Environment, allowing foregroundColor and other properties to get propagated through the view graph. This allowed me to implement foregroundColor for AppKitBackend and update the GtkBackend foregroundColor implementation to correctly style buttons and pickers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant