From 2d4dcc93891570391a993fa151f0ef02997e2307 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Sun, 18 Dec 2011 14:50:36 +0100 Subject: interface: Dont postfix spaces, always prefix This'll make it possible to have proper displaying when clamping ctx::max_name_len in future. --- src/interface.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/interface.c b/src/interface.c index 009a0ca..f904407 100644 --- a/src/interface.c +++ b/src/interface.c @@ -114,14 +114,14 @@ static void print_volume(struct context *ctx, struct vol_ctl *ctl, int y) { gint x = 2 /* left */ + 2 /* index num width */ + 1 /* space */ + - 1 /* space */ + ctx->max_name_len + 1 /* space */; + 1 /* space */ + ctx->max_name_len; /* mute button + brackets + space */ - int volume_bar_len = getmaxx(ctx->menu_win) - x - 6; + int volume_bar_len = getmaxx(ctx->menu_win) - x - 7; gint vol = (gint) (volume_bar_len * ctl->vol / PA_VOLUME_NORM); - mvwprintw(ctx->menu_win, y, x - 1, "[%c]", ctl->mute ? 'M' : ' '); - x += 3; + mvwprintw(ctx->menu_win, y, x - 1, " [%c]", ctl->mute ? 'M' : ' '); + x += 4; mvwprintw(ctx->menu_win, y, x - 1 , "["); for (gint i = 0; i < vol; ++i) -- cgit