Module header_row
Expand description
The window’s header row as a face: one geometry for NavShell and for every painted app.
Windows have no title bar, so the top band of the window is the header row (HIG §1).
crate::widget::NavShell draws it for widget apps; a painted app that owns its whole
surface builds a HeaderRowFace for the same band and gets the same rects:
- the row,
metrics.header_heighttall (grown with the text as a one-line control grows); - the leading shell buttons: the sidebar toggle and Back, Plain icon buttons of
min_pointer_targetin thes3inset; - the title band:
Headingin sentence case, from the content gutter or just after the leading buttons; - the actions band, from the end of the title to the trailing buttons;
- the trailing buttons: the window’s History control in the top-trailing corner
(
HeaderRowFace::history_rect), any other trailing chip before it; - the rule: one hairline under a content column’s row.
ⓘ
let face = HeaderRowFace::new(area, theme).with_toggle().with_history();
face.paint_rule(scene, transform, theme);
face.paint_title(scene, transform, text, theme, "Report.pdf", None);
chrome::paint_history_control(scene, transform, text, theme, face.history_rect(), control, hovered);
let body = face.body();Structs§
- Header
RowFace - The geometry of one header row. See the module docs.
- Header
RowMetrics - The header row’s sizes, resolved against one theme.
Functions§
- paint_
history_ control - Paint the window’s History control in
rect: the History glyph as a Plain icon button, on (the selection lift) while History shows. The same faceNavShelland the window’s own bar draw; a painted app routes its presses through acrate::widget::HistoryOpener.