From ef7985c177c5ec6fe4d26559eca14c9f0b8bc69d Mon Sep 17 00:00:00 2001 From: pml68 Date: Tue, 22 Jul 2025 18:23:24 +0200 Subject: style: organize imports --- src/dialog.rs | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'src/dialog.rs') 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>() -> ::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: &::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) -> Style { Style { - backdrop_color: color!(0x000000, 0.3), + backdrop_color: core::color!(0x000000, 0.3), } } -- cgit v1.2.3