pub struct DropdownColors {
pub field_container: Color,
pub field_content: Color,
pub panel_container: Color,
pub chip_container: Color,
pub chip_content: Color,
pub item_container: Color,
pub item_selected_container: Color,
pub item_content: Color,
pub item_selected_content: Color,
pub hint: Color,
pub empty: Color,
pub error: Color,
}Expand description
One dropdown’s resolved color roles (M3EDropdownMenuTheme’s ten color
methods, plus the two the field and the empty state resolve inline).
Fields§
§field_container: ColorThe trigger field’s fill (fieldBackgroundColor).
field_content: ColorThe trigger field’s ink (fieldForegroundColor), and the ink its
hover/press overlay is drawn from.
panel_container: ColorThe panel’s fill (panelBackgroundColor).
chip_container: ColorA selected-option chip’s fill (chipBackgroundColor).
chip_content: ColorA chip’s label and delete-glyph ink (chipForegroundColor).
item_container: ColorAn idle option row’s fill (itemBackgroundColor).
item_selected_container: ColorA selected option row’s fill (itemSelectedBackgroundColor).
item_content: ColorAn idle option row’s ink (itemForegroundColor).
item_selected_content: ColorA selected option row’s ink (itemSelectedForegroundColor).
hint: ColorThe placeholder’s ink (hintTextStyle).
empty: ColorThe empty-state message’s ink (m3e_dropdown_menu_panel.dart:164).
error: ColorA load failure’s ink (m3e_dropdown_menu_panel.dart:153’s
scheme.error).
Implementations§
Source§impl DropdownColors
impl DropdownColors
Sourcepub fn resolve(theme: Option<&Theme>) -> Self
pub fn resolve(theme: Option<&Theme>) -> Self
Resolve every role from theme, or from the M3 baseline light values
when no theme is threaded into the pass.
Sourcepub fn item_background(&self, enabled: bool, selected: bool) -> Color
pub fn item_background(&self, enabled: bool, selected: bool) -> Color
An option row’s fill: disabled first, then selected
(_resolveBackgroundColor).
Sourcepub fn item_foreground(&self, enabled: bool, selected: bool) -> Color
pub fn item_foreground(&self, enabled: bool, selected: bool) -> Color
An option row’s ink, on the same ladder (_resolveTextColor).
Trait Implementations§
Source§impl Clone for DropdownColors
impl Clone for DropdownColors
impl Copy for DropdownColors
Source§impl Debug for DropdownColors
impl Debug for DropdownColors
Source§impl PartialEq for DropdownColors
impl PartialEq for DropdownColors
impl StructuralPartialEq for DropdownColors
Auto Trait Implementations§
impl Freeze for DropdownColors
impl RefUnwindSafe for DropdownColors
impl Send for DropdownColors
impl Sync for DropdownColors
impl Unpin for DropdownColors
impl UnsafeUnpin for DropdownColors
impl UnwindSafe for DropdownColors
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
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,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.