ui::FrameColor¶
Header: winui/ui/themes/Theme.hpp.
A color for a part of the system-drawn window frame. It holds one of four answers, where std::optional<Color> could hold only two:
follow() - no opinion, the default. In ChromeHints it leaves the system's color. In ChromeOverrides it uses the theme's. system_default() - the system's own color, even over a theme that sets one. none() - draw nothing. Windows 11 and the border only. A caption color of none() is treated as system_default(). a Color - that color. The conversion is implicit, so chrome.caption_color = palette.selection works.
Example:
ui::ChromeOverrides chrome;
chrome.caption_color = ui::Color::from_argb(0xFF1E1E1E); // a custom color
chrome.caption_text_color = ui::FrameColor::system_default(); // the OS's, over the theme's
chrome.border_color = ui::FrameColor::none(); // no border line (Windows 11)
window.set_chrome(chrome);
FrameColor¶
follow(): no opinion.
FrameColor¶
A custom color; implicit so a plain Color can be assigned.
kind¶
Which answer this holds.
has_value¶
True only for a custom color, the one case where * means anything.
operator*¶
The custom color; meaningful only when has_value().
reset¶
Back to follow().
follow¶
No opinion: ChromeHints leaves the OS default, ChromeOverrides uses the theme's.
system_default¶
Forces the OS's own color, even over a theme that sets one.
none¶
Draws nothing. Windows 11 and the border only; a caption of none() acts as system_default().