pub struct StatusBarSetting {
pub style: Option<StatusBarStyle>,
pub hidden: Option<bool>,
pub animated: Option<bool>,
}Expand description
A status bar setting: what it sets; the fields it leaves out keep the settings below it.
Fields§
§style: Option<StatusBarStyle>Content color.
Hidden.
animated: Option<bool>Animate the change.
Implementations§
Source§impl StatusBarSetting
impl StatusBarSetting
Sourcepub const fn foreground(self, style: StatusBarStyle) -> Self
pub const fn foreground(self, style: StatusBarStyle) -> Self
Sets the content’s color.
Hides or shows the bar.
Sourcepub fn from_json(value: &JsonValue) -> Self
pub fn from_json(value: &JsonValue) -> Self
The app’s default (nsh.json "statusBar"): { "foreground": "auto" | "light" | "dark", "hidden": bool }, both optional. What it
cannot read, an unknown key or a value of a form it does not know,
is left out and the rest applies: a bundle made by a newer NSH keeps
its setting on an older runtime.
Sourcepub fn from_json_lenient(value: &JsonValue) -> (Self, Vec<String>)
pub fn from_json_lenient(value: &JsonValue) -> (Self, Vec<String>)
StatusBarSetting::from_json, with what it left out
(foreground: "dim" is not "auto", "light" or "dark"), which the
toolchain warns of (a newer NSH’s, or a typo).
Trait Implementations§
Source§impl Clone for StatusBarSetting
impl Clone for StatusBarSetting
impl Copy for StatusBarSetting
Source§impl Debug for StatusBarSetting
impl Debug for StatusBarSetting
Source§impl Default for StatusBarSetting
impl Default for StatusBarSetting
Source§impl From<StatusBarStyle> for StatusBarSetting
The setting of the content’s color alone (.status_bar(StatusBarStyle::Light)).
impl From<StatusBarStyle> for StatusBarSetting
The setting of the content’s color alone (.status_bar(StatusBarStyle::Light)).
Source§fn from(style: StatusBarStyle) -> Self
fn from(style: StatusBarStyle) -> Self
Source§impl HostValue for StatusBarSetting
A page’s or dialog’s statusBar: { foreground, hidden, animated }
(StatusBar, declared with the navigation in nsh/base); the fields
left out keep what is below. An unknown foreground is left out.
impl HostValue for StatusBarSetting
A page’s or dialog’s statusBar: { foreground, hidden, animated }
(StatusBar, declared with the navigation in nsh/base); the fields
left out keep what is below. An unknown foreground is left out.
Source§impl IntoReactive<StatusBarSetting> for StatusBarSetting
impl IntoReactive<StatusBarSetting> for StatusBarSetting
Source§fn into_reactive(self) -> Reactive<StatusBarSetting>
fn into_reactive(self) -> Reactive<StatusBarSetting>
Reactive.Source§impl IntoReactive<StatusBarSetting> for StatusBarStyle
impl IntoReactive<StatusBarSetting> for StatusBarStyle
Source§fn into_reactive(self) -> Reactive<StatusBarSetting>
fn into_reactive(self) -> Reactive<StatusBarSetting>
Reactive.