mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 07:46:12 +03:00
renderer: reload background, foreground, cursor-color at runtime
Fixes #1212
This commit is contained in:
@ -1305,6 +1305,11 @@ pub fn changeConfig(self: *Metal, config: *DerivedConfig) !void {
|
||||
// Set our new minimum contrast
|
||||
self.uniforms.min_contrast = config.min_contrast;
|
||||
|
||||
// Set our new colors
|
||||
self.background_color = config.background;
|
||||
self.foreground_color = config.foreground;
|
||||
self.cursor_color = config.cursor_color;
|
||||
|
||||
self.config.deinit();
|
||||
self.config = config.*;
|
||||
}
|
||||
|
@ -1658,6 +1658,11 @@ pub fn changeConfig(self: *OpenGL, config: *DerivedConfig) !void {
|
||||
self.font_shaper = font_shaper;
|
||||
}
|
||||
|
||||
// Set our new colors
|
||||
self.background_color = config.background;
|
||||
self.foreground_color = config.foreground;
|
||||
self.cursor_color = config.cursor_color;
|
||||
|
||||
// Update our uniforms
|
||||
self.deferred_config = .{};
|
||||
|
||||
|
Reference in New Issue
Block a user