Commit fd07c038 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: do not react to right-click to mute volume

This is counter-intuitive.
As asked by etix
(cherry picked from commit 7dab7f2f285f99c78f5aca3802a787f8b369e4c1)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 739f559f
...@@ -210,25 +210,25 @@ void SoundWidget::setMuted( bool mute ) ...@@ -210,25 +210,25 @@ void SoundWidget::setMuted( bool mute )
bool SoundWidget::eventFilter( QObject *obj, QEvent *e ) bool SoundWidget::eventFilter( QObject *obj, QEvent *e )
{ {
VLC_UNUSED( obj ); VLC_UNUSED( obj );
if (e->type() == QEvent::MouseButtonPress ) if( e->type() == QEvent::MouseButtonPress )
{ {
if( volumeSlider->orientation() == Qt::Vertical ) QMouseEvent *event = static_cast<QMouseEvent*>(e);
if( event->button() != Qt::RightButton )
{ {
QMouseEvent *event = static_cast<QMouseEvent*>(e); if( volumeSlider->orientation() == Qt::Vertical )
showVolumeMenu( event->pos() ); {
showVolumeMenu( event->pos() );
}
else
{
setMuted( !b_is_muted );
}
e->accept();
return true;
} }
else
{
setMuted( !b_is_muted );
}
e->accept();
return true;
}
else
{
e->ignore();
return false;
} }
e->ignore();
return false;
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment