use crate::font; use std::cell::RefCell; thread_local! { /// The fallback icon theme to search if no icon theme was specified. pub(crate) static DEFAULT_ICON_THEME: RefCell = RefCell::new(String::from("Pop")); } /// The fallback icon theme to search if no icon theme was specified. #[must_use] pub fn default_icon_theme() -> String { DEFAULT_ICON_THEME.with(|f| f.borrow().clone()) } /// Set the fallback icon theme to search when loading system icons. pub fn set_default_icon_theme(name: impl Into) { DEFAULT_ICON_THEME.with(|f| *f.borrow_mut() = name.into()); } /// Default iced settings for COSMIC applications. #[must_use] pub fn settings() -> iced::Settings { settings_with_flags(Flags::default()) } /// Default iced settings for COSMIC applications. #[must_use] pub fn settings_with_flags(flags: Flags) -> iced::Settings { iced::Settings { default_font: font::FONT, default_text_size: 18.0, ..iced::Settings::with_flags(flags) } }