pub struct PanelSkin {
pub styles: StyleMap,
pub purpose_skin: MadSkin,
pub status_skin: StatusMadSkinSet,
pub help_skin: MadSkin,
}
Expand description
the various skin things used in a panel.
There are normally two instances of this struct in a broot application: one is used for the focused panel and one is used for the other panels.
Fields§
§styles: StyleMap
§purpose_skin: MadSkin
§status_skin: StatusMadSkinSet
§help_skin: MadSkin
Implementations§
source§impl PanelSkin
impl PanelSkin
sourcepub fn new(styles: StyleMap) -> Self
pub fn new(styles: StyleMap) -> Self
Examples found in repository?
src/skin/app_skin.rs (line 25)
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
pub fn new(conf: &Conf, no_style: bool) -> Self {
if no_style {
Self {
focused: PanelSkin::new(StyleMap::no_term()),
unfocused: PanelSkin::new(StyleMap::no_term()),
}
} else {
let def_skin;
let skin = if let Some(skin) = &conf.skin {
skin
} else {
def_skin = AHashMap::default();
&def_skin
};
let StyleMaps { focused, unfocused } = StyleMaps::create(skin);
Self {
focused: PanelSkin::new(focused),
unfocused: PanelSkin::new(unfocused),
}
}
}