mirror of
https://github.com/alsa-project/alsa-tools.git
synced 2025-10-29 05:40:25 -04:00
hdspmixer: Fix toggle of master mute and solo buttons
The sensitive area for master mute and solo buttons was slightly off. Discovered and fixed by Reuben Martin. Thanks for the patch. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
3771b825c8
commit
5e77f279ba
1 changed files with 7 additions and 7 deletions
|
|
@ -31,21 +31,21 @@ HDSPMixerMaster::HDSPMixerMaster(int x, int y, int w, int h):Fl_Widget(x, y, 62,
|
|||
void HDSPMixerMaster::draw()
|
||||
{
|
||||
if (mute && mute_active) {
|
||||
fl_push_clip(x(), y(), 29, 10);
|
||||
fl_push_clip(x(), y(), 30, 11);
|
||||
fl_draw_pixmap(b_mute_xpm, x(), y());
|
||||
fl_pop_clip();
|
||||
} else if (mute) {
|
||||
fl_push_clip(x(), y(), 29, 10);
|
||||
fl_draw_pixmap(b_mute_xpm, x(), y()-10);
|
||||
fl_push_clip(x(), y(), 30, 11);
|
||||
fl_draw_pixmap(b_mute_xpm, x(), y()-11);
|
||||
fl_pop_clip();
|
||||
}
|
||||
if (solo && solo_active) {
|
||||
fl_push_clip(x()+32, y(), 29, 10);
|
||||
fl_push_clip(x()+32, y(), 30, 11);
|
||||
fl_draw_pixmap(b_solo_xpm, x()+32, y());
|
||||
fl_pop_clip();
|
||||
} else if (solo) {
|
||||
fl_push_clip(x()+32, y(), 29, 10);
|
||||
fl_draw_pixmap(b_solo_xpm, x()+32, y()-10);
|
||||
fl_push_clip(x()+32, y(), 30, 11);
|
||||
fl_draw_pixmap(b_solo_xpm, x()+32, y()-11);
|
||||
fl_pop_clip();
|
||||
}
|
||||
}
|
||||
|
|
@ -55,7 +55,7 @@ int HDSPMixerMaster::handle(int e)
|
|||
int xpos = Fl::event_x()-x();
|
||||
switch (e) {
|
||||
case FL_PUSH:
|
||||
if (xpos >= 0 && xpos <= 29) {
|
||||
if (xpos >= 0 && xpos <= 30) {
|
||||
if (mute) {
|
||||
mute = 0;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue