pub struct NativeFeel {
pub platform: Platform,
pub reveal_highlight: bool,
pub rubber_band: bool,
pub window_controls: WindowControls,
pub focus_ring: FocusRing,
pub accent_tint: f32,
pub elevation: f32,
}Expand description
The native-feel spec — the per-platform cues that aren’t already captured
by Metrics/ScrollSpec/
Typography/SurfaceSpec. Carried
on every Theme so a component (or the demo’s chrome) can ask
“what does this platform want here?” and drive the existing primitives.
Fields§
§platform: PlatformWhich platform this feel models.
reveal_highlight: boolWindows reveal highlight: a cursor-follow edge glow on hover. Drives
effects::RevealHighlight. Off on macOS
(it uses a quieter highlight) and Neutral/Device.
rubber_band: boolmacOS rubber-band overscroll: the scroll spring is allowed to overshoot past the edge and settle back. Read by the smooth-scroll glue.
window_controls: WindowControlsWindow-control chrome hint (host-drawn; see WindowControls).
focus_ring: FocusRingKeyboard-focus indicator style (ring vs rectangle).
accent_tint: f32How strongly the palette accent tints selection/material ∈[0,1] —
macOS leans on accent more than the more neutral Fluent surfaces.
elevation: f32Drop-shadow elevation strength ∈[0,1] — Windows 11 uses pronounced
elevation shadows; macOS keeps them restrained.
Implementations§
Source§impl NativeFeel
impl NativeFeel
Sourcepub fn macos() -> Self
pub fn macos() -> Self
macOS — vibrancy-forward, accent-tinted soft focus ring, rubber-band scroll, traffic-light controls, restrained shadow, no reveal highlight.
Trait Implementations§
Source§impl Clone for NativeFeel
impl Clone for NativeFeel
Source§fn clone(&self) -> NativeFeel
fn clone(&self) -> NativeFeel
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for NativeFeel
Source§impl Debug for NativeFeel
impl Debug for NativeFeel
Source§impl Default for NativeFeel
impl Default for NativeFeel
Source§impl<'de> Deserialize<'de> for NativeFeel
impl<'de> Deserialize<'de> for NativeFeel
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for NativeFeel
impl PartialEq for NativeFeel
Source§fn eq(&self, other: &NativeFeel) -> bool
fn eq(&self, other: &NativeFeel) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for NativeFeel
impl Serialize for NativeFeel
impl StructuralPartialEq for NativeFeel
Auto Trait Implementations§
impl Freeze for NativeFeel
impl RefUnwindSafe for NativeFeel
impl Send for NativeFeel
impl Sync for NativeFeel
impl Unpin for NativeFeel
impl UnsafeUnpin for NativeFeel
impl UnwindSafe for NativeFeel
Blanket Implementations§
impl<T> Allocation for T
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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