pub struct BatteryIconMetrics {
pub body: Size,
pub nub: Size,
pub bolt_width: u32,
pub solo_bolt: Size,
pub spacing: u32,
pub border: u32,
pub pad: u32,
pub gap: u32,
pub margin: u32,
}Expand description
Battery indicator geometry, in pixels.
The bolt slot is reserved whether or not a bolt is drawn, so plugging in a charger never moves the battery body. On a partial-refresh panel that keeps the changed region down to the bolt itself.
Fields§
§body: SizeOutline of the battery body, border included.
nub: SizeTerminal nub, drawn flush against the body’s right edge.
bolt_width: u32Width reserved to the left of the body for the charging bolt.
solo_bolt: SizeSize of the bolt drawn when it stands in for the whole indicator,
which is bigger than Self::bolt_width because it is then the
only thing in the zone rather than an adornment beside a body.
spacing: u32Gap between the bolt slot and the body.
border: u32Body outline stroke width, drawn inside Self::body.
pad: u32Clearance between the outline and the fill segments.
gap: u32Gap between adjacent fill segments.
margin: u32Clearance between the indicator and the right edge of the panel.
Implementations§
Trait Implementations§
Source§impl Clone for BatteryIconMetrics
impl Clone for BatteryIconMetrics
Source§fn clone(&self) -> BatteryIconMetrics
fn clone(&self) -> BatteryIconMetrics
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BatteryIconMetrics
impl Debug for BatteryIconMetrics
impl Copy for BatteryIconMetrics
Auto Trait Implementations§
impl Freeze for BatteryIconMetrics
impl RefUnwindSafe for BatteryIconMetrics
impl Send for BatteryIconMetrics
impl Sync for BatteryIconMetrics
impl Unpin for BatteryIconMetrics
impl UnwindSafe for BatteryIconMetrics
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)