pub struct LiquidTab {
pub icon: LiquidTabIcon,
pub label: &'static str,
pub icon_style: LiquidTabIconStyle,
pub icon_scale: f32,
pub icon_offset: (f32, f32),
}Expand description
One tab’s artwork, label, and icon treatment.
Fields§
§icon: LiquidTabIconVector or template artwork shown above the label.
label: &'static str§icon_style: LiquidTabIconStyle§icon_scale: f32Optical correction for symbols whose path bounds do not fill the shared icon frame uniformly.
icon_offset: (f32, f32)Optical displacement of the artwork inside the shared icon frame, in points.
Implementations§
Source§impl LiquidTab
impl LiquidTab
pub fn new(icon: &'static str, label: &'static str) -> Self
Sourcepub fn from_painter(painter: Painter, size: Size, label: &'static str) -> Self
pub fn from_painter(painter: Painter, size: Size, label: &'static str) -> Self
A tab using template artwork and its logical size.
pub fn app_badge(icon: &'static str, label: &'static str) -> Self
pub fn with_icon_scale(self, scale: f32) -> Self
Sourcepub fn with_icon_offset(self, x: f32, y: f32) -> Self
pub fn with_icon_offset(self, x: f32, y: f32) -> Self
Moves the artwork without changing its cell or hit bounds; nonfinite offsets become zero.
Trait Implementations§
impl StructuralPartialEq for LiquidTab
Auto Trait Implementations§
impl Freeze for LiquidTab
impl RefUnwindSafe for LiquidTab
impl Send for LiquidTab
impl Sync for LiquidTab
impl Unpin for LiquidTab
impl UnsafeUnpin for LiquidTab
impl UnwindSafe for LiquidTab
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