chore: add rustfmt config

This commit is contained in:
Vukašin Vojinović 2026-04-30 16:07:25 +02:00 committed by Ashley Wulber
parent 9abc4d483b
commit 9c2a86a8f4
98 changed files with 419 additions and 540 deletions

View file

@ -3,9 +3,13 @@
use super::{Builder, ButtonClass};
use crate::Element;
use crate::widget::{icon::Handle, tooltip};
use crate::widget::icon::Handle;
use crate::widget::tooltip;
use apply::Apply;
use iced_core::{Alignment, Length, Padding, font::Weight, text::LineHeight, widget::Id};
use iced_core::font::Weight;
use iced_core::text::LineHeight;
use iced_core::widget::Id;
use iced_core::{Alignment, Length, Padding};
use std::borrow::Cow;
pub type Button<'a, Message> = Builder<'a, Message, Icon>;

View file

@ -2,11 +2,12 @@
// SPDX-License-Identifier: MPL-2.0
use super::Builder;
use crate::{
Element,
widget::{self, image::Handle},
};
use iced_core::{Length, Padding, font::Weight, widget::Id};
use crate::Element;
use crate::widget::image::Handle;
use crate::widget::{self};
use iced_core::font::Weight;
use iced_core::widget::Id;
use iced_core::{Length, Padding};
use std::borrow::Cow;
pub type Button<'a, Message> = Builder<'a, Message, Image<'a, Handle, Message>>;

View file

@ -3,14 +3,15 @@
//! Hyperlink button widget
use super::Builder;
use super::ButtonClass;
use super::{Builder, ButtonClass};
use crate::Element;
use crate::prelude::*;
use crate::widget::icon::{self, Handle};
use crate::widget::{button, row, tooltip};
use iced_core::font::Weight;
use iced_core::text::LineHeight;
use iced_core::{Alignment, Length, Padding, font::Weight, widget::Id};
use iced_core::widget::Id;
use iced_core::{Alignment, Length, Padding};
use std::borrow::Cow;
pub type Button<'a, Message> = Builder<'a, Message, Hyperlink>;

View file

@ -2,7 +2,8 @@
// SPDX-License-Identifier: MPL-2.0
//! Change the apperance of a button.
use iced_core::{Background, Color, Vector, border::Radius};
use iced_core::border::Radius;
use iced_core::{Background, Color, Vector};
use crate::theme::THEME;

View file

@ -4,7 +4,10 @@
use super::{Builder, ButtonClass};
use crate::widget::{icon, row, tooltip};
use crate::{Apply, Element};
use iced_core::{Alignment, Length, Padding, font::Weight, text::LineHeight, widget::Id};
use iced_core::font::Weight;
use iced_core::text::LineHeight;
use iced_core::widget::Id;
use iced_core::{Alignment, Length, Padding};
use std::borrow::Cow;
pub type Button<'a, Message> = Builder<'a, Message, Text>;

View file

@ -11,15 +11,12 @@ use iced_runtime::{Action, Task, keyboard, task};
use iced_core::event::{self, Event};
use iced_core::renderer::{self, Quad, Renderer};
use iced_core::touch;
use iced_core::widget::Operation;
use iced_core::widget::tree::{self, Tree};
use iced_core::{
Background, Clipboard, Color, Layout, Length, Padding, Point, Rectangle, Shell, Vector, Widget,
Background, Border, Clipboard, Color, Layout, Length, Padding, Point, Rectangle, Shadow, Shell,
Vector, Widget, layout, mouse, overlay, svg, touch,
};
use iced_core::{Border, mouse};
use iced_core::{Shadow, overlay};
use iced_core::{layout, svg};
use iced_renderer::core::widget::operation;
use crate::theme::THEME;
@ -647,10 +644,8 @@ impl<'a, Message: 'a + Clone> Widget<Message, crate::Theme, crate::Renderer>
state: &Tree,
p: mouse::Cursor,
) -> iced_accessibility::A11yTree {
use iced_accessibility::{
A11yNode, A11yTree,
accesskit::{Action, Node, NodeId, Rect, Role},
};
use iced_accessibility::accesskit::{Action, Node, NodeId, Rect, Role};
use iced_accessibility::{A11yNode, A11yTree};
// TODO why is state None sometimes?
if matches!(state.state, iced_core::widget::tree::State::None) {
tracing::info!("Button state is missing.");