From 29326215ccf13e1d1e25bf3bf5ada007856bff69 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Tue, 5 Mar 2024 03:48:08 +0100 Subject: Simplify theming for `Container` widget --- examples/layout/src/main.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'examples/layout/src/main.rs') diff --git a/examples/layout/src/main.rs b/examples/layout/src/main.rs index 39c8315f..b2d28a1c 100644 --- a/examples/layout/src/main.rs +++ b/examples/layout/src/main.rs @@ -1,7 +1,6 @@ use iced::executor; use iced::keyboard; use iced::mouse; -use iced::theme; use iced::widget::{ button, canvas, checkbox, column, container, horizontal_space, pick_list, row, scrollable, text, @@ -98,7 +97,7 @@ impl Application for Layout { } else { self.example.view() }) - .style(|theme: &Theme| { + .style(|theme, _status| { let palette = theme.extended_palette(); container::Appearance::default() @@ -262,7 +261,7 @@ fn application<'a>() -> Element<'a, Message> { .padding(10) .align_items(Alignment::Center), ) - .style(|theme: &Theme| { + .style(|theme, _status| { let palette = theme.extended_palette(); container::Appearance::default() @@ -276,7 +275,7 @@ fn application<'a>() -> Element<'a, Message> { .width(200) .align_items(Alignment::Center), ) - .style(theme::Container::Box) + .style(container::box_) .height(Length::Fill) .center_y(); -- cgit