1
0
mirror of https://github.com/strawberrymusicplayer/strawberry synced 2025-01-28 16:20:26 +01:00

Fix showing/hiding playing widget when playback is started while window is hidden

This commit is contained in:
Jonas Kvinge 2020-06-19 17:32:08 +02:00
parent 7c71efd1b3
commit 0695941a77
2 changed files with 3 additions and 3 deletions

View File

@ -28,12 +28,12 @@
#include <QList>
#include <QString>
#include <QImage>
#include <QAction>
#include "core/song.h"
#include "contextalbum.h"
class QMenu;
class QAction;
class QLabel;
class QStackedWidget;
class QVBoxLayout;
@ -61,7 +61,7 @@ class ContextView : public QWidget {
ContextAlbum *album_widget() const { return widget_album_; }
ContextAlbumsView *albums_widget() const { return widget_albums_; }
bool album_enabled() const { return widget_album_->isVisible(); }
bool album_enabled() const { return action_show_album_->isChecked(); }
Song song_playing() const { return song_playing_; }
protected:

View File

@ -1177,7 +1177,7 @@ void MainWindow::TrackSkipped(PlaylistItemPtr item) {
void MainWindow::TabSwitched() {
if (playing_widget_ && ui_->sidebar_layout->isVisible() && (ui_->tabs->tabBar()->tabData(ui_->tabs->currentIndex()).toString().toLower() != "context" || !context_view_->album_enabled())) {
if (playing_widget_ && ui_->action_toggle_show_sidebar->isChecked() && (ui_->tabs->tabBar()->tabData(ui_->tabs->currentIndex()).toString().toLower() != "context" || !context_view_->album_enabled())) {
ui_->widget_playing->SetEnabled();
}
else {