pub struct ComponentStyleSlots {Show 42 fields
pub button: Option<SharedButtonStyle>,
pub split_button: Option<SharedSplitButtonStyle>,
pub splitter: Option<SharedSplitterStyle>,
pub icon_button: Option<SharedIconButtonStyle>,
pub toggle: Option<SharedToggleStyle>,
pub checkbox: Option<SharedCheckboxStyle>,
pub radio: Option<SharedRadioStyle>,
pub radio_tile: Option<SharedRadioTileStyle>,
pub slider: Option<SharedSliderStyle>,
pub text_input: Option<SharedTextInputStyle>,
pub combo_box: Option<SharedComboBoxStyle>,
pub menu_item: Option<SharedMenuItemStyle>,
pub panel: Option<SharedPanelStyle>,
pub card: Option<SharedCardStyle>,
pub chart: Option<SharedChartStyle>,
pub popover: Option<SharedPopoverStyle>,
pub tooltip: Option<SharedTooltipStyle>,
pub scroll_bar: Option<SharedScrollBarStyle>,
pub standard_item: Option<SharedStandardItemStyle>,
pub tab: Option<SharedTabStyle>,
pub dialog: Option<SharedDialogStyle>,
pub snackbar: Option<SharedSnackbarStyle>,
pub toast: Option<SharedToastStyle>,
pub banner: Option<SharedBannerStyle>,
pub badge: Option<SharedBadgeStyle>,
pub progress_bar: Option<SharedProgressBarStyle>,
pub link: Option<SharedLinkStyle>,
pub segmented_control: Option<SharedSegmentedControlStyle>,
pub avatar: Option<SharedAvatarStyle>,
pub calendar: Option<SharedCalendarStyle>,
pub color_picker: Option<SharedColorPickerStyle>,
pub spin_box: Option<SharedSpinBoxStyle>,
pub date_edit: Option<SharedDateEditStyle>,
pub search_field: Option<SharedSearchFieldStyle>,
pub rich_text_editor: Option<SharedRichTextEditorStyle>,
pub table: Option<SharedTableStyle>,
pub list_container: Option<SharedListContainerStyle>,
pub drop_zone: Option<SharedDropZoneStyle>,
pub drop_target: Option<SharedDropTargetStyle>,
pub grid_view: Option<SharedGridViewStyle>,
pub web_view: Option<SharedWebViewStyle>,
pub text_selection: Option<SharedTextSelectionStyle>,
}Expand description
Typed slot bag living on crate::styles::Theme. One slot per
themable widget. None means “use the widget’s local default
Recipe*Style”; Some(rc) installs the override theme-wide.
Fields§
§splitter: Option<SharedSplitterStyle>§toggle: Option<SharedToggleStyle>§checkbox: Option<SharedCheckboxStyle>§radio: Option<SharedRadioStyle>§radio_tile: Option<SharedRadioTileStyle>§slider: Option<SharedSliderStyle>§text_input: Option<SharedTextInputStyle>§combo_box: Option<SharedComboBoxStyle>§panel: Option<SharedPanelStyle>§card: Option<SharedCardStyle>§chart: Option<SharedChartStyle>§popover: Option<SharedPopoverStyle>§tooltip: Option<SharedTooltipStyle>§scroll_bar: Option<SharedScrollBarStyle>§standard_item: Option<SharedStandardItemStyle>§tab: Option<SharedTabStyle>§dialog: Option<SharedDialogStyle>§snackbar: Option<SharedSnackbarStyle>§toast: Option<SharedToastStyle>§badge: Option<SharedBadgeStyle>§progress_bar: Option<SharedProgressBarStyle>§link: Option<SharedLinkStyle>§segmented_control: Option<SharedSegmentedControlStyle>§avatar: Option<SharedAvatarStyle>§calendar: Option<SharedCalendarStyle>§color_picker: Option<SharedColorPickerStyle>§spin_box: Option<SharedSpinBoxStyle>§date_edit: Option<SharedDateEditStyle>§search_field: Option<SharedSearchFieldStyle>§rich_text_editor: Option<SharedRichTextEditorStyle>§table: Option<SharedTableStyle>§list_container: Option<SharedListContainerStyle>§drop_zone: Option<SharedDropZoneStyle>§drop_target: Option<SharedDropTargetStyle>§grid_view: Option<SharedGridViewStyle>§web_view: Option<SharedWebViewStyle>§text_selection: Option<SharedTextSelectionStyle>Touch text-selection chrome — the selection handles and the magnifier.
See TextSelectionStyle.
Implementations§
Source§impl ComponentStyleSlots
impl ComponentStyleSlots
Sourcepub fn installed(&self) -> Vec<&'static str>
pub fn installed(&self) -> Vec<&'static str>
The names of the slots that carry an override, in declaration order.
The direct “what is installed here” question, kept for diagnostics and
tests. Its original consumer — the target-conformance audit’s
unprojected_style_slots
— now asks unchanged_against instead,
comparing the theme derived at two densities.
The body destructures Self without a .. rest pattern, so adding a
slot to the struct and forgetting it in for_every_slot! is a compile
error rather than a silently unreported override.
Sourcepub fn unchanged_against(&self, other: &Self) -> Vec<&'static str>
pub fn unchanged_against(&self, other: &Self) -> Vec<&'static str>
The slots installed here that are the same object in other — the
ones a re-derivation left alone.
One consumer, and it is the same one installed
has: the target-conformance audit’s
unprojected_style_slots,
which asks a theme for the styles no
DensityProjection rebuilds by
deriving it at two densities and comparing.
Rc::ptr_eq, not any comparison of contents: a Tier-3 style is a trait
object with no equality of its own, and identity is the right question.
A projection that re-derives a slot builds a fresh Rc for it, so a slot
still pointing at the same allocation at two densities is one the ladder
did not reach — whoever installed it.
The body destructures self without a .. rest pattern, for the reason
installed does: adding a slot to the struct and
forgetting it in for_every_slot! is a compile error rather than a
silent omission. Both probes expand through that one roster, so neither
can be the copy that fell behind.
Trait Implementations§
Source§impl Clone for ComponentStyleSlots
impl Clone for ComponentStyleSlots
Source§fn clone(&self) -> ComponentStyleSlots
fn clone(&self) -> ComponentStyleSlots
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more