remove old cell bg handling

This commit is contained in:
Rohit-Bevinahally
2025-02-24 00:46:21 +05:30
committed by rohitb
parent 05a30e6fda
commit 8b6a733e46
2 changed files with 2 additions and 12 deletions

View File

@ -2958,7 +2958,7 @@ fn rebuildCells(
const bg_alpha: u8 = bg_alpha: {
const default: u8 = 255;
if (self.current_background_image == null and self.config.background_opacity >= 1) break :bg_alpha default;
if (self.config.background_opacity >= 1) break :bg_alpha default;
// Cells that are selected should be fully opaque.
if (selected) break :bg_alpha default;
@ -2971,11 +2971,6 @@ fn rebuildCells(
break :bg_alpha default;
}
// If we have a background image, use the configured background image opacity.
if (self.current_background_image != null) {
break :bg_alpha @intFromFloat(@round((1 - self.config.background_image_opacity) * 255.0));
}
// Otherwise, we use the configured background opacity.
break :bg_alpha @intFromFloat(@round(self.config.background_opacity * 255.0));
};

View File

@ -239,14 +239,9 @@ vertex CellBgVertexOut cell_bg_vertex(
position.zw = 1.0;
out.position = position;
uchar4 bg_color = uniforms.bg_color;
if (uniforms.has_bg_image) {
bg_color.a = uchar((1.0f - uniforms.bg_image_opacity) * 255);
}
// Convert the background color to Display P3
out.bg_color = load_color(
bg_color,
uniforms.bg_color,
uniforms.use_display_p3,
uniforms.use_linear_blending
);