pub struct MenuOptions {
pub min_width: Option<f32>,
pub max_width: Option<f32>,
pub theme: ThemeSource,
pub gutter: GutterPolicy,
pub trailing_gutter: TrailingGutterPolicy,
}Expand description
Tunable popup options layered on top of the Theme.
Fields§
§min_width: Option<f32>Minimum popup width in logical points.
max_width: Option<f32>Maximum popup width in logical points.
theme: ThemeSourceTheme source.
gutter: GutterPolicyLeading-gutter reservation policy (#43). Defaults to
GutterPolicy::Auto — the OEM-native behavior.
trailing_gutter: TrailingGutterPolicyTrailing-gutter (submenu chevron / accessory column) reservation policy
(#60). Defaults to TrailingGutterPolicy::Auto — the OEM-native
behavior.
Implementations§
Source§impl MenuOptions
impl MenuOptions
Sourcepub fn theme(self, t: ThemeSource) -> Self
pub fn theme(self, t: ThemeSource) -> Self
Set the theme source.
Sourcepub fn gutter(self, g: GutterPolicy) -> Self
pub fn gutter(self, g: GutterPolicy) -> Self
Set the leading-gutter reservation policy.
Sourcepub fn trailing_gutter(self, g: TrailingGutterPolicy) -> Self
pub fn trailing_gutter(self, g: TrailingGutterPolicy) -> Self
Set the trailing-gutter (submenu chevron / accessory column) reservation policy.
Sourcepub fn min_width(self, w: f32) -> Self
pub fn min_width(self, w: f32) -> Self
Set the minimum popup width, in logical points.
w is clamped to be non-negative and non-NaN: a NaN input leaves
min_width unset, and a negative input is clamped up to 0.0. If a
max_width is already set and w would exceed it, max_width is
raised to match w so min <= max always holds.
Sourcepub fn max_width(self, w: f32) -> Self
pub fn max_width(self, w: f32) -> Self
Set the maximum popup width, in logical points.
w is clamped to be non-negative and non-NaN: a NaN input leaves
max_width unset, and a negative input is clamped up to 0.0. If a
min_width is already set and exceeds w, w is raised to match
min_width so min <= max always holds.
Trait Implementations§
Source§impl Clone for MenuOptions
impl Clone for MenuOptions
Source§fn clone(&self) -> MenuOptions
fn clone(&self) -> MenuOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more