mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-10 03:55:41 +01:00
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>
This commit is contained in:
parent
7a3e59cbc5
commit
077467a87e
1 changed files with 4 additions and 2 deletions
|
@ -475,13 +475,15 @@ static void display_control(unsigned int control_index)
|
||||||
attr_ctl_frame : 0);
|
attr_ctl_frame : 0);
|
||||||
else {
|
else {
|
||||||
ch = ACS_CKBOARD;
|
ch = ACS_CKBOARD;
|
||||||
|
if (!(control->flags & IS_ACTIVE))
|
||||||
|
;
|
||||||
#ifdef TRICOLOR_VOLUME_BAR
|
#ifdef TRICOLOR_VOLUME_BAR
|
||||||
if (i > volume_height * 8 / 10)
|
else if (i > volume_height * 8 / 10)
|
||||||
ch |= attr_ctl_bar_hi;
|
ch |= attr_ctl_bar_hi;
|
||||||
else if (i > volume_height * 4 / 10)
|
else if (i > volume_height * 4 / 10)
|
||||||
ch |= attr_ctl_bar_mi;
|
ch |= attr_ctl_bar_mi;
|
||||||
else
|
|
||||||
#endif
|
#endif
|
||||||
|
else
|
||||||
ch |= attr_ctl_bar_lo;
|
ch |= attr_ctl_bar_lo;
|
||||||
}
|
}
|
||||||
mvwaddch(mixer_widget.window, base_y - i - 1,
|
mvwaddch(mixer_widget.window, base_y - i - 1,
|
||||||
|
|
Loading…
Reference in a new issue