mirror of
https://github.com/wez/wezterm.git
synced 2024-12-11 15:14:16 +03:00
tab bar: force x and + buttons to be square
Use the font height as the basis for the size, rather than the width, to avoid the buttons being too condensed. Explicitly use the pixel height for the dimensions so that the buttons are square. refs: https://github.com/wez/wezterm/issues/2399
This commit is contained in:
parent
b181935303
commit
3917fc2184
@ -553,8 +553,8 @@ impl super::TermWindow {
|
|||||||
line_width: metrics.underline_height.max(2),
|
line_width: metrics.underline_height.max(2),
|
||||||
poly: SizedPoly {
|
poly: SizedPoly {
|
||||||
poly: PLUS_BUTTON,
|
poly: PLUS_BUTTON,
|
||||||
width: Dimension::Pixels(metrics.cell_size.width as f32 * 0.75),
|
width: Dimension::Pixels(metrics.cell_size.height as f32 / 2.),
|
||||||
height: Dimension::Pixels(metrics.cell_size.width as f32 * 0.75),
|
height: Dimension::Pixels(metrics.cell_size.height as f32 / 2.),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
@ -733,8 +733,12 @@ impl super::TermWindow {
|
|||||||
line_width: metrics.underline_height.max(2),
|
line_width: metrics.underline_height.max(2),
|
||||||
poly: SizedPoly {
|
poly: SizedPoly {
|
||||||
poly: X_BUTTON,
|
poly: X_BUTTON,
|
||||||
width: Dimension::Cells(0.5),
|
width: Dimension::Pixels(
|
||||||
height: Dimension::Cells(0.5),
|
metrics.cell_size.height as f32 / 2.,
|
||||||
|
),
|
||||||
|
height: Dimension::Pixels(
|
||||||
|
metrics.cell_size.height as f32 / 2.,
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user