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

@ -8,7 +8,8 @@ use cosmic::app::{Core, Settings, Task};
use cosmic::executor;
use cosmic::iced::{alignment, Length, Size};
use cosmic::prelude::*;
use cosmic::widget::{self, about::About, nav_bar};
use cosmic::widget::about::About;
use cosmic::widget::{self, nav_bar};
/// Runs application with these settings
#[rustfmt::skip]

View file

@ -4,7 +4,8 @@ use cosmic::iced::core::window;
use cosmic::iced::window::Id;
use cosmic::iced::{Length, Rectangle};
use cosmic::surface::action::{app_popup, destroy_popup};
use cosmic::widget::{dropdown::popup_dropdown, list_column, settings, toggler};
use cosmic::widget::dropdown::popup_dropdown;
use cosmic::widget::{list_column, settings, toggler};
use cosmic::Element;
const ID: &str = "com.system76.CosmicAppletExample";

View file

@ -5,9 +5,10 @@
use cosmic::app::Settings;
use cosmic::iced::{Alignment, Length, Size};
use cosmic::prelude::*;
use cosmic::widget::menu::{self, KeyBind};
use cosmic::widget::nav_bar;
use cosmic::{executor, iced, prelude::*, widget, Core};
use cosmic::{executor, iced, widget, Core};
use std::collections::HashMap;
use std::sync::LazyLock;

View file

@ -23,15 +23,11 @@ use cosmic::{
Element,
};
use cosmic_time::{Instant, Timeline};
use std::{
cell::RefCell,
rc::Rc,
sync::{
atomic::{AtomicU32, Ordering},
Arc,
},
vec,
};
use std::cell::RefCell;
use std::rc::Rc;
use std::sync::atomic::{AtomicU32, Ordering};
use std::sync::Arc;
use std::vec;
// XXX The use of button is removed because it assigns the same ID to multiple buttons, causing a crash when a11y is enabled...
// static BTN: Lazy<id::Id> = Lazy::new(|| id::Id::new("BTN"));

View file

@ -1,9 +1,7 @@
use super::{Page, Window};
use cosmic::{
iced::widget::{column, text},
widget::{list_column, settings, toggler},
Element,
};
use cosmic::iced::widget::{column, text};
use cosmic::widget::{list_column, settings, toggler};
use cosmic::Element;
#[derive(Clone, Copy, Debug)]
pub enum Message {

View file

@ -1,19 +1,17 @@
use std::{cell::RefCell, rc::Rc};
use std::cell::RefCell;
use std::rc::Rc;
use apply::Apply;
use cosmic::{
cosmic_theme,
iced::widget::{checkbox, column, progress_bar, radio, slider, text},
iced::{Alignment, Length},
iced_core::id,
theme::ThemeType,
widget::{
button, color_picker::ColorPickerUpdate, dropdown, icon, layer_container as container,
segmented_button, segmented_control, settings, spin_button, tab_bar, toggler,
ColorPickerModel,
},
Element,
use cosmic::iced::widget::{checkbox, column, progress_bar, radio, slider, text};
use cosmic::iced::{Alignment, Length};
use cosmic::iced_core::id;
use cosmic::theme::ThemeType;
use cosmic::widget::color_picker::ColorPickerUpdate;
use cosmic::widget::{
button, dropdown, icon, layer_container as container, segmented_button, segmented_control,
settings, spin_button, tab_bar, toggler, ColorPickerModel,
};
use cosmic::{cosmic_theme, Element};
use cosmic_time::{anim, chain, Timeline};
use fraction::{Decimal, ToPrimitive};
use once_cell::sync::Lazy;

View file

@ -1,10 +1,7 @@
use cosmic::{
iced::widget::{column, container, horizontal_space, image, row, svg, text},
iced::Length,
theme,
widget::{list_column, settings, toggler},
Element,
};
use cosmic::iced::widget::{column, container, horizontal_space, image, row, svg, text};
use cosmic::iced::Length;
use cosmic::widget::{list_column, settings, toggler};
use cosmic::{theme, Element};
use super::{Page, SubPage, Window};

View file

@ -1,9 +1,7 @@
use cosmic::{
iced::widget::{horizontal_space, row, text},
iced::Length,
widget::{icon, list_column, settings},
Element,
};
use cosmic::iced::widget::{horizontal_space, row, text};
use cosmic::iced::Length;
use cosmic::widget::{icon, list_column, settings};
use cosmic::Element;
use super::{Message, Page, SubPage, Window};

View file

@ -9,11 +9,9 @@ use std::{env, process};
use cosmic::app::{Core, Settings, Task};
use cosmic::iced::alignment::{Horizontal, Vertical};
use cosmic::iced::keyboard::Key;
use cosmic::iced::window;
use cosmic::iced::{Length, Size};
use cosmic::iced::{window, Length, Size};
use cosmic::widget::menu::action::MenuAction;
use cosmic::widget::menu::key_bind::KeyBind;
use cosmic::widget::menu::key_bind::Modifier;
use cosmic::widget::menu::key_bind::{KeyBind, Modifier};
use cosmic::widget::menu::{self, ItemHeight, ItemWidth};
use cosmic::widget::RcElementWrapper;
use cosmic::{executor, Element};

View file

@ -1,13 +1,11 @@
use std::collections::HashMap;
use cosmic::{
app::Core,
iced::core::{id, Alignment, Length, Point},
iced::widget::{column, container, scrollable, text},
iced::{self, event, window, Subscription},
prelude::*,
widget::{button, header_bar},
};
use cosmic::app::Core;
use cosmic::iced::core::{id, Alignment, Length, Point};
use cosmic::iced::widget::{column, container, scrollable, text};
use cosmic::iced::{self, event, window, Subscription};
use cosmic::prelude::*;
use cosmic::widget::{button, header_bar};
#[derive(Debug, Clone, PartialEq)]
pub enum Message {

View file

@ -1,15 +1,8 @@
use cosmic::iced::Length;
use cosmic::app::{Core, Task};
use cosmic::iced::alignment::{Horizontal, Vertical};
use cosmic::iced::{self, Alignment, Length, Size};
use cosmic::widget::{column, container, spin_button};
use cosmic::Apply;
use cosmic::{
app::{Core, Task},
iced::{
self,
alignment::{Horizontal, Vertical},
Alignment, Size,
},
Application, Element,
};
use cosmic::{Application, Apply, Element};
use fraction::Decimal;
pub struct SpinButtonExamplApp {

View file

@ -5,7 +5,8 @@
use cosmic::app::{Core, Settings, Task};
use cosmic::iced::Subscription;
use cosmic::{executor, prelude::*, widget};
use cosmic::prelude::*;
use cosmic::{executor, widget};
/// Runs application with these settings
fn main() -> Result<(), Box<dyn std::error::Error>> {

View file

@ -9,8 +9,7 @@ use chrono::Datelike;
use cosmic::app::{Core, Settings, Task};
use cosmic::iced::Size;
use cosmic::prelude::*;
use cosmic::widget::table;
use cosmic::widget::{self, nav_bar};
use cosmic::widget::{self, nav_bar, table};
use cosmic::{executor, iced};
#[derive(Debug, Default, PartialEq, Eq, Clone, Copy, Hash)]