pub struct SurfaceSettings {Show 14 fields
pub locale: String,
pub strings: IndexMap<String, String>,
pub mode: ModeSetting,
pub system_dark: bool,
pub density: Density,
pub contrast: ContrastSetting,
pub system_high_contrast: bool,
pub font_scale: f32,
pub hover: bool,
pub reduced_motion: bool,
pub insets: Insets,
pub today: Option<String>,
pub hover_close_ms: u32,
pub read_only: bool,
}Expand description
What a host sets per surface (docs/round-1-contract.md §4–6).
Fields§
§locale: StringBCP 47; the week start and the text direction. Default en-US.
strings: IndexMap<String, String>Built-in string overrides by id.
mode: ModeSetting§system_dark: boolThe platform prefers dark (mode: system).
density: Density§contrast: ContrastSetting§system_high_contrast: boolThe platform asks for more contrast (contrast: system).
font_scale: f32Dynamic Type / font scale, applied to every resolved type size.
hover: boolA hover-capable pointer (@media (hover: hover), hover popovers).
reduced_motion: bool@media (prefers-reduced-motion: reduce); transitions become 0 ms.
insets: Insets§today: Option<String>Today as yyyy-mm-dd (calendars open on it and mark it).
hover_close_ms: u32How a hover overlay (Tooltip, openOn: hover Popover) closes when
the pointer left its trigger and its content. 0 (default) = at
once: the HOST delays forwarding the trigger’s un-hover (gpui’s
grace). > 0 (natives: HOVER_CLOSE_MS) = the core holds it open
and raises OutEvent::HoverTimer; the host calls
Surface::hover_timeout when it fires.
read_only: boolVAPP-200: the viewer may read, not write (an app at app access
read): every writing control builds as disabled: true
(crate::read_only, fixtures/read-only.json).