diff options
Diffstat (limited to 'swaybar')
-rw-r--r-- | swaybar/render.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/swaybar/render.c b/swaybar/render.c index a5834f4b..3d9ef66b 100644 --- a/swaybar/render.c +++ b/swaybar/render.c | |||
@@ -30,7 +30,7 @@ static uint32_t render_status_line_text(cairo_t *cairo, | |||
30 | 1, config->pango_markup, "%s", status->text); | 30 | 1, config->pango_markup, "%s", status->text); |
31 | uint32_t ideal_height = text_height + ws_vertical_padding * 2; | 31 | uint32_t ideal_height = text_height + ws_vertical_padding * 2; |
32 | if (height < ideal_height) { | 32 | if (height < ideal_height) { |
33 | height = ideal_height; | 33 | return ideal_height; |
34 | } | 34 | } |
35 | double text_y = height / 2.0 - text_height / 2.0; | 35 | double text_y = height / 2.0 - text_height / 2.0; |
36 | cairo_move_to(cairo, width - text_width - margin, (int)floor(text_y)); | 36 | cairo_move_to(cairo, width - text_width - margin, (int)floor(text_y)); |
@@ -70,7 +70,7 @@ static uint32_t render_binding_mode_indicator(cairo_t *cairo, | |||
70 | uint32_t ideal_height = text_height + ws_vertical_padding * 2 | 70 | uint32_t ideal_height = text_height + ws_vertical_padding * 2 |
71 | + border_width * 2; | 71 | + border_width * 2; |
72 | if (height < ideal_height) { | 72 | if (height < ideal_height) { |
73 | height = ideal_height; | 73 | return ideal_height; |
74 | } | 74 | } |
75 | uint32_t width = text_width + ws_horizontal_padding * 2 + border_width * 2; | 75 | uint32_t width = text_width + ws_horizontal_padding * 2 + border_width * 2; |
76 | 76 | ||
@@ -133,7 +133,7 @@ static uint32_t render_workspace_button(cairo_t *cairo, | |||
133 | uint32_t ideal_height = ws_vertical_padding * 2 + text_height | 133 | uint32_t ideal_height = ws_vertical_padding * 2 + text_height |
134 | + border_width * 2; | 134 | + border_width * 2; |
135 | if (height < ideal_height) { | 135 | if (height < ideal_height) { |
136 | height = ideal_height; | 136 | return ideal_height; |
137 | } | 137 | } |
138 | uint32_t width = ws_horizontal_padding * 2 + text_width + border_width * 2; | 138 | uint32_t width = ws_horizontal_padding * 2 + text_width + border_width * 2; |
139 | 139 | ||