diff options
Diffstat (limited to 'src/draw.c')
| -rw-r--r-- | src/draw.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -151,7 +151,10 @@ void draw_compute_layout(Drawable *draw, GList *btns, cairo_t *cr) layout->text_w = ceil(text_w / scale); layout->text_h = ceil(text_h / scale); - layout->width = btn->fixed_size ? height : layout->text_w + 2 * radius; + // If there is only one glyph the button should be round + size_t text_l = g_utf8_strlen(btn->text, -1); + + layout->width = text_l == 1 ? height : layout->text_w + 2 * radius; layout->height = height; draw->layouts = g_list_append(draw->layouts, layout); |
