diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2013-10-29 11:58:43 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2013-10-29 11:58:43 +0000 |
| commit | 6340b366d20c3b19cea788c234196b903a3302c5 (patch) | |
| tree | 72c66d5edd87b03ad5b62485d5bf3d57becb5c34 /src/plugins/General/statusicon | |
| parent | b3e0107872acf9f4ed336c53979c4e9f72e951e6 (diff) | |
| download | qmmp-6340b366d20c3b19cea788c234196b903a3302c5.tar.gz qmmp-6340b366d20c3b19cea788c234196b903a3302c5.tar.bz2 qmmp-6340b366d20c3b19cea788c234196b903a3302c5.zip | |
status icon: replaced volume code
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@3832 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/General/statusicon')
| -rw-r--r-- | src/plugins/General/statusicon/qmmptrayicon.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/plugins/General/statusicon/qmmptrayicon.cpp b/src/plugins/General/statusicon/qmmptrayicon.cpp index 2182e69aa..eeb36bb84 100644 --- a/src/plugins/General/statusicon/qmmptrayicon.cpp +++ b/src/plugins/General/statusicon/qmmptrayicon.cpp @@ -64,15 +64,7 @@ bool QmmpTrayIcon::event(QEvent *e) void QmmpTrayIcon::wheelEvent(QWheelEvent *e) { - SoundCore *core = SoundCore::instance(); - int volume = qMax(core->leftVolume(), core->rightVolume()); - int balance = volume ? (core->rightVolume() - core->leftVolume()) * 100 / volume : volume; - volume += e->delta()/20; - volume = qMax(volume,0); - volume = qMin(volume,100); - core->setVolume(volume - qMax(balance,0)*volume/100, - volume + qMin(balance,0)*volume/100); - + SoundCore::instance()->changeVolume(e->delta()/20); } void QmmpTrayIcon::showToolTip() |
