diff options
| author | pml68 <contact@pml68.dev> | 2025-07-22 18:23:24 +0200 |
|---|---|---|
| committer | pml68 <contact@pml68.dev> | 2025-07-22 18:23:24 +0200 |
| commit | ef7985c177c5ec6fe4d26559eca14c9f0b8bc69d (patch) | |
| tree | ab49e7f2727e15de30a3b48e3ae6e25485b43f43 /src/dialog.rs | |
| parent | chore: necessary updates for iced-rs/iced@e0d9078 (diff) | |
| download | iced_dialog-ef7985c177c5ec6fe4d26559eca14c9f0b8bc69d.tar.gz | |
style: organize imports
Diffstat (limited to '')
| -rw-r--r-- | src/dialog.rs | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/dialog.rs b/src/dialog.rs index c944e72..840800f 100644 --- a/src/dialog.rs +++ b/src/dialog.rs @@ -1,14 +1,13 @@ //! Dialogs can be used to provide users with //! important information and make them act on it. -use iced_core::{ - self as core, Color, Element, Length, Padding, Pixels, alignment, color, -}; use iced_widget::{ Container, Row, Theme, column, container, mouse_area, opaque, stack, text, text::{Fragment, IntoFragment}, vertical_space, }; +use crate::core::{self, Color, Element, Length, Padding, Pixels, alignment}; + /// A message dialog. /// /// Only the content is required, [`buttons`] and the [`title`] are optional. @@ -513,11 +512,7 @@ impl Catalog for Theme { } fn default_container<'a>() -> <Self as container::Catalog>::Class<'a> { - Box::new(|theme| { - container::background( - theme.extended_palette().background.base.color, - ) - }) + Box::new(|theme| container::background(theme.palette().background)) } fn style(&self, class: &<Self as Catalog>::Class<'_>) -> Style { @@ -526,8 +521,8 @@ impl Catalog for Theme { } /// The default style of a [`Dialog`]. -pub fn default(_theme: &Theme) -> Style { +pub fn default<Theme>(_theme: &Theme) -> Style { Style { - backdrop_color: color!(0x000000, 0.3), + backdrop_color: core::color!(0x000000, 0.3), } } |
