pub struct ListViewStyle {
pub background: Color,
pub border: Border,
pub radius: Radius,
pub padding: f32,
pub gap: f32,
pub width: f32,
}Expand description
Resolved container style and intrinsic width for a ListView.
The backing container currently forwards only the top border width/color and top-left radius as uniform values; use uniform borders and radii.
§Examples
use ailloli_ui_core::Theme;
use ailloli_ui_widgets::controls::ListViewStyle;
let style = ListViewStyle::from_theme(Theme::dark());
assert_eq!(style.width, 260.0);
assert_eq!(style.gap, 2.0);Fields§
§background: ColorList container fill.
border: BorderContainer border; use uniform widths and colors.
radius: RadiusContainer radii; use a uniform value for current rendering.
padding: f32Inner padding on every edge in logical pixels.
gap: f32Vertical gap between items in logical pixels.
width: f32Intrinsic list width in logical pixels.
Implementations§
Source§impl ListViewStyle
impl ListViewStyle
Sourcepub fn from_theme(theme: Theme) -> Self
pub fn from_theme(theme: Theme) -> Self
Resolves list container colors and metrics from theme.
§Examples
use ailloli_ui_core::Theme;
use ailloli_ui_widgets::controls::ListViewStyle;
let style = ListViewStyle::from_theme(Theme::dark());
assert!(style.padding >= 0.0);
assert_eq!(style.width, 260.0);Trait Implementations§
Source§impl Clone for ListViewStyle
impl Clone for ListViewStyle
Source§fn clone(&self) -> ListViewStyle
fn clone(&self) -> ListViewStyle
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ListViewStyle
impl Debug for ListViewStyle
Source§impl Default for ListViewStyle
impl Default for ListViewStyle
Source§impl PartialEq for ListViewStyle
impl PartialEq for ListViewStyle
impl StructuralPartialEq for ListViewStyle
Auto Trait Implementations§
impl Freeze for ListViewStyle
impl RefUnwindSafe for ListViewStyle
impl Send for ListViewStyle
impl Sync for ListViewStyle
impl Unpin for ListViewStyle
impl UnwindSafe for ListViewStyle
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
§fn into_click_action(self) -> ClickAction<A>
fn into_click_action(self) -> ClickAction<A>
Implements the into_click_action helper used by this module.