X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/c2fa8ae9ab0df08781b7d032e99d7b8f220c10e0..72705e4cf8f7e39cd316609fdd824790618e8ec9:/src/panels/information/informationpanelcontent.cpp?ds=sidebyside diff --git a/src/panels/information/informationpanelcontent.cpp b/src/panels/information/informationpanelcontent.cpp index 5c1b7ae22..fe964f364 100644 --- a/src/panels/information/informationpanelcontent.cpp +++ b/src/panels/information/informationpanelcontent.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include #include @@ -232,7 +233,7 @@ void InformationPanelContent::refreshPreview() // in the case of a search-URL the URL is not readable for humans // (at least not useful to show in the Information Panel) m_preview->setPixmap( - QIcon::fromTheme(QStringLiteral("baloo")).pixmap(KIconLoader::SizeEnormous, KIconLoader::SizeEnormous) + QIcon::fromTheme(QStringLiteral("baloo")).pixmap(m_preview->height(), m_preview->width()) ); } else { @@ -247,6 +248,7 @@ void InformationPanelContent::refreshPreview() // change the cursor of the preview m_preview->setCursor(Qt::PointingHandCursor); m_preview->installEventFilter(m_phononWidget); + m_phononWidget->show(); // if the video is playing, has been paused or stopped // we don't need to update the preview/phonon widget states @@ -266,7 +268,6 @@ void InformationPanelContent::refreshPreview() m_preview->show(); } - m_phononWidget->show(); m_phononWidget->setUrl(m_item.targetUrl(), m_isVideo ? PhononWidget::MediaKind::Video : PhononWidget::MediaKind::Audio); adjustWidgetSizes(parentWidget()->width()); } @@ -313,7 +314,7 @@ void InformationPanelContent::showItems(const KFileItemList& items) m_preview->stopAnimatedImage(); m_preview->setPixmap( - QIcon::fromTheme(QStringLiteral("dialog-information")).pixmap(KIconLoader::SizeEnormous, KIconLoader::SizeEnormous) + QIcon::fromTheme(QStringLiteral("dialog-information")).pixmap(m_preview->height(), m_preview->width()) ); setNameLabelText(i18ncp("@label", "%1 item selected", "%1 items selected", items.count())); @@ -357,7 +358,7 @@ bool InformationPanelContent::eventFilter(QObject* obj, QEvent* event) void InformationPanelContent::showIcon(const KFileItem& item) { m_outdatedPreviewTimer->stop(); - QPixmap pixmap = QIcon::fromTheme(item.iconName()).pixmap(KIconLoader::SizeEnormous, KIconLoader::SizeEnormous); + QPixmap pixmap = QIcon::fromTheme(item.iconName()).pixmap(m_preview->height(), m_preview->width()); KIconLoader::global()->drawOverlays(item.overlays(), pixmap, KIconLoader::Desktop); m_preview->setPixmap(pixmap); }