X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/fa988586bc923b33497cbc97aaac07fc93a4ca83..c725848709:/src/panels/information/phononwidget.cpp diff --git a/src/panels/information/phononwidget.cpp b/src/panels/information/phononwidget.cpp index 1c9c21cd3..1d6361f19 100644 --- a/src/panels/information/phononwidget.cpp +++ b/src/panels/information/phononwidget.cpp @@ -30,8 +30,7 @@ #include #include #include - -#include +#include #include #include #include @@ -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)