]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/panels/information/phononwidget.cpp
Merge branch 'frameworks'
[dolphin.git] / src / panels / information / phononwidget.cpp
index 1c9c21cd39b844846df0c4291cfbf6a49ec17231..1d6361f19d26d86ceccf597dfa21f0e5b7a4d16b 100644 (file)
@@ -30,8 +30,7 @@
 #include <QHBoxLayout>
 #include <QShowEvent>
 #include <QToolButton>
-
-#include <KDialog>
+#include <QDialog>
 #include <QIcon>
 #include <KIconLoader>
 #include <QUrl>
@@ -109,7 +108,7 @@ void PhononWidget::showEvent(QShowEvent *event)
     if (!m_topLayout) {
         m_topLayout = new QVBoxLayout(this);
         m_topLayout->setMargin(0);
-        m_topLayout->setSpacing(KDialog::spacingHint());
+
         QHBoxLayout *controlsLayout = new QHBoxLayout(this);
         controlsLayout->setMargin(0);
         controlsLayout->setSpacing(0);
@@ -166,6 +165,12 @@ void PhononWidget::stateChanged(Phonon::State newstate)
         m_stopButton->show();
         m_playButton->hide();
         break;
+    case Phonon::StoppedState:
+        if (m_videoPlayer) {
+            m_videoPlayer->hide();
+        }
+        emit hasVideoChanged(false);
+        // fall through
     default:
         m_stopButton->hide();
         m_playButton->show();
@@ -208,16 +213,7 @@ void PhononWidget::stop()
 {
     if (m_media) {
         m_media->stop();
-
-        m_stopButton->hide();
-        m_playButton->show();
-    }
-
-    if (m_videoPlayer) {
-        m_videoPlayer->hide();
     }
-
-    emit hasVideoChanged(false);
 }
 
 void PhononWidget::slotHasVideoChanged(bool hasVideo)