<< Click to Display Table of Contents >> Navigation: Functionalities > Day/Night Mode |
With this feature it is possible to switch the theme of objects at run time. The behavior is similar to modern navigation apps that switch their UI for day or night mode. This has the advantage that the display shows e.g. only dark colored objects at night to protect the eyes of the user.
Day/Night Mode can be activated for all visual objects in the palette. It is disabled by default and has to be enabled for each object or for all objects through the project property settings. If Day/Night Mode is disabled, the object uses the Day theme only.
To enable Day/Night Mode for an object, the property "Day/Night Mode" has to be activated.
After that you can choose a theme for day and one for night (properties "Day Theme" and "Night Theme".
Per default, the theme "modern_bright" will be used as the day theme and "modern_dark" as the night theme.
With the property "Day/Night Theme Switch" it is possible to preview the Day and Night view in the editor window to check if the object is configured properly.
To show some details of the new theme handling, a new theme will be created, called "new_dark", as a duplicate of "modern_dark", with the background color of the 270° gauge changed to dark blue. The preview of the new look is shown in the dialog.
The theme can now be chosen in the object properties for "Day Theme" and/or "Night Theme".
Note: Changing the theme of the object overwrites all custom property settings made previously (only for theme properties)!
It is of course possible to change theme properties (i.e. visual properties that are configurable in themes) of single objects with a normal property configuration for the object.
If Day/Night Mode is enabled, the properties can be set separately for Day and/or Night Mode. The property will be saved for the mode currently selected in the property "Day/Night Theme Switch".
At run time, the day / night mode can be switched with the variable @CurrentThemeIndex
The following settings can be made in this dialog:
Enable Day/Night Mode (for newly created objects)
When this box is checked, new objects will have Day/Night Mode enabled by default.
Apply "Enable Day/Night Mode" to Project
When this button is pressed, ALL existing objects in the project will have Day/Night Mode enabled, with their current Day and Night Theme set in their properties.
Default Day Theme
This selection will be the default Day Theme for newly created objects
Apply "Default Day Theme" to Project
When this button is pressed, ALL existing objects in the project that have Day/Night Mode enabled will have the current default Day Theme set as their day theme.
Note: This overwrites all theme properties of all existing objects!
Default Night Theme
This selection will be the default Night Theme for newly created objects
Apply "Default Night Theme" to Project
When this button is pressed, ALL existing objects in the project that have Day/Night Mode enabled will have the current default Night Theme set as their night theme.
Note: This overwrites all theme properties of all existing objects!
Apply settings to Project
When this button is pressed, all three "Apply to Project" actions described above are executed.