render/shadow: Adjust alpha by light/dark mode
This commit is contained in:
parent
1e0c4f9b05
commit
d1fb9087b2
3 changed files with 8 additions and 5 deletions
|
|
@ -711,6 +711,7 @@ impl CosmicStack {
|
|||
radii,
|
||||
if activated { alpha } else { alpha * 0.75 },
|
||||
output_scale.x,
|
||||
theme.cosmic().is_dark,
|
||||
))
|
||||
.into(),
|
||||
)
|
||||
|
|
|
|||
|
|
@ -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(),
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue