Struct lazybar_core::Attrs
source · pub struct Attrs { /* private fields */ }
Expand description
Attributes of a panel, or the defaults for the bar.
Implementations§
source§impl Attrs
impl Attrs
sourcepub fn parse<S: BuildHasher>(
table: &mut HashMap<String, Value, S>,
prefix: &str,
) -> Self
pub fn parse<S: BuildHasher>( table: &mut HashMap<String, Value, S>, prefix: &str, ) -> Self
Parses an instance of this type from a subset of the global
Config
.
Configuration options:
-
fg: String
: Specify the foreground (usually text) color. All parsing methods from csscolorparser are available. -
bg: String
: Specify the background color. All parsing methods from csscolorparser are available. -
font: String
: Specify the font to be used. This will be turned into apango::FontDescription
, so it’s very configurable. Font family, weight, size, and more can be specified.
sourcepub fn apply_font(&self, layout: &Layout)
pub fn apply_font(&self, layout: &Layout)
Sets the font of a pango::Layout
.
sourcepub fn apply_fg(&self, cr: &Context)
pub fn apply_fg(&self, cr: &Context)
Sets the foreground (usually text) color of a cairo::Context
.
sourcepub fn apply_bg(&self, cr: &Context)
pub fn apply_bg(&self, cr: &Context)
Sets the background color of a cairo::Context
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Attrs
impl RefUnwindSafe for Attrs
impl Send for Attrs
impl Sync for Attrs
impl Unpin for Attrs
impl UnwindSafe for Attrs
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)