aboutsummaryrefslogtreecommitdiff
path: root/font.c
diff options
context:
space:
mode:
Diffstat (limited to 'font.c')
-rw-r--r--font.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/font.c b/font.c
index 569d283..c085d1d 100644
--- a/font.c
+++ b/font.c
@@ -148,5 +148,6 @@ int atlas_get_strwidth(client_state* state, const char* str) {
void atlas_calc_item_widths(client_state* state) {
array_for_all(item_t, item, state->items) {
item->pixel_len = atlas_get_strwidth(state, item->text);
+ state->required_width = MAX(state->required_width, item->pixel_len + state->line_height / 2.0f);
}
}