chore: fixing linter warnings

This commit is contained in:
danieleades 2023-11-28 19:02:08 +00:00 committed by GitHub
parent ebcfa5f2d0
commit 8e99406a8b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 79 additions and 75 deletions

View file

@ -92,11 +92,11 @@ pub trait ColorExt {
impl ColorExt for iced::Color {
fn blend_alpha(self, background: Self, alpha: f32) -> Self {
Color {
Self {
a: 1.0,
r: background.r + (self.r - background.r) * alpha,
g: background.g + (self.g - background.g) * alpha,
b: background.b + (self.b - background.b) * alpha,
r: (self.r - background.r).mul_add(alpha, background.r),
g: (self.g - background.g).mul_add(alpha, background.g),
b: (self.b - background.b).mul_add(alpha, background.b),
}
}
}