WindowsUIStyle Class
The WindowsUIStyle class is a descendant from DCStyle that provides a Windows-inspired UI style based on compiled Adobe XD design documents (XML format). More...
| Header: | #include <WindowsUIStyle> |
| Inherits: | DCStyle |
| Inherited By: |
Public Functions
| WindowsUIStyle() | |
| virtual | ~WindowsUIStyle() override |
| void | setTheme(WindowsUIStyle::Theme theme) |
| WindowsUIStyle::Theme | theme() const |
Detailed Description
The WindowsUIStyle class extends DCStyle to provide a consistent and modern Windows-inspired UI style across multiple platforms, including Windows, Linux, and macOS. It includes a pre-designed template (WindowsUIStyle.xd) and a compiled XML file (WindowsUIStyle.design) that define the default appearance of the style.
Included Design Files
The WindowsUIStyle class comes with the following files:
WindowsUIStyle.xdA template Adobe XD file that contains the design elements for the Windows-inspired UI style. This file serves as a reference for designers and developers who wish to customize the style.WindowsUIStyle.designA compiled XML file generated fromWindowsUIStyle.xdusing thedcmake.exeutility. This file is used by theWindowsUIStyleclass to apply the default Windows-inspired design to the application.
Cross-Platform Support
Although the style is inspired by Windows UI, the WindowsUIStyle class is fully cross-platform and can be used on:
- Windows
- Linux
- macOS
This ensures a consistent user experience across different operating systems while maintaining the modern look and feel of Windows UI.
Design Philosophy
The WindowsUIStyle class is designed to provide a modern, Windows-inspired UI style that is consistent across multiple platforms, including Windows, Linux, and macOS. By leveraging the included WindowsUIStyle.design file, developers can quickly apply a polished and professional look to their applications. Additionally, the class supports dynamic theme switching, allowing users to choose between light and dark modes for optimal comfort and usability.
Member Function Documentation
WindowsUIStyle::WindowsUIStyle()
Constructs a WindowsUIStyle object. Initializes the style with the default settings, including the light theme. Automatically loads the included WindowsUIStyle.design file if no custom design is specified.
[override virtual noexcept] WindowsUIStyle::~WindowsUIStyle()
Destroys the WindowsUIStyle object. Cleans up any resources allocated by the style.
void WindowsUIStyle::setTheme(WindowsUIStyle::Theme theme)
Sets the application's theme to the specified value. Parameters: theme: The theme to apply. Possible values are: Light: Switches the application to the light theme. Dark: Switches the application to the dark theme.
Note: Setter function for property theme.
See also theme().
WindowsUIStyle::Theme WindowsUIStyle::theme() const
Returns the current theme of the application. Return Value: Light if the application is using the light theme. Dark if the application is using the dark theme.
Note: Getter function for property theme.
See also setTheme().