render/shadow: Adjust alpha by light/dark mode

This commit is contained in:
Victoria Brekenfeld 2025-12-16 19:16:32 +01:00 committed by Victoria Brekenfeld
parent 1e0c4f9b05
commit d1fb9087b2
3 changed files with 8 additions and 5 deletions

View file

@ -711,6 +711,7 @@ impl CosmicStack {
radii,
if activated { alpha } else { alpha * 0.75 },
output_scale.x,
theme.cosmic().is_dark,
))
.into(),
)

View file

@ -372,6 +372,7 @@ impl CosmicWindow {
let is_tiled = p.is_tiled();
let activated = p.window.is_activated(false);
let appearance = p.appearance_conf.lock().unwrap();
let theme = p.theme.lock().unwrap();
if p.window.is_maximized(false) {
return None;
@ -388,10 +389,7 @@ impl CosmicWindow {
if !should_draw_shadow {
return None;
}
let mut radii = p
.theme
.lock()
.unwrap()
let mut radii = theme
.cosmic()
.radius_s()
.map(|x| if x < 4.0 { x } else { x + 4.0 })
@ -425,6 +423,7 @@ impl CosmicWindow {
radii,
if activated { alpha } else { alpha * 0.75 },
output_scale.x,
theme.cosmic().is_dark,
))
.into(),
)