pub struct LiquidTab {
pub icon: LiquidTabIcon,
pub label: SharedText,
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: SharedTextShared display and accessibility text, including runtime translations.
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
Sourcepub fn new(icon: &'static str, label: impl Into<SharedText>) -> Self
pub fn new(icon: &'static str, label: impl Into<SharedText>) -> Self
A tab with a vector icon and static or shared runtime label.
Sourcepub fn from_painter(
painter: Painter,
size: Size,
label: impl Into<SharedText>,
) -> Self
pub fn from_painter( painter: Painter, size: Size, label: impl Into<SharedText>, ) -> Self
A tab using template artwork and its logical size.
Sourcepub fn app_badge(icon: &'static str, label: impl Into<SharedText>) -> Self
pub fn app_badge(icon: &'static str, label: impl Into<SharedText>) -> Self
A tab whose icon is drawn as an application badge.
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 !RefUnwindSafe for LiquidTab
impl !Send for LiquidTab
impl !Sync for LiquidTab
impl !UnwindSafe for LiquidTab
impl Freeze for LiquidTab
impl Unpin for LiquidTab
impl UnsafeUnpin 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