pub struct TreeViewStyle {Show 25 fields
pub background: Color,
pub selected_background: Color,
pub active_background: Color,
pub hover_background: Color,
pub pressed_background: Color,
pub drop_indicator: Color,
pub drop_inside_background: Color,
pub editing_background: Color,
pub editing_border: Color,
pub text: TextStyle,
pub selected_text: TextStyle,
pub disabled_text: TextStyle,
pub icon_tint: Color,
pub selected_icon_tint: Color,
pub chevron_tint: Color,
pub focus_ring: Border,
pub radius: Radius,
pub row_height: f32,
pub padding_x: f32,
pub padding_y: f32,
pub indent: f32,
pub gap: f32,
pub icon_size: f32,
pub chevron_size: f32,
pub disabled_opacity: f32,
}Expand description
Tree surfaces, typography, focus, geometry, and disabled treatment.
Dimensions are logical pixels and values are consumed as supplied. The default is the regular preset derived from the default theme.
§Examples
use ailloli_ui_widgets::controls::TreeViewStyle;
let style = TreeViewStyle::default();
assert_eq!((style.row_height, style.indent, style.icon_size), (28.0, 18.0, 16.0));Fields§
§background: ColorOptional root surface; transparent by default.
selected_background: ColorSelected-row surface.
active_background: ColorFocused keyboard-active row surface.
hover_background: ColorReserved hover-row surface token.
pressed_background: ColorReserved pressed-row surface token.
drop_indicator: ColorBefore/after drop line and inside-drop border.
drop_inside_background: ColorInside-drop row surface.
editing_background: ColorInline editor surface.
editing_border: ColorInline editor border/focus color.
text: TextStyleNormal row text style.
selected_text: TextStyleSelected row text style.
disabled_text: TextStyleDisabled tree/node text style.
icon_tint: ColorNormal leading-icon tint.
selected_icon_tint: ColorSelected leading/trailing-icon tint.
chevron_tint: ColorBranch chevron tint.
focus_ring: BorderKeyboard-active row border.
radius: RadiusRow/root/editor corner radii.
row_height: f32Row height in logical pixels.
padding_x: f32Outer horizontal content padding in logical pixels.
padding_y: f32Outer vertical content padding in logical pixels.
indent: f32Per-depth horizontal indentation in logical pixels.
gap: f32Chevron/icon/text spacing in logical pixels.
icon_size: f32Leading/trailing icon side length in logical pixels.
chevron_size: f32Chevron side length in logical pixels.
disabled_opacity: f32Whole-tree or per-node disabled alpha multiplier.
Implementations§
Source§impl TreeViewStyle
impl TreeViewStyle
Sourcepub fn from_theme(theme: Theme, size: TreeViewSize) -> Self
pub fn from_theme(theme: Theme, size: TreeViewSize) -> Self
Derives appearance from theme and density geometry.
Compact uses row/padding/indent/text size 24, 8/4, 16, 12; default uses
28, 10/6, 18, 13.
§Examples
use ailloli_ui_core::Theme;
use ailloli_ui_widgets::controls::{TreeViewSize, TreeViewStyle};
let style = TreeViewStyle::from_theme(Theme::default(), TreeViewSize::Compact);
assert_eq!((style.row_height, style.padding_x, style.padding_y), (24.0, 8.0, 4.0));Trait Implementations§
Source§impl Clone for TreeViewStyle
impl Clone for TreeViewStyle
Source§fn clone(&self) -> TreeViewStyle
fn clone(&self) -> TreeViewStyle
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TreeViewStyle
impl Debug for TreeViewStyle
Source§impl Default for TreeViewStyle
impl Default for TreeViewStyle
Source§impl PartialEq for TreeViewStyle
impl PartialEq for TreeViewStyle
impl StructuralPartialEq for TreeViewStyle
Auto Trait Implementations§
impl Freeze for TreeViewStyle
impl RefUnwindSafe for TreeViewStyle
impl Send for TreeViewStyle
impl Sync for TreeViewStyle
impl Unpin for TreeViewStyle
impl UnwindSafe for TreeViewStyle
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.