pub struct SelectStyle {Show 18 fields
pub bg: &'static str,
pub border: Option<&'static str>,
pub radius: f64,
pub shadow: Option<Shadow>,
pub color: &'static str,
pub sub: &'static str,
pub px: f64,
pub row_h: f64,
pub row_radius: f64,
pub row_hover: &'static str,
pub row_hi: &'static str,
pub check: &'static str,
pub search_bg: &'static str,
pub rows: f64,
pub min_w: f64,
pub search_min_w: f64,
pub thumb: &'static str,
pub gap: f64,
}Expand description
The look of an open list, set from CSS (Styled): standard background,
border-color, border-radius, box-shadow, color, font-size, plus the custom
properties named after the fields (--row-h, --row-hi, --check, …).
Fields§
§bg: &'static str§border: Option<&'static str>§radius: f64§shadow: Option<Shadow>§color: &'static strOption text.
sub: &'static strPlaceholder / “No matches”.
px: f64§row_h: f64§row_radius: f64§row_hover: &'static strHovered row fill.
row_hi: &'static strHighlighted (keyboard) row fill.
check: &'static strTick on the chosen row.
search_bg: &'static str§rows: f64Rows shown at once; more scroll.
min_w: f64Minimum list width (a narrow trigger still gets a readable list).
search_min_w: f64Minimum width of a searchable list.
thumb: &'static strScroll thumb.
gap: f64Space between trigger and list.
Implementations§
Source§impl SelectStyle
impl SelectStyle
Sourcepub fn fit(self, h: f64, searchable: bool) -> SelectStyle
pub fn fit(self, h: f64, searchable: bool) -> SelectStyle
This style with as many rows as fit a container h tall (at least 3), so a list
never runs past a short dialog: it scrolls instead.
Trait Implementations§
Source§impl Clone for SelectStyle
impl Clone for SelectStyle
Source§fn clone(&self) -> SelectStyle
fn clone(&self) -> SelectStyle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SelectStyle
Source§impl Debug for SelectStyle
impl Debug for SelectStyle
Source§impl Default for SelectStyle
impl Default for SelectStyle
Source§fn default() -> SelectStyle
fn default() -> SelectStyle
Returns the “default value” for a type. Read more
Source§impl PartialEq for SelectStyle
impl PartialEq for SelectStyle
impl StructuralPartialEq for SelectStyle
Auto Trait Implementations§
impl Forget for SelectStyle
impl Freeze for SelectStyle
impl Move for SelectStyle
impl RefUnwindSafe for SelectStyle
impl Send for SelectStyle
impl Sync for SelectStyle
impl Unpin for SelectStyle
impl UnsafeUnpin for SelectStyle
impl UnwindSafe for SelectStyle
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