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:
Hugo Osvaldo Barrera 2021-08-18 23:27:01 +02:00 committed by Simon Ser
parent bb3fd0abc5
commit 62d90a8e95
11 changed files with 49 additions and 66 deletions

View file

@ -119,8 +119,6 @@ struct sway_container {
struct wlr_texture *title_focused_inactive;
struct wlr_texture *title_unfocused;
struct wlr_texture *title_urgent;
size_t title_height;
size_t title_baseline;
list_t *marks; // char *
struct wlr_texture *marks_focused;
@ -183,11 +181,6 @@ struct sway_container *container_flatten(struct sway_container *container);
void container_update_title_textures(struct sway_container *container);
/**
* Calculate the container's title_height property.
*/
void container_calculate_title_height(struct sway_container *container);
size_t container_build_representation(enum sway_container_layout layout,
list_t *children, char *buffer);