Expand description
a set of two style_maps: one for the focused panel and one for the other panels
This struct is just a vessel for the skin initialization process.
Fields§
§focused: StyleMap
§unfocused: StyleMap
Implementations§
source§impl StyleMaps
impl StyleMaps
sourcepub fn create(skin_conf: &AHashMap<String, SkinEntry>) -> Self
pub fn create(skin_conf: &AHashMap<String, SkinEntry>) -> Self
Examples found in repository?
src/skin/app_skin.rs (line 36)
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),
}
}
}