ui::ChromeOverrides¶
Header: winui/ui/themes/Theme.hpp.
One window's own settings for its frame, layered over the theme's ChromeHints. Every field left unset follows the theme. The window's override wins over the theme, and the theme over the system default. The override is applied again on every theme change, so a theme switch never undoes it.
Corner preference works on Windows 11 only, since Windows 10 frames are always square, and a maximized or snapped window is never rounded. RoundSmall is the menu and flyout radius, the right pick for a Frame::None popup that should look like a flyout.
allows_system_backdrop has no override. Whether a page may go translucent is up to the theme (see ChromeHints).
Example:
// Square corners on a Fluent window, and no border line at all:
window.set_chrome({.corner_preference = ui::CornerPreference::DoNotRound,
.border_color = ui::FrameColor::none()});
| Field | Type | Default | |
|---|---|---|---|
corner_preference |
std::optional<CornerPreference> |
Overrides ChromeHints::corner_preference when set. | |
dark_titlebar |
std::optional<bool> |
Overrides ChromeHints::dark_titlebar when set. | |
caption_color |
FrameColor |
The caption, border and caption text colors; follow() keeps the theme's. | |
border_color |
FrameColor |
||
caption_text_color |
FrameColor |
||
inactive_caption_color |
FrameColor |
The caption while the window is inactive (ChromeHints' fields of the same name). | |
inactive_caption_text_color |
FrameColor |