mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
sextants: always properly scale the middle
what's going on here is we're saying if there's a single extra row in the cell to be distributed, put it on the center, and if there are two, put them on the top and bottom (we get the bottom without specification because we use the cell geometry directly there). in the mod 2 case, we still want to draw the middle one line past its natural position, to account for the extra line from above. otherwise your bottom third is one larger than your top, and two larger than your middle, which no one wants.
This commit is contained in:
@ -2495,7 +2495,7 @@ fn yThirds(self: Box) [2]u32 {
|
||||
return switch (@mod(self.metrics.cell_height, 3)) {
|
||||
0 => .{ self.metrics.cell_height / 3, 2 * self.metrics.cell_height / 3 },
|
||||
1 => .{ self.metrics.cell_height / 3, 2 * self.metrics.cell_height / 3 + 1 },
|
||||
2 => .{ self.metrics.cell_height / 3 + 1, 2 * self.metrics.cell_height / 3 },
|
||||
2 => .{ self.metrics.cell_height / 3 + 1, 2 * self.metrics.cell_height / 3 + 1 },
|
||||
else => unreachable,
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user