mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 15:56:13 +03:00

committed by
Mitchell Hashimoto

parent
b50e087581
commit
2993d12de7
@ -1186,9 +1186,9 @@ pub fn drawFrame(self: *Metal, surface: *apprt.Surface) !void {
|
|||||||
attachment.setProperty("storeAction", @intFromEnum(mtl.MTLStoreAction.store));
|
attachment.setProperty("storeAction", @intFromEnum(mtl.MTLStoreAction.store));
|
||||||
attachment.setProperty("texture", screen_texture.value);
|
attachment.setProperty("texture", screen_texture.value);
|
||||||
attachment.setProperty("clearColor", mtl.MTLClearColor{
|
attachment.setProperty("clearColor", mtl.MTLClearColor{
|
||||||
.red = @as(f32, @floatFromInt(self.current_background_color.r)) / 255,
|
.red = @as(f32, @floatFromInt(self.current_background_color.r)) / 255 * self.config.background_opacity,
|
||||||
.green = @as(f32, @floatFromInt(self.current_background_color.g)) / 255,
|
.green = @as(f32, @floatFromInt(self.current_background_color.g)) / 255 * self.config.background_opacity,
|
||||||
.blue = @as(f32, @floatFromInt(self.current_background_color.b)) / 255,
|
.blue = @as(f32, @floatFromInt(self.current_background_color.b)) / 255 * self.config.background_opacity,
|
||||||
.alpha = self.config.background_opacity,
|
.alpha = self.config.background_opacity,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -2344,9 +2344,9 @@ fn drawCellProgram(
|
|||||||
|
|
||||||
// Clear the surface
|
// Clear the surface
|
||||||
gl.clearColor(
|
gl.clearColor(
|
||||||
@as(f32, @floatFromInt(self.draw_background.r)) / 255,
|
@as(f32, @floatFromInt(self.draw_background.r)) / 255 * self.config.background_opacity,
|
||||||
@as(f32, @floatFromInt(self.draw_background.g)) / 255,
|
@as(f32, @floatFromInt(self.draw_background.g)) / 255 * self.config.background_opacity,
|
||||||
@as(f32, @floatFromInt(self.draw_background.b)) / 255,
|
@as(f32, @floatFromInt(self.draw_background.b)) / 255 * self.config.background_opacity,
|
||||||
@floatCast(self.config.background_opacity),
|
@floatCast(self.config.background_opacity),
|
||||||
);
|
);
|
||||||
gl.clear(gl.c.GL_COLOR_BUFFER_BIT);
|
gl.clear(gl.c.GL_COLOR_BUFFER_BIT);
|
||||||
|
Reference in New Issue
Block a user