From abacdaccb6a1ef55bd85b66e10caaa217458400b Mon Sep 17 00:00:00 2001 From: Federico Angelilli Date: Sun, 17 Mar 2024 14:55:36 +0100 Subject: Add group shrink animation --- src/draw.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/draw.c') diff --git a/src/draw.c b/src/draw.c index 525ecd7..d351819 100644 --- a/src/draw.c +++ b/src/draw.c @@ -175,9 +175,7 @@ static void layout_set_text(Layout *layout, PangoFontDescription *desc, int heig // If there is only one glyph the button should be round size_t text_l = g_utf8_strlen(text, -1); - layout->width = text_l == 1 ? height : layout->text_w + height; - layout->height = height; } static void compute_width(Drawer *draw, Window *win) @@ -208,6 +206,7 @@ static GList *compute_group_layout(Drawer *draw, GList *btns, int bx, bool root) layouts = g_list_prepend(layouts, layout); layout->btn = btn; + layout->height = draw->height; layout->line_w = btn->line_width; layout->x_pad = btn->x_pad; layout->y_pad = btn->y_pad; @@ -234,7 +233,6 @@ retry: Layout *last = g_list_last(layout->children)->data; layout->width = last->x + last->width - bx; - layout->height = draw->height; // FIXME: Temporary solution to make the antialiasing (or the circles not // overlapping correctly) problem less noticeable -- cgit v1.2.3