mirror of
https://github.com/wez/wezterm.git
synced 2024-12-24 22:01:47 +03:00
fixup pty pixel size calculation
Derive the pixels from the rows/cols rather than the available space. refs: https://github.com/wez/wezterm/issues/535
This commit is contained in:
parent
868a085157
commit
3d642461f8
@ -113,8 +113,12 @@ impl super::TermWindow {
|
|||||||
let size = PtySize {
|
let size = PtySize {
|
||||||
rows: rows as u16,
|
rows: rows as u16,
|
||||||
cols: cols as u16,
|
cols: cols as u16,
|
||||||
pixel_height: avail_height as u16,
|
// Take care to use the exact pixel dimensions of the cells, rather
|
||||||
pixel_width: avail_width as u16,
|
// than the available space, so that apps that are sensitive to
|
||||||
|
// the pixels-per-cell have consistent values at a given font size.
|
||||||
|
// https://github.com/wez/wezterm/issues/535
|
||||||
|
pixel_height: rows as u16 * self.render_metrics.cell_size.height as u16,
|
||||||
|
pixel_width: cols as u16 * self.render_metrics.cell_size.width as u16,
|
||||||
};
|
};
|
||||||
|
|
||||||
(size, *dimensions)
|
(size, *dimensions)
|
||||||
|
Loading…
Reference in New Issue
Block a user