mirror of
https://github.com/swaywm/sway.git
synced 2025-11-06 13:29:50 -05:00
Fix titles when container titles contain UTF-8 characters
The title and marks textures would have their height set from the config's computed max font height, but the textures were not regenerated when the config's max font height changed which made a gap appear. Rather than making it regenerate the title textures every time the config font height was changed, I've changed it to just make the textures the height of the title itself and fill any gap when rendering. Also, the title_width and marks_width variables have been renamed to make it more obvious that they are in output-buffer-local coordinates. Fixes #1936.
This commit is contained in:
parent
fc4ed6f037
commit
0046eed969
3 changed files with 34 additions and 10 deletions
|
|
@ -783,7 +783,7 @@ static void update_title_texture(struct sway_container *con,
|
|||
|
||||
double scale = output->sway_output->wlr_output->scale;
|
||||
int width = 0;
|
||||
int height = config->font_height * scale;
|
||||
int height = con->title_height * scale;
|
||||
|
||||
cairo_t *c = cairo_create(NULL);
|
||||
get_text_size(c, config->font, &width, NULL, scale, config->pango_markup,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue