diff options
Diffstat (limited to 'pacman-c++/client.cpp')
| -rw-r--r-- | pacman-c++/client.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pacman-c++/client.cpp b/pacman-c++/client.cpp index d4324b7..fbcde6d 100644 --- a/pacman-c++/client.cpp +++ b/pacman-c++/client.cpp | |||
| @@ -19,12 +19,13 @@ void Client::createMenu() | |||
| 19 | fileMenu->addAction(quitAction); | 19 | fileMenu->addAction(quitAction); |
| 20 | 20 | ||
| 21 | ClickLabel *toggleSound = new ClickLabel("Toggle Sound", this); | 21 | ClickLabel *toggleSound = new ClickLabel("Toggle Sound", this); |
| 22 | toggleSound->setToolTip("Toggle Sound"); | ||
| 22 | toggleSound->setFixedWidth(20); | 23 | toggleSound->setFixedWidth(20); |
| 23 | toggleSound->setFixedHeight(16); | 24 | toggleSound->setFixedHeight(16); |
| 24 | toggleSound->setAlignment(Qt::AlignBottom); | 25 | toggleSound->setAlignment(Qt::AlignBottom); |
| 25 | 26 | ||
| 26 | bool sound = AudioPlayer::self()->isWorking(); | 27 | bool sound = AudioPlayer::self()->isWorking(); |
| 27 | bool muted = sound && m_settings->value("muted", false).toBool(); | 28 | bool muted = !(sound && m_settings->value("muted", false).toBool()); |
| 28 | AudioPlayer::self()->setMuted(muted); | 29 | AudioPlayer::self()->setMuted(muted); |
| 29 | 30 | ||
| 30 | QImage img(muted ? ":/soundoff" : ":/soundon"); | 31 | QImage img(muted ? ":/soundoff" : ":/soundon"); |
