pub struct DialogStyle {Show 22 fields
pub backdrop: Color,
pub panel_background: Color,
pub border: Border,
pub shadows: Vec<BoxShadow>,
pub title_text: TextStyle,
pub body_text: TextStyle,
pub button_text: TextStyle,
pub primary_background: Color,
pub primary_background_pressed: Color,
pub cancel_background: Color,
pub cancel_background_pressed: Color,
pub danger_background: Color,
pub danger_background_pressed: Color,
pub button_border: Border,
pub radius: Radius,
pub button_radius: Radius,
pub panel_width: f32,
pub panel_min_height: f32,
pub padding: f32,
pub button_height: f32,
pub button_width: f32,
pub gap: f32,
}Expand description
Resolved paint, typography, and logical-pixel geometry for a Dialog.
primary_background_pressed, cancel_background_pressed, and
danger_background_pressed are retained for style compatibility but the
current overlay painter does not yet resolve per-button pressed state.
§Examples
use ailloli_ui_core::Theme;
use ailloli_ui_widgets::controls::{DialogStyle, DialogTone};
let style = DialogStyle::from_theme(Theme::dark(), DialogTone::Neutral);
assert_eq!(style.panel_width, 360.0);
assert_eq!(style.button_height, 34.0);Fields§
§backdrop: ColorFull-host overlay fill.
panel_background: ColorPanel fill.
border: BorderPanel border.
shadows: Vec<BoxShadow>Panel shadows; inset entries are skipped by the current painter.
title_text: TextStyleTitle text style.
body_text: TextStyleWrapping body text style.
Shared cancel and confirm label style.
primary_background: ColorNeutral confirm-button fill.
primary_background_pressed: ColorReserved neutral pressed fill; currently not painted.
cancel_background: ColorCancel-button fill.
cancel_background_pressed: ColorReserved cancel pressed fill; currently not painted.
danger_background: ColorDanger confirm-button fill.
danger_background_pressed: ColorReserved danger pressed fill; currently not painted.
Shared button border.
radius: RadiusPanel corner radii.
Button corner radii.
panel_width: f32Preferred panel width in logical pixels.
panel_min_height: f32Minimum panel height in logical pixels.
padding: f32Panel and button edge inset in logical pixels.
Cancel and confirm button height in logical pixels.
Width of each button in logical pixels.
gap: f32Horizontal gap between cancel and confirm buttons.
Implementations§
Source§impl DialogStyle
impl DialogStyle
Sourcepub fn from_theme(theme: Theme, tone: DialogTone) -> Self
pub fn from_theme(theme: Theme, tone: DialogTone) -> Self
Resolves tone through theme into complete dialog style values.
Tone affects the primary and primary-pressed colors; danger-specific fields are populated for either tone.
§Examples
use ailloli_ui_core::Theme;
use ailloli_ui_widgets::controls::{DialogStyle, DialogTone};
let neutral = DialogStyle::from_theme(Theme::dark(), DialogTone::Neutral);
let danger = DialogStyle::from_theme(Theme::dark(), DialogTone::Danger);
assert_ne!(neutral.primary_background, danger.primary_background);Trait Implementations§
Source§impl Clone for DialogStyle
impl Clone for DialogStyle
Source§fn clone(&self) -> DialogStyle
fn clone(&self) -> DialogStyle
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DialogStyle
impl Debug for DialogStyle
Source§impl Default for DialogStyle
impl Default for DialogStyle
Source§impl PartialEq for DialogStyle
impl PartialEq for DialogStyle
impl StructuralPartialEq for DialogStyle
Auto Trait Implementations§
impl Freeze for DialogStyle
impl RefUnwindSafe for DialogStyle
impl Send for DialogStyle
impl Sync for DialogStyle
impl Unpin for DialogStyle
impl UnwindSafe for DialogStyle
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.