mirror of
https://github.com/wez/wezterm.git
synced 2024-11-28 01:06:37 +03:00
fix clipping issue in fancy tab bar
We budget size based on the x_advance, which can be 1 pixel less than the width of the glyph texture, so we could often end up omitting the last character in "Launcher" or "default" in the tab title or right status area. This commit uses x_advance in both places.
This commit is contained in:
parent
e8900d47cd
commit
d169088694
@ -812,7 +812,9 @@ impl super::TermWindow {
|
||||
|
||||
let width = texture.coords.size.width as f32 * glyph.scale as f32;
|
||||
let height = texture.coords.size.height as f32 * glyph.scale as f32;
|
||||
if pos_x + width > element.content_rect.max_x() {
|
||||
if pos_x + glyph.x_advance.get() as f32
|
||||
> element.content_rect.max_x()
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user