aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/General/hotkey/hotkeymanager_x11.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/General/hotkey/hotkeymanager_x11.cpp')
-rw-r--r--src/plugins/General/hotkey/hotkeymanager_x11.cpp17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/plugins/General/hotkey/hotkeymanager_x11.cpp b/src/plugins/General/hotkey/hotkeymanager_x11.cpp
index 241b2ea64..0b90c6c13 100644
--- a/src/plugins/General/hotkey/hotkeymanager_x11.cpp
+++ b/src/plugins/General/hotkey/hotkeymanager_x11.cpp
@@ -178,21 +178,10 @@ bool HotkeyManager::eventFilter(QObject* o, QEvent* e)
UiHelper::instance()->toggleVisibility();
break;
case Hotkey::VOLUME_UP:
+ core->changeVolume(+5);
+ break;
case Hotkey::VOLUME_DOWN:
- {
- int volume = qMax(core->leftVolume(), core->rightVolume());
- int balance = 0;
- int left = core->leftVolume();
- int right = core->rightVolume();
- if (left || right)
- balance = (right - left)*100/volume;
- if(hotkey->action == Hotkey::VOLUME_UP)
- volume = qMin (100, volume + 5);
- else
- volume = qMax (0, volume - 5);
- core->setVolume(volume-qMax(balance,0)*volume/100,
- volume+qMin(balance,0)*volume/100);
- }
+ core->changeVolume(-5);
break;
case Hotkey::FORWARD:
core->seek(core->elapsed() + 5000);