diff --git a/src/status.c b/src/status.c index 1951638..9ad823b 100644 --- a/src/status.c +++ b/src/status.c @@ -372,9 +372,17 @@ status_apply_list(struct status_ctx *ctx) g.x = sq->geo.x + sq->data[0]; g.y = sq->geo.y + sq->data[0]; g.w = sq->geo.w - sq->data[0] - sq->data[0]; - g.w /= ((float)sq->data[2] / (float)sq->data[1]); g.h = sq->geo.h - sq->data[0] - sq->data[0]; + if(sq->geo.w > sq->geo.h) + g.w /= ((float)sq->data[2] / (float)sq->data[1]); + else + { + g.y += g.h; + g.h /= ((float)sq->data[2] / (float)sq->data[1]); + g.y -= g.h; + } + draw_rect(ctx->barwin->dr, &g, sq->color2); STORE_MOUSEBIND();