From 62d90a8e959c6edcc752e124a9928cfa2399fbd1 Mon Sep 17 00:00:00 2001 From: Hugo Osvaldo Barrera Date: Wed, 18 Aug 2021 23:27:01 +0200 Subject: 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. --- sway/tree/view.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sway/tree/view.c') diff --git a/sway/tree/view.c b/sway/tree/view.c index fcdd06f7..3ab971f7 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c @@ -1285,8 +1285,7 @@ void view_update_title(struct sway_view *view, bool force) { view->container->title = NULL; view->container->formatted_title = NULL; } - container_calculate_title_height(view->container); - config_update_font_height(false); + config_update_font_height(); // Update title after the global font height is updated container_update_title_textures(view->container); -- cgit v1.2.3-54-g00ecf