2024-12-17 04:54 AM
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.
2024-12-17 06:10 AM
Hello @aashik_10_ahamed ,
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,