fix: Use globals instead of thread-locals
Better support for multi-threaded applications, especially cosmic-comp rendering in parallel on multiple threads, each potentially accessing global configurations such as the active theme, icon_theme and more...
This commit is contained in:
parent
f655710d55
commit
b40839638a
16 changed files with 183 additions and 216 deletions
|
|
@ -44,7 +44,7 @@ pub struct Appearance {
|
|||
impl Appearance {
|
||||
// TODO: `Radius` is not `const fn` compatible.
|
||||
pub fn new() -> Self {
|
||||
let rad_0 = THEME.with(|t| t.borrow().cosmic().corner_radii.radius_0);
|
||||
let rad_0 = THEME.lock().unwrap().cosmic().corner_radii.radius_0;
|
||||
Self {
|
||||
shadow_offset: Vector::new(0.0, 0.0),
|
||||
background: None,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue