cancel
Showing results for 
Search instead for 
Did you mean: 

How best to implement 2 UIs: light-theme and dark-theme?

VSimu.1
Associate III

Hello,

We have a final design for our UI, with all of the elements and widgets decided.

We would like to be able to make the color of the Application light-themed and dark-themed (similar to how in a source code editor, you can have a light-theme and dark-theme).

We would like to be able to change the theme during run-time, so that the customer can select which color option is best for them.

Is there a built-in way of doing this? The only ideas we have is either:

1) Deciding in the constructor of each Screen View, which color the Texts, Widgets, etc shall be, as well as which background images to load.

2) Creating a light-themed screen and a dark-themed screen for everything (which makes maintenance awfully tedious and difficult.

1 ACCEPTED SOLUTION

Accepted Solutions
Alexandre RENOUX
Principal

Hello,

You save the value of your variable (e.g. light-theme = 0 and dark-theme = 1) in the Model and then in every setupScreen() function you check the value and set all your widgets on the selected screen accordingly.

/Alexandre

View solution in original post

1 REPLY 1
Alexandre RENOUX
Principal

Hello,

You save the value of your variable (e.g. light-theme = 0 and dark-theme = 1) in the Model and then in every setupScreen() function you check the value and set all your widgets on the selected screen accordingly.

/Alexandre