From 1aad44afc4598838f6136ad2bb7e9f1894abe8b3 Mon Sep 17 00:00:00 2001 From: Martin Duquesnoy Date: Sun, 5 Feb 2012 17:48:11 +0100 Subject: [PATCH] progressar sequence is vertical if w < h --- src/status.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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();