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/commands/font.c | 2 +- sway/commands/reload.c | 2 +- sway/commands/title_format.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'sway/commands') diff --git a/sway/commands/font.c b/sway/commands/font.c index c54365b5..cea720f5 100644 --- a/sway/commands/font.c +++ b/sway/commands/font.c @@ -22,6 +22,6 @@ struct cmd_results *cmd_font(int argc, char **argv) { } free(font); - config_update_font_height(true); + config_update_font_height(); return cmd_results_new(CMD_SUCCESS, NULL); } diff --git a/sway/commands/reload.c b/sway/commands/reload.c index 3c994d54..09ccd9d4 100644 --- a/sway/commands/reload.c +++ b/sway/commands/reload.c @@ -48,7 +48,7 @@ static void do_reload(void *data) { } list_free_items_and_destroy(bar_ids); - config_update_font_height(true); + config_update_font_height(); root_for_each_container(rebuild_textures_iterator, NULL); arrange_root(); diff --git a/sway/commands/title_format.c b/sway/commands/title_format.c index 9d312470..8d907e76 100644 --- a/sway/commands/title_format.c +++ b/sway/commands/title_format.c @@ -23,6 +23,6 @@ struct cmd_results *cmd_title_format(int argc, char **argv) { } view->title_format = format; view_update_title(view, true); - config_update_font_height(true); + config_update_font_height(); return cmd_results_new(CMD_SUCCESS, NULL); } -- cgit v1.2.3