mirror of
https://github.com/swaywm/sway.git
synced 2026-04-22 06:46:27 -04:00
Use fixed titlebar heights
Use fixed titlebar heights. The default height is calculated based on font metrics for the configured font and current locale. Some testing with titles with emoji and CJK characters (which are substantially higher in my setup) shows that the titlebars retain their initial value, text does shift up or down, and all titlebars always remain aligned. Also drop some also now-unecessary title_height calculations. Makes also needed to be updated, since they should be positioned with the same rules.
This commit is contained in:
parent
bb3fd0abc5
commit
62d90a8e95
11 changed files with 49 additions and 66 deletions
|
|
@ -559,8 +559,7 @@ static void render_titlebar(struct sway_output *output,
|
|||
|
||||
// The title texture might be shorter than the config->font_height,
|
||||
// in which case we need to pad it above and below.
|
||||
int ob_padding_above = round((config->font_baseline -
|
||||
con->title_baseline + titlebar_v_padding -
|
||||
int ob_padding_above = round((titlebar_v_padding -
|
||||
titlebar_border_thickness) * output_scale);
|
||||
int ob_padding_below = ob_bg_height - ob_padding_above -
|
||||
texture_box.height;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue