pub struct TitleBar {
pub height: f32,
pub leading: f32,
pub buttons: Option<Rect>,
pub icon: Option<&'static [u8]>,
pub hovered: Option<CaptionButton>,
pub pressed: Option<CaptionButton>,
pub maximized: bool,
pub active: bool,
pub background: Option<Color>,
pub foreground: Option<Color>,
pub system_paints: bool,
}Expand description
The title bar’s line, when the application’s content shares it, as the shell reports it: how tall the line is, and what the system keeps on it.
Fields§
§height: f32The line’s height, in logical pixels: the system’s.
leading: f32Room the system keeps at the line’s start, in logical pixels — buttons it draws itself there.
Where the system’s three buttons are, in logical pixels from the window’s top left,
when the application paints them; None when the system draws them itself.
icon: Option<&'static [u8]>The window’s icon, to paint at the line’s start; None when the system shows none
there.
hovered: Option<CaptionButton>The button the pointer is over.
pressed: Option<CaptionButton>The button being pressed.
maximized: boolWhether the window is maximized: the middle button then restores.
active: boolWhether the window is the active one: an inactive window’s glyphs are quieter.
background: Option<Color>The system’s surface for the line, as it would draw its own caption for the window
now — active or not; None where the shell cannot tell (milestone 642).
foreground: Option<Color>The system’s words on that caption, likewise.
system_paints: boolThe system paints the line (milestone 643): its backdrop — on Windows 11 the wallpaper-tinted one — and its three buttons, with their own hover and press, show through wherever the application leaves the line transparent. The application then paints neither, unless it was told a background; it paints the window’s icon and its menu bar.