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

@ -7,12 +7,8 @@
pub mod portal;
pub mod style;
use cosmic_config::CosmicConfigEntry;
use cosmic_config::config_subscription;
use cosmic_theme::Component;
use cosmic_theme::LayeredTheme;
use cosmic_theme::Spacing;
use cosmic_theme::ThemeMode;
use cosmic_config::{CosmicConfigEntry, config_subscription};
use cosmic_theme::{Component, LayeredTheme, Spacing, ThemeMode};
use iced_futures::Subscription;
use iced_runtime::{Appearance, DefaultStyle};
use std::sync::{Arc, LazyLock, Mutex};

View file

@ -6,10 +6,8 @@
use cosmic_theme::Component;
use iced_core::{Background, Color};
use crate::{
theme::TRANSPARENT_COMPONENT,
widget::button::{Catalog, Style},
};
use crate::theme::TRANSPARENT_COMPONENT;
use crate::widget::button::{Catalog, Style};
#[derive(Default)]
pub enum Button {

View file

@ -5,18 +5,17 @@
use crate::theme::{CosmicComponent, TRANSPARENT_COMPONENT, Theme};
use cosmic_theme::composite::over;
use iced::{
overlay::menu,
theme::Base,
widget::{
button as iced_button, checkbox as iced_checkbox, combo_box, container as iced_container,
pane_grid, pick_list, progress_bar, radio, rule, scrollable,
slider::{self, Rail},
svg, toggler,
},
use iced::overlay::menu;
use iced::theme::Base;
use iced::widget::slider::{self, Rail};
use iced::widget::{
button as iced_button, checkbox as iced_checkbox, combo_box, container as iced_container,
pane_grid, pick_list, progress_bar, radio, rule, scrollable, svg, toggler,
};
use iced_core::{Background, Border, Color, Shadow, Vector};
use iced_widget::{pane_grid::Highlight, scrollable::AutoScroll, text_editor, text_input};
use iced_widget::pane_grid::Highlight;
use iced_widget::scrollable::AutoScroll;
use iced_widget::{text_editor, text_input};
use palette::WithAlpha;
use std::rc::Rc;

View file

@ -3,10 +3,13 @@
//! Contains stylesheet implementation for [`crate::widget::segmented_button`].
use crate::widget::segmented_button::{Appearance, ItemAppearance, StyleSheet};
use crate::{theme::Theme, widget::segmented_button::ItemStatusAppearance};
use crate::theme::Theme;
use crate::widget::segmented_button::{
Appearance, ItemAppearance, ItemStatusAppearance, StyleSheet,
};
use iced::Border;
use iced_core::{Background, border::Radius};
use iced_core::Background;
use iced_core::border::Radius;
use palette::WithAlpha;
#[derive(Default)]
@ -143,7 +146,8 @@ mod horizontal {
use crate::widget::segmented_button::{ItemAppearance, ItemStatusAppearance};
use cosmic_theme::{Component, Container};
use iced::Border;
use iced_core::{Background, border::Radius};
use iced_core::Background;
use iced_core::border::Radius;
use palette::WithAlpha;
pub fn tab_bar(cosmic: &cosmic_theme::Theme, container: &Container) -> Appearance {
@ -250,7 +254,8 @@ mod vertical {
use crate::widget::segmented_button::{ItemAppearance, ItemStatusAppearance};
use cosmic_theme::{Component, Container};
use iced::Border;
use iced_core::{Background, border::Radius};
use iced_core::Background;
use iced_core::border::Radius;
use palette::WithAlpha;
pub fn tab_bar(cosmic: &cosmic_theme::Theme, container: &Container) -> Appearance {