pub struct Brand {
pub tint: Tint,
pub accent: Tint,
pub radius: f32,
pub vibrancy_alpha: f32,
pub vibrancy: bool,
pub glass: bool,
}Expand description
What an app changes about the shipped palette without redesigning it.
Installed as a gpui Global; Theme::install applies it to whatever
palette is registered, so it survives a light/dark switch and composes with
set_palette rather than competing with it.
Fields§
§tint: TintThe hue every grey in the palette carries.
accent: TintThe emphasis hue. Left neutral, the accent follows Self::tint like
any other grey — which is what the shipped palette already is.
radius: f32The base corner radius; every other corner is a ratio of it. See
Theme::BASE_RADIUS.
vibrancy_alpha: f32How opaque the tint over the blurred window is. See
Theme::VIBRANCY_ALPHA, where it starts, and Theme::vibrancy_tint.
vibrancy: boolWhether the window composites translucent — AppKit’s vibrancy.
glass: boolWhether components paint glass. Separate from Self::vibrancy:
SwiftUI’s material blends within the window, so an opaque window can
still carry glass — which is what a Reduce-transparency setting asks
for and the system’s own does not do.
Implementations§
Trait Implementations§
impl Copy for Brand
impl Global for Brand
impl StructuralPartialEq for Brand
Auto Trait Implementations§
impl Freeze for Brand
impl RefUnwindSafe for Brand
impl Send for Brand
impl Sync for Brand
impl Unpin for Brand
impl UnsafeUnpin for Brand
impl UnwindSafe for Brand
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ReadGlobal for Twhere
T: Global,
impl<T> ReadGlobal for Twhere
T: Global,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().