pub struct ProgressStyle {Show 14 fields
pub track: Color,
pub fill: Color,
pub stripe: Color,
pub disabled_track: Color,
pub disabled_fill: Color,
pub border: Border,
pub text: TextStyle,
pub muted_text: TextStyle,
pub focus_neutral: Color,
pub bar_width: f32,
pub bar_height: f32,
pub circular_size: f32,
pub circular_thickness: f32,
pub disabled_opacity: f32,
}Expand description
Resolved colors, typography, and logical-pixel progress geometry.
focus_neutral is reserved for compatibility; progress widgets are not
focusable and do not currently paint it.
§Examples
use ailloli_ui_core::Theme;
use ailloli_ui_widgets::controls::{ProgressSize, ProgressStyle};
let style = ProgressStyle::from_theme(Theme::dark(), ProgressSize::Large);
assert_eq!((style.bar_width, style.bar_height), (280.0, 12.0));
assert_eq!(style.circular_size, 72.0);Fields§
§track: ColorEnabled track fill.
fill: ColorEnabled active fill/ring color.
stripe: ColorEnabled striped-overlay color.
disabled_track: ColorDisabled track color before opacity multiplication.
disabled_fill: ColorDisabled fill color before opacity multiplication.
border: BorderLinear bar border; circular progress does not paint it.
text: TextStyleEnabled circular label style.
muted_text: TextStyleDisabled circular label style.
focus_neutral: ColorReserved focus color; currently unused.
bar_width: f32Linear intrinsic width.
bar_height: f32Linear intrinsic height.
circular_size: f32Circular intrinsic width and height.
circular_thickness: f32Circular ring thickness, later fitted to the resolved side.
disabled_opacity: f32Alpha multiplier for disabled track, fill, label, and border.
Implementations§
Source§impl ProgressStyle
impl ProgressStyle
Sourcepub fn from_theme(theme: Theme, size: ProgressSize) -> Self
pub fn from_theme(theme: Theme, size: ProgressSize) -> Self
Resolves progress colors, metrics, and typography from theme and size.
§Examples
use ailloli_ui_core::Theme;
use ailloli_ui_widgets::controls::{ProgressSize, ProgressStyle};
let style = ProgressStyle::from_theme(Theme::dark(), ProgressSize::Compact);
assert_eq!(style.circular_thickness, 5.0);
assert_eq!(style.text.px_size, 11);Trait Implementations§
Source§impl Clone for ProgressStyle
impl Clone for ProgressStyle
Source§fn clone(&self) -> ProgressStyle
fn clone(&self) -> ProgressStyle
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProgressStyle
impl Debug for ProgressStyle
Source§impl Default for ProgressStyle
impl Default for ProgressStyle
Source§impl PartialEq for ProgressStyle
impl PartialEq for ProgressStyle
impl StructuralPartialEq for ProgressStyle
Auto Trait Implementations§
impl Freeze for ProgressStyle
impl RefUnwindSafe for ProgressStyle
impl Send for ProgressStyle
impl Sync for ProgressStyle
impl Unpin for ProgressStyle
impl UnwindSafe for ProgressStyle
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.