#[non_exhaustive]pub struct Metrics {
pub radius: CornerRadius,
pub focus_stroke: f32,
pub target: f32,
}Expand description
The sizes egui reads that are the app’s to choose rather than the scale’s.
Not on Palette, which is colours. Three numbers, each a house decision
with a floor under it, defaulting to what makeover-webview emits so the
three renderers agree until an app says otherwise:
radius, how round a container is: square by default.focus_stroke, the focus ring’s width: 2 points, the webview’s2px. egui’s own is a one-point hairline that disappears against a themed surface, and the ring is the only thing telling a keyboard user where they are.target, the smallest a control is painted: 24 points, WCAG 2.5.8 and the Mac HIG’s floor. egui’sinteract_sizeis 18.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.radius: CornerRadiusThe app’s container radius.
focus_stroke: f32The focus ring’s width, in points.
target: f32The smallest height a control is painted at, in points.
Implementations§
Source§impl Metrics
impl Metrics
Sourcepub const fn radius(self, radius: CornerRadius) -> Self
pub const fn radius(self, radius: CornerRadius) -> Self
Set radius.
Sourcepub const fn focus_stroke(self, points: f32) -> Self
pub const fn focus_stroke(self, points: f32) -> Self
Set focus_stroke.
Trait Implementations§
impl Copy for Metrics
impl StructuralPartialEq for Metrics
Auto Trait Implementations§
impl Forget for Metrics
impl Freeze for Metrics
impl RefUnwindSafe for Metrics
impl Send for Metrics
impl Sync for Metrics
impl Unpin for Metrics
impl UnsafeUnpin for Metrics
impl UnwindSafe for Metrics
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
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> 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> ⓘ
Converts
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> ⓘ
Converts
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