Skip to content

Conversation

@evowizz
Copy link

@evowizz evowizz commented Sep 5, 2023

This PR adds a "Dark Theme" toggle above the "Show Code" one as seen below.

This is a work in progress. Currently, toggling the theme causes an exception causing the UI to freeze.

image

darkModeSupported = true,
darkMode = useDarkTheme,
onDarkModeChange = {
// TODO: Find out why toggling dark mode on or off doesn't work
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I was able isolate what the issue is. It's with TextField. You can repro with this snippet:

image

So likely a thing to go investigate with JetBrains.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is quite surprising. I recreated something similar to your example. From what I was able to test, the issue with TextField only happened after I added a Surface. But then I replaced the Surface with the .background modifier on Column, and this specific issue didn't seem to happen anymore. There are other issues, but toggling still works nonetheless when using .background for some reason.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants