mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 15:56:13 +03:00
config: clarify padding color default
This commit is contained in:
@ -712,10 +712,9 @@ keybind: Keybinds = .{},
|
|||||||
/// * The nearest row is a prompt row (requires shell integration). The
|
/// * The nearest row is a prompt row (requires shell integration). The
|
||||||
/// thinking here is that prompts often contain powerline glyphs that
|
/// thinking here is that prompts often contain powerline glyphs that
|
||||||
/// do not look good extended.
|
/// do not look good extended.
|
||||||
|
/// * The nearest row contains a perfect fit powerline character. These
|
||||||
|
/// don't look good extended.
|
||||||
///
|
///
|
||||||
/// The default value is "extend". This allows for smooth resizing of a
|
|
||||||
/// terminal grid without having visible empty areas around the edge. The edge
|
|
||||||
/// cells may appear slightly larger due to the extension.
|
|
||||||
@"window-padding-color": WindowPaddingColor = .background,
|
@"window-padding-color": WindowPaddingColor = .background,
|
||||||
|
|
||||||
/// Synchronize rendering with the screen refresh rate. If true, this will
|
/// Synchronize rendering with the screen refresh rate. If true, this will
|
||||||
|
@ -1955,13 +1955,19 @@ pub fn setScreenSize(
|
|||||||
}).add(padding);
|
}).add(padding);
|
||||||
|
|
||||||
var padding_extend = self.uniforms.padding_extend;
|
var padding_extend = self.uniforms.padding_extend;
|
||||||
if (self.config.padding_color == .extend) {
|
switch (self.config.padding_color) {
|
||||||
// If padding extension is enabled, we extend left and right always.
|
.extend => {
|
||||||
padding_extend.left = true;
|
// If padding extension is enabled, we extend left and right always
|
||||||
padding_extend.right = true;
|
// because there is no downside to this. Up/down is dependent
|
||||||
} else {
|
// on some heuristics (see rebuildCells).
|
||||||
// Otherwise, disable all padding extension.
|
padding_extend.left = true;
|
||||||
padding_extend = .{};
|
padding_extend.right = true;
|
||||||
|
},
|
||||||
|
|
||||||
|
else => {
|
||||||
|
// Otherwise, disable all padding extension.
|
||||||
|
padding_extend = .{};
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the size of the drawable surface to the bounds
|
// Set the size of the drawable surface to the bounds
|
||||||
@ -2138,9 +2144,12 @@ fn rebuildCells(
|
|||||||
self.cells.reset();
|
self.cells.reset();
|
||||||
|
|
||||||
// We also reset our padding extension depending on the screen type
|
// We also reset our padding extension depending on the screen type
|
||||||
if (self.config.padding_color == .extend) {
|
switch (self.config.padding_color) {
|
||||||
self.uniforms.padding_extend.up = screen_type == .alternate;
|
.background => {},
|
||||||
self.uniforms.padding_extend.down = screen_type == .alternate;
|
.extend => {
|
||||||
|
self.uniforms.padding_extend.up = screen_type == .alternate;
|
||||||
|
self.uniforms.padding_extend.down = screen_type == .alternate;
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user