pub struct TableViewStyle {Show 30 fields
pub background: Color,
pub header_background: Color,
pub row_background: Color,
pub row_alt_background: Color,
pub row_hover_background: Color,
pub row_active_background: Color,
pub row_selected_background: Color,
pub grid_color: Color,
pub border: Border,
pub focus_ring: Border,
pub shadows: Vec<BoxShadow>,
pub text: TextStyle,
pub muted_text: TextStyle,
pub header_text: TextStyle,
pub disabled_text: TextStyle,
pub icon_tint: Color,
pub selected_icon_tint: Color,
pub badge_text: TextStyle,
pub progress_track: Color,
pub progress_fill: Color,
pub radius: Radius,
pub row_height: f32,
pub header_height: f32,
pub cell_padding_x: f32,
pub min_column_width: f32,
pub icon_size: f32,
pub icon_gap: f32,
pub progress_width: f32,
pub progress_height: f32,
pub disabled_opacity: f32,
}Expand description
Table surfaces, typography, geometry, selection, and rich-cell appearance.
Dimensions are logical pixels and opacity is a multiplier. Fields are used as supplied without validation. The default is the regular preset of the default theme.
§Examples
use ailloli_ui_widgets::controls::TableViewStyle;
let style = TableViewStyle::default();
assert_eq!((style.header_height, style.row_height, style.min_column_width), (34.0, 36.0, 88.0));
assert_eq!((style.progress_width, style.progress_height), (82.0, 4.0));Fields§
§background: ColorRoot table surface.
header_background: ColorFixed header surface.
row_background: ColorRegular row surface.
row_alt_background: ColorOdd zebra row surface.
row_hover_background: ColorReserved hovered-row surface token.
row_active_background: ColorKeyboard-active row surface.
row_selected_background: ColorSelected row surface, taking precedence over active/zebra.
grid_color: ColorHorizontal and vertical separator color.
border: BorderRoot table border.
focus_ring: BorderFocused enabled table border.
shadows: Vec<BoxShadow>Non-inset shadows painted in order.
text: TextStylePrimary cell text.
muted_text: TextStyleMuted cell text.
header_text: TextStyleHeader text.
disabled_text: TextStyleText used when table or row is disabled.
icon_tint: ColorRegular leading-row icon tint.
selected_icon_tint: ColorLeading-row icon tint while selected.
badge_text: TextStyleBadge label text.
progress_track: ColorProgress track color.
progress_fill: ColorProgress fill color.
radius: RadiusRoot table corner radii.
row_height: f32Body row height in logical pixels.
header_height: f32Fixed header height in logical pixels.
cell_padding_x: f32Horizontal cell padding in logical pixels.
min_column_width: f32Minimum resolved column width in logical pixels.
icon_size: f32Leading-row icon side length in logical pixels.
icon_gap: f32Leading icon/text gap in logical pixels.
progress_width: f32Preferred progress track width in logical pixels.
progress_height: f32Progress track height in logical pixels.
disabled_opacity: f32Disabled row/table alpha multiplier.
Implementations§
Source§impl TableViewStyle
impl TableViewStyle
Sourcepub fn from_theme(theme: Theme, size: TableViewSize) -> Self
pub fn from_theme(theme: Theme, size: TableViewSize) -> Self
Derives table style from theme and density.
Compact uses row/header heights 30/30, padding 8, 12-pixel body text,
and minimum column width 72; default uses 36/34, 10, 13, and 88.
§Examples
use ailloli_ui_core::Theme;
use ailloli_ui_widgets::controls::{TableViewSize, TableViewStyle};
let style = TableViewStyle::from_theme(Theme::default(), TableViewSize::Compact);
assert_eq!((style.row_height, style.header_height, style.min_column_width), (30.0, 30.0, 72.0));Trait Implementations§
Source§impl Clone for TableViewStyle
impl Clone for TableViewStyle
Source§fn clone(&self) -> TableViewStyle
fn clone(&self) -> TableViewStyle
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TableViewStyle
impl Debug for TableViewStyle
Source§impl Default for TableViewStyle
impl Default for TableViewStyle
Source§impl PartialEq for TableViewStyle
impl PartialEq for TableViewStyle
impl StructuralPartialEq for TableViewStyle
Auto Trait Implementations§
impl Freeze for TableViewStyle
impl RefUnwindSafe for TableViewStyle
impl Send for TableViewStyle
impl Sync for TableViewStyle
impl Unpin for TableViewStyle
impl UnwindSafe for TableViewStyle
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
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.