mirror of
https://github.com/clementine-player/Clementine
synced 2025-01-19 21:11:02 +01:00
make format
This commit is contained in:
parent
a9a616863d
commit
a879b8c7fd
@ -38,7 +38,8 @@ QtSystemTrayIcon::QtSystemTrayIcon(QObject* parent)
|
||||
action_mute_(nullptr),
|
||||
action_love_(nullptr) {
|
||||
QIcon theme_icon = IconLoader::Load("clementine-panel", IconLoader::Base);
|
||||
QIcon theme_icon_grey = IconLoader::Load("clementine-panel-grey", IconLoader::Base);
|
||||
QIcon theme_icon_grey =
|
||||
IconLoader::Load("clementine-panel-grey", IconLoader::Base);
|
||||
|
||||
if (theme_icon.isNull() || theme_icon_grey.isNull()) {
|
||||
// Load the default icon
|
||||
@ -88,14 +89,14 @@ bool QtSystemTrayIcon::eventFilter(QObject* object, QEvent* event) {
|
||||
QSettings s;
|
||||
s.beginGroup(MainWindow::kSettingsGroup);
|
||||
bool prev_next_track = s.value("scrolltrayicon").toBool();
|
||||
if(prev_next_track) {
|
||||
if (e->delta() < 0) {
|
||||
emit NextTrack();
|
||||
} else {
|
||||
emit PreviousTrack();
|
||||
}
|
||||
} else {
|
||||
emit ChangeVolume(e->delta());
|
||||
if (prev_next_track) {
|
||||
if (e->delta() < 0) {
|
||||
emit NextTrack();
|
||||
} else {
|
||||
emit PreviousTrack();
|
||||
}
|
||||
} else {
|
||||
emit ChangeVolume(e->delta());
|
||||
}
|
||||
}
|
||||
return true;
|
||||
@ -171,7 +172,8 @@ void QtSystemTrayIcon::SetPaused() {
|
||||
|
||||
action_stop_->setEnabled(true);
|
||||
action_stop_after_this_track_->setEnabled(true);
|
||||
action_play_pause_->setIcon(IconLoader::Load("media-playback-start", IconLoader::Base));
|
||||
action_play_pause_->setIcon(
|
||||
IconLoader::Load("media-playback-start", IconLoader::Base));
|
||||
action_play_pause_->setText(tr("Play"));
|
||||
|
||||
action_play_pause_->setEnabled(true);
|
||||
@ -182,7 +184,8 @@ void QtSystemTrayIcon::SetPlaying(bool enable_play_pause, bool enable_love) {
|
||||
|
||||
action_stop_->setEnabled(true);
|
||||
action_stop_after_this_track_->setEnabled(true);
|
||||
action_play_pause_->setIcon(IconLoader::Load("media-playback-pause", IconLoader::Base));
|
||||
action_play_pause_->setIcon(
|
||||
IconLoader::Load("media-playback-pause", IconLoader::Base));
|
||||
action_play_pause_->setText(tr("Pause"));
|
||||
action_play_pause_->setEnabled(enable_play_pause);
|
||||
#ifdef HAVE_LIBLASTFM
|
||||
@ -195,7 +198,8 @@ void QtSystemTrayIcon::SetStopped() {
|
||||
|
||||
action_stop_->setEnabled(false);
|
||||
action_stop_after_this_track_->setEnabled(false);
|
||||
action_play_pause_->setIcon(IconLoader::Load("media-playback-start", IconLoader::Base));
|
||||
action_play_pause_->setIcon(
|
||||
IconLoader::Load("media-playback-start", IconLoader::Base));
|
||||
action_play_pause_->setText(tr("Play"));
|
||||
|
||||
action_play_pause_->setEnabled(true);
|
||||
|
Loading…
Reference in New Issue
Block a user