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 more