pub enum BrandLogo {
None,
Square(Accent),
Glyph(String),
Image(ImageSource<'static>),
}Expand description
What to paint in the brand’s logo slot, left of the brand label.
The default (BrandLogo::Square with Accent::Sky) is used when a
MenuBar sets brand text without an explicit logo. Use
MenuBar::brand_logo to override it.
The slot is opinionated: it is a fixed size and paints glyphs in the
theme’s body text colour. Pick the variant that matches the kind of
logo you have, and use BrandLogo::Image when you need full control
over colour and detail.
Variants§
None
Omit the logo slot entirely. Use this to suppress the default square next to a brand label, giving a text-only brand that sits flush against the strip’s left padding.
Square(Accent)
Filled square in the given accent colour. The library default
(with Accent::Sky).
Glyph(String)
A unicode glyph, e.g. a character from an icon font like Material
Icons or Phosphor. Painted in the theme’s body text colour at the
fixed logo size; styling beyond the glyph text itself is not
honoured. For a coloured or detailed mark, use BrandLogo::Image.
Image(ImageSource<'static>)
A bitmap or SVG image, scaled to the logo size.
The host app must have registered egui image loaders (e.g. via
egui_extras::install_image_loaders) for this to render; without
loaders, egui paints its placeholder.
The 'static bound suits the two common cases: a compiled-in
asset from egui::include_image!, or an owned URI string via
ImageSource::Uri(Cow::Owned(...)). Borrowed URIs need to be
promoted to owned (or interned) by the caller.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BrandLogo
impl RefUnwindSafe for BrandLogo
impl Send for BrandLogo
impl Sync for BrandLogo
impl Unpin for BrandLogo
impl UnsafeUnpin for BrandLogo
impl UnwindSafe for BrandLogo
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more