pub struct SystemUiOverlayStyle {
pub status_bar_color: Option<Color>,
pub status_bar_icons: Option<Brightness>,
pub navigation_bar_color: Option<Color>,
pub navigation_bar_icons: Option<Brightness>,
}Expand description
What a part of the screen asks of the system bars over it — the reference’s
SystemUiOverlayStyle.
Every field is optional: a region states what it cares about, and the rest comes from
the region beneath it and finally from the theme (SystemUiOverlayStyle::resolve).
The icons are named by their own brightness: Brightness::Dark is dark icons, for
a light bar. That is the question a reader of the screen answers — can I read the clock
— and the platform’s own name for it, a “light status bar”, is the opposite word.
Fields§
§status_bar_color: Option<Color>The status bar’s background.
status_bar_icons: Option<Brightness>The status bar’s icons: the clock, the battery, the signal.
The navigation bar’s background.
The navigation bar’s icons, or its gesture handle.
Implementations§
Source§impl SystemUiOverlayStyle
impl SystemUiOverlayStyle
Sourcepub fn for_background(color: Color) -> Self
pub fn for_background(color: Color) -> Self
Both bars in color, with icons that can be read on it.
Sourcepub fn status_bar_color(self, color: Color) -> Self
pub fn status_bar_color(self, color: Color) -> Self
The status bar’s background. Its icons, unless stated too, are chosen to be read on it — not taken from the theme, which answers for a different colour.
Sourcepub fn status_bar_icons(self, icons: Brightness) -> Self
pub fn status_bar_icons(self, icons: Brightness) -> Self
The status bar’s icons: Brightness::Dark for dark icons.
The navigation bar’s background, with the same rule for its icons.
The navigation bar’s icons: Brightness::Dark for dark icons.
Sourcepub fn over(self, under: Self) -> Self
pub fn over(self, under: Self) -> Self
This, with whatever it does not state filled in from under.
Sourcepub fn resolve(self, theme: &Theme) -> SystemBars
pub fn resolve(self, theme: &Theme) -> SystemBars
Every question answered: what is stated, and the theme for the rest.
A bar whose colour is stated but not its icons gets icons read on that colour, so a region that only paints a bar black still gets a readable clock.