Commit b4cdf1c1 authored by Michael Pyne's avatar Michael Pyne

Merge branch 'Applications/18.08'

Conflicts:
	playermanager.cpp
parents 798f35bc e2012e79
......@@ -32,7 +32,7 @@
#include <QTimer>
#include <QUrl>
#include <math.h>
#include <algorithm>
#include "playlistinterface.h"
#include "playeradaptor.h"
......@@ -321,12 +321,14 @@ void PlayerManager::back()
void PlayerManager::volumeUp()
{
setVolume(volume() + 0.04); // 4% up
const auto newVolume = std::min(m_output->volume() + 0.04, 1.0);
m_output->setVolume(newVolume); // 4% up
}
void PlayerManager::volumeDown()
{
setVolume(volume() - 0.04); // 4% down
const auto newVolume = std::max(m_output->volume() - 0.04, 0.0);
m_output->setVolume(newVolume); // 4% down
}
void PlayerManager::setMuted(bool m)
......
......@@ -509,7 +509,7 @@ void SystemTray::scrollEvent(int delta, Qt::Orientation orientation)
if(orientation == Qt::Horizontal)
return;
switch(QApplication::keyboardModifiers()) {
switch(QApplication::queryKeyboardModifiers()) {
case Qt::ShiftModifier:
if(delta > 0)
ActionCollection::action("volumeUp")->trigger();
......
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