theme: add support for alpha modes
This commit is contained in:
parent
c6db02a43d
commit
37674a229c
5 changed files with 93 additions and 34 deletions
|
|
@ -1,6 +1,6 @@
|
|||
use {
|
||||
crate::{
|
||||
gfx_api::{AcquireSync, GfxApiOpt, ReleaseSync, SampleRect},
|
||||
gfx_api::{AcquireSync, AlphaMode, GfxApiOpt, ReleaseSync, SampleRect},
|
||||
icons::{IconState, SizedIcons},
|
||||
ifs::wl_surface::{
|
||||
SurfaceBuffer, WlSurface,
|
||||
|
|
@ -493,8 +493,13 @@ impl Renderer<'_> {
|
|||
Some(bounds) => rect.intersect(*bounds),
|
||||
};
|
||||
if !rect.is_empty() {
|
||||
let color = Color::from_u32_premultiplied(
|
||||
cd.eotf, color[0], color[1], color[2], color[3],
|
||||
let color = Color::from_u32(
|
||||
cd.eotf,
|
||||
AlphaMode::PremultipliedElectrical,
|
||||
color[0],
|
||||
color[1],
|
||||
color[2],
|
||||
color[3],
|
||||
);
|
||||
self.base.sync();
|
||||
self.base
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue