pub struct PanelStyle {
pub bg: Color,
pub border: Option<Color>,
pub radius: f32,
}Expand description
Fill, optional border, and corner radius for draw_panel.
Dimensions are logical pixels. A radius greater than zero selects a rounded
command; zero, negative, or NaN selects an axis-aligned rectangle.
§Examples
use ailloli_ui_core::Color;
use ailloli_ui_widgets::layout::panel::PanelStyle;
let style = PanelStyle::simple(Color::BLACK);
assert!(style.border.is_none());
assert_eq!(style.radius, 0.0);Fields§
§bg: ColorPanel fill.
border: Option<Color>Optional color for one-pixel top and bottom rules only.
radius: f32Corner radius in logical pixels.
Implementations§
Trait Implementations§
Source§impl Clone for PanelStyle
impl Clone for PanelStyle
Source§fn clone(&self) -> PanelStyle
fn clone(&self) -> PanelStyle
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 PanelStyle
impl Debug for PanelStyle
impl Copy for PanelStyle
Auto Trait Implementations§
impl Freeze for PanelStyle
impl RefUnwindSafe for PanelStyle
impl Send for PanelStyle
impl Sync for PanelStyle
impl Unpin for PanelStyle
impl UnwindSafe for PanelStyle
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.