pub struct WindowAffordanceStyle {Show 19 fields
pub titlebar_height: f32,
pub control_size: f32,
pub control_gap: f32,
pub control_margin: f32,
pub resize_hit_thickness: f32,
pub resize_handle_length: f32,
pub resize_handle_thickness: f32,
pub radius: f32,
pub background: Color,
pub titlebar_background: Color,
pub border: Color,
pub shadow: BoxShadow,
pub control_idle: Color,
pub control_hover: Color,
pub control_active: Color,
pub close_hover: Color,
pub handle_idle: Color,
pub handle_hover: Color,
pub handle_active: Color,
}Expand description
Geometry and colors for WindowAffordanceFrame.
All dimensions are logical pixels. The default uses a 38-pixel title bar, 12-pixel resize hit frame, three 24-pixel controls, and a 12-pixel radius. Values are sanitized only where consumed, so custom styles should use finite non-negative dimensions.
§Examples
use ailloli_ui_widgets::chrome::WindowAffordanceStyle;
let style = WindowAffordanceStyle::default();
assert_eq!(style.titlebar_height, 38.0);
assert_eq!(style.resize_hit_thickness, 12.0);Fields§
§titlebar_height: f32Title-bar height in logical pixels.
control_size: f32Square chrome-control extent in logical pixels.
control_gap: f32Horizontal gap between chrome controls in logical pixels.
control_margin: f32Distance from the right bound to the close control.
resize_hit_thickness: f32Invisible resize-hit frame thickness in logical pixels.
resize_handle_length: f32Visible resize-handle length in logical pixels.
resize_handle_thickness: f32Visible resize-handle thickness in logical pixels.
radius: f32Frame corner radius in logical pixels.
background: ColorContent surface color.
titlebar_background: ColorTitle-bar fill color.
border: ColorOne-logical-pixel frame border color.
shadow: BoxShadowOuter frame shadow; inset shadows are skipped.
control_idle: ColorIdle chrome-control fill.
control_hover: ColorHovered chrome-control fill.
control_active: ColorPressed chrome-control fill.
close_hover: ColorDestructive close-control hover fill.
handle_idle: ColorIdle visible resize-handle fill.
handle_hover: ColorHovered resize-handle fill.
handle_active: ColorActive resize-handle fill.
Trait Implementations§
Source§impl Clone for WindowAffordanceStyle
impl Clone for WindowAffordanceStyle
Source§fn clone(&self) -> WindowAffordanceStyle
fn clone(&self) -> WindowAffordanceStyle
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WindowAffordanceStyle
impl Debug for WindowAffordanceStyle
Source§impl Default for WindowAffordanceStyle
Supplies the dark-theme defaults described by WindowAffordanceStyle.
impl Default for WindowAffordanceStyle
Supplies the dark-theme defaults described by WindowAffordanceStyle.
Source§impl PartialEq for WindowAffordanceStyle
impl PartialEq for WindowAffordanceStyle
impl Copy for WindowAffordanceStyle
impl StructuralPartialEq for WindowAffordanceStyle
Auto Trait Implementations§
impl Freeze for WindowAffordanceStyle
impl RefUnwindSafe for WindowAffordanceStyle
impl Send for WindowAffordanceStyle
impl Sync for WindowAffordanceStyle
impl Unpin for WindowAffordanceStyle
impl UnwindSafe for WindowAffordanceStyle
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.