diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2009-06-19 08:40:00 +0200 |
---|---|---|
committer | Clemens Ladisch <clemens@ladisch.de> | 2009-06-19 08:40:00 +0200 |
commit | 077467a87e0a5ab598a8e4a582268eebe78ff9d6 (patch) | |
tree | 044dc3f135a9d5f26daacf1a2e240f9c143cb8f8 /alsamixer | |
parent | 7a3e59cbc506d9f3019e0be60dab0fa86c54cd23 (diff) |
alsamixer: fix display of inactive volume bar
Fix the volume bar color selection logic so that the current attribute
is used for inactive controls.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Diffstat (limited to 'alsamixer')
-rw-r--r-- | alsamixer/mixer_display.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/alsamixer/mixer_display.c b/alsamixer/mixer_display.c index 79ed9d6..9eadcc9 100644 --- a/alsamixer/mixer_display.c +++ b/alsamixer/mixer_display.c @@ -475,13 +475,15 @@ static void display_control(unsigned int control_index) attr_ctl_frame : 0); else { ch = ACS_CKBOARD; + if (!(control->flags & IS_ACTIVE)) + ; #ifdef TRICOLOR_VOLUME_BAR - if (i > volume_height * 8 / 10) + else if (i > volume_height * 8 / 10) ch |= attr_ctl_bar_hi; else if (i > volume_height * 4 / 10) ch |= attr_ctl_bar_mi; - else #endif + else ch |= attr_ctl_bar_lo; } mvwaddch(mixer_widget.window, base_y - i - 1, |