pub struct EditorPaneStyle {
pub background: Color,
pub border: Color,
pub header_bg: Color,
pub header_border: Color,
pub title_fg: Color,
pub path_fg: Color,
pub dirty: Color,
pub radius: f32,
pub tabs_height: f32,
pub header_height: f32,
pub tabs: TabsStyle,
}Expand description
Colors and logical-pixel geometry for an EditorPane.
No field is automatically clamped. Negative row heights or radius values are therefore forwarded to layout/painting and should be avoided.
§Examples
use ailloli_ui_widgets::editor::EditorPaneStyle;
let style = EditorPaneStyle::default();
assert_eq!(style.tabs_height, 36.0);
assert_eq!(style.header_height, 28.0);Fields§
§background: ColorContent-frame fill color.
border: ColorOne-logical-pixel outer border color.
header_bg: ColorMetadata-header fill color.
header_border: ColorOne-logical-pixel divider color below the header.
title_fg: ColorActive breadcrumb-segment color.
path_fg: ColorInactive breadcrumb/path and fallback icon color.
dirty: ColorUnsaved-change dot color.
radius: f32Outer clip and border radius in logical pixels.
tabs_height: f32Tab-row height in logical pixels.
header_height: f32Metadata-header height in logical pixels.
tabs: TabsStyleNested tab-bar colors.
Implementations§
Source§impl EditorPaneStyle
impl EditorPaneStyle
Sourcepub fn from_theme(theme: Theme, size: EditorPaneSize) -> Self
pub fn from_theme(theme: Theme, size: EditorPaneSize) -> Self
Derives pane colors from theme and row heights from size.
Compact rows are 32/24 logical pixels; default rows are 36/28. The
dirty indicator uses opaque amber and the radius uses theme.radius().md.
§Examples
use ailloli_ui_core::Theme;
use ailloli_ui_widgets::editor::{EditorPaneSize, EditorPaneStyle};
let compact = EditorPaneStyle::from_theme(Theme::default(), EditorPaneSize::Compact);
assert_eq!((compact.tabs_height, compact.header_height), (32.0, 24.0));Trait Implementations§
Source§impl Clone for EditorPaneStyle
impl Clone for EditorPaneStyle
Source§fn clone(&self) -> EditorPaneStyle
fn clone(&self) -> EditorPaneStyle
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EditorPaneStyle
impl Debug for EditorPaneStyle
Auto Trait Implementations§
impl Freeze for EditorPaneStyle
impl RefUnwindSafe for EditorPaneStyle
impl Send for EditorPaneStyle
impl Sync for EditorPaneStyle
impl Unpin for EditorPaneStyle
impl UnwindSafe for EditorPaneStyle
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.