pub struct UploadDropzoneStyle {Show 15 fields
pub background: Color,
pub background_hovered: Color,
pub border: Border,
pub border_hovered: Border,
pub focus_ring: Border,
pub button_background: Color,
pub button_text: TextStyle,
pub title_text: TextStyle,
pub description_text: TextStyle,
pub disabled_opacity: f32,
pub shadows: Vec<BoxShadow>,
pub width: f32,
pub height: f32,
pub radius: Radius,
pub button_height: f32,
}Expand description
Resolved paint, typography, and intrinsic geometry for a dropzone.
shadows is retained for style compatibility but is not currently painted.
Dimensions are logical pixels and are otherwise accepted as-is.
§Examples
use ailloli_ui_core::Theme;
use ailloli_ui_widgets::controls::{UploadDropzoneStyle, UploadDropzoneVariant};
let style = UploadDropzoneStyle::from_theme(Theme::dark(), UploadDropzoneVariant::Compact);
assert_eq!((style.width, style.height), (260.0, 104.0));
assert_eq!(style.button_height, 28.0);Fields§
§background: ColorIdle background fill.
background_hovered: ColorBackground fill while at least one dragged file is accepted.
border: BorderIdle border.
border_hovered: BorderBorder while an accepted dragged file is over the bounds.
focus_ring: BorderBorder used while the enabled dropzone has focus.
Browse-button fill.
Browse-button label style.
title_text: TextStylePrimary title style.
description_text: TextStyleSecondary description style.
disabled_opacity: f32Replacement alpha for disabled fills and text colors.
shadows: Vec<BoxShadow>Reserved shadows; currently not painted.
width: f32Intrinsic width in logical pixels.
height: f32Intrinsic height in logical pixels.
radius: RadiusDropzone border radius.
Browse-button height in logical pixels; its width is fixed at 116.
Implementations§
Source§impl UploadDropzoneStyle
impl UploadDropzoneStyle
Sourcepub fn from_theme(theme: Theme, variant: UploadDropzoneVariant) -> Self
pub fn from_theme(theme: Theme, variant: UploadDropzoneVariant) -> Self
Resolves variant through theme into concrete style values.
§Examples
use ailloli_ui_core::Theme;
use ailloli_ui_widgets::controls::{UploadDropzoneStyle, UploadDropzoneVariant};
let style = UploadDropzoneStyle::from_theme(Theme::dark(), UploadDropzoneVariant::Default);
assert_eq!((style.width, style.height), (360.0, 142.0));
assert_eq!(style.disabled_opacity, 0.45);Trait Implementations§
Source§impl Clone for UploadDropzoneStyle
impl Clone for UploadDropzoneStyle
Source§fn clone(&self) -> UploadDropzoneStyle
fn clone(&self) -> UploadDropzoneStyle
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for UploadDropzoneStyle
impl Debug for UploadDropzoneStyle
Source§impl Default for UploadDropzoneStyle
impl Default for UploadDropzoneStyle
Source§impl PartialEq for UploadDropzoneStyle
impl PartialEq for UploadDropzoneStyle
impl StructuralPartialEq for UploadDropzoneStyle
Auto Trait Implementations§
impl Freeze for UploadDropzoneStyle
impl RefUnwindSafe for UploadDropzoneStyle
impl Send for UploadDropzoneStyle
impl Sync for UploadDropzoneStyle
impl Unpin for UploadDropzoneStyle
impl UnwindSafe for UploadDropzoneStyle
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.