Skip to content

Making a modification to Device found in Stylo #34516

Answered by nicoburns
arthmis asked this question in Q&A
Discussion options

You must be logged in to vote

I'm thinking that there should be a function like fn theme(&self) -> PrefersColorScheme for Device to provide current color scheme when recreating a new device for the handle_viewport_change function.

This is what I had in mind in the short term (and you might need similar for the viewport size). We are also looking into making it possible to mutate the Device directly. But I think that ought to be a separate change.

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@nicoburns
Comment options

Answer selected by arthmis
@arthmis
Comment options

Comment options

You must be logged in to vote
1 reply
@arthmis
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants