chore: use with_alpha() where applicable

This commit is contained in:
Vukašin Vojinović 2025-06-20 01:56:04 +02:00 committed by Ashley Wulber
parent 7748e59ae6
commit ec7a531539
6 changed files with 57 additions and 91 deletions

View file

@ -1,5 +1,5 @@
use crate::{composite::over, steps::steps, Component, Theme};
use palette::{rgb::Rgba, Darken, IntoColor, Lighten, Srgba};
use palette::{rgb::Rgba, Darken, IntoColor, Lighten, Srgba, WithAlpha};
use std::{
fs::{self, File},
io::{self, Write},
@ -75,8 +75,7 @@ impl Theme {
Rgba::new(0.0, 0.0, 0.0, 0.08)
});
let mut inverted_bg_divider = background.base;
inverted_bg_divider.alpha = 0.5;
let inverted_bg_divider = background.base.with_alpha(0.5);
let scrollbar_outline = to_rgba(inverted_bg_divider);
let mut css = format! {r#"/* GENERATED BY COSMIC */