diff --git a/3rdparty/fancytabwidget/fancytabwidget.cpp b/3rdparty/fancytabwidget/fancytabwidget.cpp index 32ba6e5e5..d47311a34 100644 --- a/3rdparty/fancytabwidget/fancytabwidget.cpp +++ b/3rdparty/fancytabwidget/fancytabwidget.cpp @@ -41,7 +41,6 @@ #include #include #include -#include #include #include #include @@ -366,20 +365,17 @@ FancyTabWidget::FancyTabWidget(QWidget *parent) selectionLayout->addWidget(m_cornerWidgetContainer, 0); m_modesStack = new QStackedLayout; - m_statusBar = new QStatusBar; - m_statusBar->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed); - QVBoxLayout *vlayout = new QVBoxLayout; - vlayout->setMargin(0); - vlayout->setSpacing(0); - vlayout->addLayout(m_modesStack); - vlayout->addWidget(m_statusBar); + m_vlayout = new QVBoxLayout; + m_vlayout->setMargin(0); + m_vlayout->setSpacing(0); + m_vlayout->addLayout(m_modesStack); QHBoxLayout *mainLayout = new QHBoxLayout; mainLayout->setMargin(0); mainLayout->setSpacing(1); mainLayout->addWidget(m_selectionWidget); - mainLayout->addLayout(vlayout); + mainLayout->addLayout(m_vlayout); setLayout(mainLayout); connect(m_tabBar, SIGNAL(currentChanged(int)), this, SLOT(showWidget(int))); @@ -457,11 +453,6 @@ int FancyTabWidget::currentIndex() const return m_tabBar->currentIndex(); } -QStatusBar *FancyTabWidget::statusBar() const -{ - return m_statusBar; -} - void FancyTabWidget::setCurrentIndex(int index) { m_tabBar->setCurrentIndex(index); @@ -478,3 +469,7 @@ void FancyTabWidget::setTabToolTip(int index, const QString &toolTip) { m_tabBar->setTabToolTip(index, toolTip); } + +void FancyTabWidget::addBottomWidget(QWidget* widget) { + m_vlayout->addWidget(widget); +} diff --git a/3rdparty/fancytabwidget/fancytabwidget.h b/3rdparty/fancytabwidget/fancytabwidget.h index c3d7f1f24..05f5f2516 100644 --- a/3rdparty/fancytabwidget/fancytabwidget.h +++ b/3rdparty/fancytabwidget/fancytabwidget.h @@ -40,6 +40,7 @@ QT_BEGIN_NAMESPACE class QPainter; class QStackedLayout; class QStatusBar; +class QVBoxLayout; QT_END_NAMESPACE namespace Core { @@ -141,7 +142,8 @@ public: void paintEvent(QPaintEvent *event); int currentIndex() const; - QStatusBar *statusBar() const; + + void addBottomWidget(QWidget* widget); signals: void currentAboutToShow(int index); @@ -158,8 +160,8 @@ private: QWidget *m_cornerWidgetContainer; QStackedLayout *m_modesStack; QWidget *m_selectionWidget; - QStatusBar *m_statusBar; QPixmap m_backgroundPixmap; + QVBoxLayout* m_vlayout; }; } // namespace Internal diff --git a/src/ui/mainwindow.cpp b/src/ui/mainwindow.cpp index d8336a3bd..f6d297257 100644 --- a/src/ui/mainwindow.cpp +++ b/src/ui/mainwindow.cpp @@ -190,7 +190,9 @@ MainWindow::MainWindow(NetworkAccessManager* network, Engine::Type engine, QWidg ui_->tabs->addTab(new QWidget, IconLoader::Load("view-media-lyrics"), tr("Song info")); ui_->tabs->addTab(artist_info_view_, IconLoader::Load("view-media-lyrics"), tr("Artist info")); - ui_->tabs->statusBar()->hide(); + // Add the now playing widget to the fancy tab widget + ui_->tabs->addBottomWidget(ui_->now_playing); + ui_->tabs->setBackgroundPixmap(QPixmap(":/sidebar_background.png")); StyleHelper::setBaseColor(palette().color(QPalette::Highlight).darker());