Using a button toggle between Dark and light theme in Touchgfx
Hi Community,
I like to implement a sequence when we press the button that toggle between dark and light theme. Please guide me in do this In Touch Gfx with STM32H747XIH6U Application.
Hi Community,
I like to implement a sequence when we press the button that toggle between dark and light theme. Please guide me in do this In Touch Gfx with STM32H747XIH6U Application.
Hello
We have made a demo with a light and dark theme.
It is the STM32U5G9J-DK2 E-bike demo, you can find it here :

This is the dark and light modes :


Check what "modeButton" and the function "modeButtonClicked" does to see how we managed that.
In modeButtonClicked, we change the variable that know which theme is on, then we update the theme (this is where we display the right theme).
Below is the first half of that function :

Note that all we do is set some colors and some bitmaps (basically images).
Regards,
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.