diff options
author | 2025-02-21 01:22:56 +0100 | |
---|---|---|
committer | 2025-02-21 01:37:13 +0100 | |
commit | 9ceb467e6e12129b42d67a4a1ff3cb21bc7daadd (patch) | |
tree | dd8a9407058915c152ce6544ba20b75240ca85be /widget | |
parent | 28caeccf22d163e9014b5ed26334b6085683a28b (diff) | |
download | iced-9ceb467e6e12129b42d67a4a1ff3cb21bc7daadd.tar.gz iced-9ceb467e6e12129b42d67a4a1ff3cb21bc7daadd.tar.bz2 iced-9ceb467e6e12129b42d67a4a1ff3cb21bc7daadd.zip |
Run `cargo fmt`
Diffstat (limited to 'widget')
-rw-r--r-- | widget/src/button.rs | 2 | ||||
-rw-r--r-- | widget/src/canvas.rs | 6 | ||||
-rw-r--r-- | widget/src/canvas/program.rs | 2 | ||||
-rw-r--r-- | widget/src/container.rs | 4 | ||||
-rw-r--r-- | widget/src/helpers.rs | 2 | ||||
-rw-r--r-- | widget/src/keyed/column.rs | 2 | ||||
-rw-r--r-- | widget/src/lazy.rs | 2 | ||||
-rw-r--r-- | widget/src/lazy/cache.rs | 2 | ||||
-rw-r--r-- | widget/src/markdown.rs | 2 | ||||
-rw-r--r-- | widget/src/mouse_area.rs | 2 | ||||
-rw-r--r-- | widget/src/qr_code.rs | 2 | ||||
-rw-r--r-- | widget/src/scrollable.rs | 2 | ||||
-rw-r--r-- | widget/src/shader.rs | 2 | ||||
-rw-r--r-- | widget/src/shader/program.rs | 2 | ||||
-rw-r--r-- | widget/src/text_input.rs | 2 | ||||
-rw-r--r-- | widget/src/themer.rs | 2 | ||||
-rw-r--r-- | widget/src/tooltip.rs | 6 |
17 files changed, 23 insertions, 21 deletions
diff --git a/widget/src/button.rs b/widget/src/button.rs index 0e24328f..1b51065d 100644 --- a/widget/src/button.rs +++ b/widget/src/button.rs @@ -23,8 +23,8 @@ use crate::core::overlay; use crate::core::renderer; use crate::core::theme::palette; use crate::core::touch; -use crate::core::widget::tree::{self, Tree}; use crate::core::widget::Operation; +use crate::core::widget::tree::{self, Tree}; use crate::core::window; use crate::core::{ Background, Clipboard, Color, Element, Event, Layout, Length, Padding, diff --git a/widget/src/canvas.rs b/widget/src/canvas.rs index 046abddf..50acade5 100644 --- a/widget/src/canvas.rs +++ b/widget/src/canvas.rs @@ -52,13 +52,13 @@ mod program; pub use program::Program; +pub use crate::Action; pub use crate::core::event::Event; pub use crate::graphics::cache::Group; pub use crate::graphics::geometry::{ - fill, gradient, path, stroke, Fill, Gradient, Image, LineCap, LineDash, - LineJoin, Path, Stroke, Style, Text, + Fill, Gradient, Image, LineCap, LineDash, LineJoin, Path, Stroke, Style, + Text, fill, gradient, path, stroke, }; -pub use crate::Action; use crate::core::event; use crate::core::layout::{self, Layout}; diff --git a/widget/src/canvas/program.rs b/widget/src/canvas/program.rs index 43446b64..9644f676 100644 --- a/widget/src/canvas/program.rs +++ b/widget/src/canvas/program.rs @@ -1,8 +1,8 @@ +use crate::Action; use crate::canvas::mouse; use crate::canvas::{Event, Geometry}; use crate::core::Rectangle; use crate::graphics::geometry; -use crate::Action; /// The state and logic of a [`Canvas`]. /// diff --git a/widget/src/container.rs b/widget/src/container.rs index 86c1c7a8..da5b436f 100644 --- a/widget/src/container.rs +++ b/widget/src/container.rs @@ -30,9 +30,9 @@ use crate::core::theme; use crate::core::widget::tree::{self, Tree}; use crate::core::widget::{self, Operation}; use crate::core::{ - self, color, Background, Clipboard, Color, Element, Event, Layout, Length, + self, Background, Clipboard, Color, Element, Event, Layout, Length, Padding, Pixels, Point, Rectangle, Shadow, Shell, Size, Theme, Vector, - Widget, + Widget, color, }; use crate::runtime::task::{self, Task}; diff --git a/widget/src/helpers.rs b/widget/src/helpers.rs index 42d0f499..118a2414 100644 --- a/widget/src/helpers.rs +++ b/widget/src/helpers.rs @@ -14,8 +14,8 @@ use crate::pick_list::{self, PickList}; use crate::progress_bar::{self, ProgressBar}; use crate::radio::{self, Radio}; use crate::rule::{self, Rule}; -use crate::runtime::task::{self, Task}; use crate::runtime::Action; +use crate::runtime::task::{self, Task}; use crate::scrollable::{self, Scrollable}; use crate::slider::{self, Slider}; use crate::text::{self, Text}; diff --git a/widget/src/keyed/column.rs b/widget/src/keyed/column.rs index 313b728a..3064a8c4 100644 --- a/widget/src/keyed/column.rs +++ b/widget/src/keyed/column.rs @@ -3,8 +3,8 @@ use crate::core::layout; use crate::core::mouse; use crate::core::overlay; use crate::core::renderer; -use crate::core::widget::tree::{self, Tree}; use crate::core::widget::Operation; +use crate::core::widget::tree::{self, Tree}; use crate::core::{ Alignment, Clipboard, Element, Event, Layout, Length, Padding, Pixels, Rectangle, Shell, Size, Vector, Widget, diff --git a/widget/src/lazy.rs b/widget/src/lazy.rs index 6df026de..8b7b38ce 100644 --- a/widget/src/lazy.rs +++ b/widget/src/lazy.rs @@ -10,13 +10,13 @@ pub use responsive::Responsive; mod cache; +use crate::core::Element; use crate::core::layout::{self, Layout}; use crate::core::mouse; use crate::core::overlay; use crate::core::renderer; use crate::core::widget::tree::{self, Tree}; use crate::core::widget::{self, Widget}; -use crate::core::Element; use crate::core::{ self, Clipboard, Event, Length, Point, Rectangle, Shell, Size, Vector, }; diff --git a/widget/src/lazy/cache.rs b/widget/src/lazy/cache.rs index b341c234..367eefda 100644 --- a/widget/src/lazy/cache.rs +++ b/widget/src/lazy/cache.rs @@ -1,6 +1,6 @@ #![allow(dead_code)] -use crate::core::overlay; use crate::core::Element; +use crate::core::overlay; use ouroboros::self_referencing; diff --git a/widget/src/markdown.rs b/widget/src/markdown.rs index ad4b81fe..d4de2a8c 100644 --- a/widget/src/markdown.rs +++ b/widget/src/markdown.rs @@ -48,7 +48,7 @@ use crate::core::font::{self, Font}; use crate::core::padding; use crate::core::theme; use crate::core::{ - self, color, Color, Element, Length, Padding, Pixels, Theme, + self, Color, Element, Length, Padding, Pixels, Theme, color, }; use crate::{column, container, rich_text, row, scrollable, span, text}; diff --git a/widget/src/mouse_area.rs b/widget/src/mouse_area.rs index c1c3ba0f..10976c76 100644 --- a/widget/src/mouse_area.rs +++ b/widget/src/mouse_area.rs @@ -4,7 +4,7 @@ use crate::core::mouse; use crate::core::overlay; use crate::core::renderer; use crate::core::touch; -use crate::core::widget::{tree, Operation, Tree}; +use crate::core::widget::{Operation, Tree, tree}; use crate::core::{ Clipboard, Element, Event, Layout, Length, Point, Rectangle, Shell, Size, Vector, Widget, diff --git a/widget/src/qr_code.rs b/widget/src/qr_code.rs index 458f3588..07bb0c50 100644 --- a/widget/src/qr_code.rs +++ b/widget/src/qr_code.rs @@ -20,6 +20,7 @@ //! qr_code(&state.data).into() //! } //! ``` +use crate::Renderer; use crate::canvas; use crate::core::layout; use crate::core::mouse; @@ -29,7 +30,6 @@ use crate::core::{ Color, Element, Layout, Length, Pixels, Point, Rectangle, Size, Theme, Vector, Widget, }; -use crate::Renderer; use std::cell::RefCell; use thiserror::Error; diff --git a/widget/src/scrollable.rs b/widget/src/scrollable.rs index 0cf75c04..0c876036 100644 --- a/widget/src/scrollable.rs +++ b/widget/src/scrollable.rs @@ -37,8 +37,8 @@ use crate::core::{ Length, Padding, Pixels, Point, Rectangle, Shell, Size, Theme, Vector, Widget, }; -use crate::runtime::task::{self, Task}; use crate::runtime::Action; +use crate::runtime::task::{self, Task}; pub use operation::scrollable::{AbsoluteOffset, RelativeOffset}; diff --git a/widget/src/shader.rs b/widget/src/shader.rs index 06254a1c..6d532e59 100644 --- a/widget/src/shader.rs +++ b/widget/src/shader.rs @@ -14,8 +14,8 @@ use crate::renderer::wgpu::primitive; use std::marker::PhantomData; -pub use crate::graphics::Viewport; pub use crate::Action; +pub use crate::graphics::Viewport; pub use primitive::{Primitive, Storage}; /// A widget which can render custom shaders with Iced's `wgpu` backend. diff --git a/widget/src/shader/program.rs b/widget/src/shader/program.rs index 81ecc9b1..bbea937c 100644 --- a/widget/src/shader/program.rs +++ b/widget/src/shader/program.rs @@ -1,5 +1,5 @@ -use crate::core::mouse; use crate::core::Rectangle; +use crate::core::mouse; use crate::renderer::wgpu::Primitive; use crate::shader::{self, Action}; diff --git a/widget/src/text_input.rs b/widget/src/text_input.rs index ae3dfe4c..697d0d64 100644 --- a/widget/src/text_input.rs +++ b/widget/src/text_input.rs @@ -60,8 +60,8 @@ use crate::core::{ Background, Border, Color, Element, Event, InputMethod, Layout, Length, Padding, Pixels, Point, Rectangle, Shell, Size, Theme, Vector, Widget, }; -use crate::runtime::task::{self, Task}; use crate::runtime::Action; +use crate::runtime::task::{self, Task}; /// A field that can be filled with text. /// diff --git a/widget/src/themer.rs b/widget/src/themer.rs index 4e583882..cf0845be 100644 --- a/widget/src/themer.rs +++ b/widget/src/themer.rs @@ -3,8 +3,8 @@ use crate::core::layout; use crate::core::mouse; use crate::core::overlay; use crate::core::renderer; -use crate::core::widget::tree::{self, Tree}; use crate::core::widget::Operation; +use crate::core::widget::tree::{self, Tree}; use crate::core::{ Background, Clipboard, Color, Element, Event, Layout, Length, Point, Rectangle, Shell, Size, Vector, Widget, diff --git a/widget/src/tooltip.rs b/widget/src/tooltip.rs index 5bebeeac..2d674bca 100644 --- a/widget/src/tooltip.rs +++ b/widget/src/tooltip.rs @@ -470,8 +470,10 @@ where layout::Node::with_children( tooltip_bounds.size(), - vec![tooltip_layout - .translate(Vector::new(self.padding, self.padding))], + vec![ + tooltip_layout + .translate(Vector::new(self.padding, self.padding)), + ], ) .translate(Vector::new(tooltip_bounds.x, tooltip_bounds.y)) } |