mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 15:56:13 +03:00
font/Metrics: remove original_cell_width, no longer needed
This commit is contained in:
@ -35,10 +35,6 @@ cursor_thickness: u32 = 1,
|
|||||||
/// The height in pixels of the cursor sprite.
|
/// The height in pixels of the cursor sprite.
|
||||||
cursor_height: u32,
|
cursor_height: u32,
|
||||||
|
|
||||||
/// Original cell width in pixels. This is used to keep
|
|
||||||
/// glyphs centered if the cell width is adjusted wider.
|
|
||||||
original_cell_width: ?u32 = null,
|
|
||||||
|
|
||||||
/// Minimum acceptable values for some fields to prevent modifiers
|
/// Minimum acceptable values for some fields to prevent modifiers
|
||||||
/// from being able to, for example, cause 0-thickness underlines.
|
/// from being able to, for example, cause 0-thickness underlines.
|
||||||
const Minimums = struct {
|
const Minimums = struct {
|
||||||
@ -214,11 +210,6 @@ pub fn apply(self: *Metrics, mods: ModifierSet) void {
|
|||||||
const new = @max(entry.value_ptr.apply(original), 1);
|
const new = @max(entry.value_ptr.apply(original), 1);
|
||||||
if (new == original) continue;
|
if (new == original) continue;
|
||||||
|
|
||||||
// Preserve the original cell width if not set.
|
|
||||||
if (self.original_cell_width == null) {
|
|
||||||
self.original_cell_width = self.cell_width;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set the new value
|
// Set the new value
|
||||||
@field(self, @tagName(tag)) = new;
|
@field(self, @tagName(tag)) = new;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user