pub struct Style {
pub indent: f32,
pub icon_spacing: f32,
pub row_height: f32,
pub expand_icon_size: f32,
pub action_icon_size: f32,
pub selection_color: Option<Color32>,
pub hover_color: Option<Color32>,
pub expand_icon_style: ExpandIconStyle,
}Expand description
Style configuration for the outliner widget.
Controls the visual appearance including spacing, colors, and icon sizes. Use the builder pattern methods for convenient construction:
use egui_arbor::Style;
use egui::Color32;
let style = Style::default()
.with_indent(20.0)
.with_selection_color(Color32::from_rgb(100, 150, 200));Fields§
§indent: f32Indentation per hierarchy level in logical pixels.
Default: 16.0
icon_spacing: f32Spacing between icon and text in logical pixels.
Default: 4.0
row_height: f32Height of each row in logical pixels.
Default: 20.0
expand_icon_size: f32Size of expand/collapse arrow in logical pixels.
Default: 12.0
action_icon_size: f32Size of action icons in logical pixels.
Default: 16.0
selection_color: Option<Color32>Optional selection highlight color.
If None, uses egui’s default selection color.
hover_color: Option<Color32>Optional hover highlight color.
If None, uses egui’s default hover color.
expand_icon_style: ExpandIconStyleStyle of the expand/collapse icon.
Default: ExpandIconStyle::Arrow
Implementations§
Source§impl Style
impl Style
Sourcepub fn with_indent(self, indent: f32) -> Self
pub fn with_indent(self, indent: f32) -> Self
Sourcepub fn with_icon_spacing(self, spacing: f32) -> Self
pub fn with_icon_spacing(self, spacing: f32) -> Self
Sourcepub fn with_row_height(self, height: f32) -> Self
pub fn with_row_height(self, height: f32) -> Self
Sourcepub fn with_expand_icon_size(self, size: f32) -> Self
pub fn with_expand_icon_size(self, size: f32) -> Self
Sourcepub fn with_action_icon_size(self, size: f32) -> Self
pub fn with_action_icon_size(self, size: f32) -> Self
Sourcepub fn with_selection_color(self, color: Color32) -> Self
pub fn with_selection_color(self, color: Color32) -> Self
Sourcepub fn with_hover_color(self, color: Color32) -> Self
pub fn with_hover_color(self, color: Color32) -> Self
Sourcepub fn with_expand_icon_style(self, style: ExpandIconStyle) -> Self
pub fn with_expand_icon_style(self, style: ExpandIconStyle) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Style
impl RefUnwindSafe for Style
impl Send for Style
impl Sync for Style
impl Unpin for Style
impl UnwindSafe for Style
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