From f3feb177180ac85ac0458fe83312c54459edc112 Mon Sep 17 00:00:00 2001 From: Brenden Matthews Date: Tue, 16 Aug 2005 06:39:23 +0000 Subject: [PATCH] alignr git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky@115 7f574dfc-610e-0410-a909-a81674777703 --- conky.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/conky.c b/conky.c index b2d8667f..1f20346c 100644 --- a/conky.c +++ b/conky.c @@ -3175,15 +3175,11 @@ static void draw_line(char *s) case ALIGNR: { - int pos_x = - text_start_x + text_width - - cur_x - 1 - - get_string_width(p); - if (pos_x > - specials[special_index].arg) - w = pos_x - - specials - [special_index].arg; + int pos_x = text_width - gap_x - get_string_width(p) - border_margin*2 - 1; + /*printf("pos_x %i text_start_x %i text_width %i cur_x %i get_string_width(p) %i gap_x %i specials[special_index].arg %i border_margin %i border_width %i\n", pos_x, text_start_x, text_width, cur_x, get_string_width(p), gap_x, specials[special_index].arg, border_margin, border_width);*/ + if (pos_x > specials[special_index].arg) { + w = pos_x - specials[special_index].arg; + } } break;