feat!: implement Application API
This commit is contained in:
parent
e24465ba37
commit
a223b60a0c
26 changed files with 1420 additions and 138 deletions
20
src/icon_theme.rs
Normal file
20
src/icon_theme.rs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
// Copyright 2023 System76 <info@system76.com>
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use std::cell::RefCell;
|
||||
|
||||
thread_local! {
|
||||
/// The fallback icon theme to search if no icon theme was specified.
|
||||
pub(crate) static DEFAULT: RefCell<String> = RefCell::new(String::from("Pop"));
|
||||
}
|
||||
|
||||
/// The fallback icon theme to search if no icon theme was specified.
|
||||
#[must_use]
|
||||
pub fn default() -> String {
|
||||
DEFAULT.with(|f| f.borrow().clone())
|
||||
}
|
||||
|
||||
/// Set the fallback icon theme to search when loading system icons.
|
||||
pub fn set_default(name: impl Into<String>) {
|
||||
DEFAULT.with(|f| *f.borrow_mut() = name.into());
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue