X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/f11c699fa203dd2cde0e85c63a6d186e3fa6a3de..ac73af7bedeebe2afa451249e8a6500651a6ec00:/src/infosidebarpage.cpp diff --git a/src/infosidebarpage.cpp b/src/infosidebarpage.cpp index 4716ea2d5..7b0d2d40c 100644 --- a/src/infosidebarpage.cpp +++ b/src/infosidebarpage.cpp @@ -80,6 +80,7 @@ InfoSidebarPage::InfoSidebarPage(QWidget* parent) : m_infoLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); m_infoLabel->setTextFormat(Qt::RichText); m_infoLabel->setWordWrap(true); + m_infoLabel->setFont(KGlobalSettings::smallestReadableFont()); if (MetaDataWidget::metaDataAvailable()) { m_metadataWidget = new MetaDataWidget(this); @@ -90,8 +91,8 @@ InfoSidebarPage::InfoSidebarPage(QWidget* parent) : layout->addWidget(m_nameLabel); layout->addWidget(new KSeparator(this)); layout->addWidget(m_infoLabel); - layout->addWidget(new KSeparator(this)); - if (m_metadataWidget) { + if (m_metadataWidget != 0) { + layout->addWidget(new KSeparator(this)); layout->addWidget(m_metadataWidget); } // ensure that widgets in the information side bar are aligned towards the top @@ -188,7 +189,7 @@ void InfoSidebarPage::showItemInfo() const int itemCount = selectedItems.count(); if (itemCount > 1) { KIconLoader iconLoader; - QPixmap icon = iconLoader.loadIcon("exec", + QPixmap icon = iconLoader.loadIcon("system-run", KIconLoader::NoGroup, KIconLoader::SizeEnormous); m_preview->setPixmap(icon); @@ -332,9 +333,10 @@ void InfoSidebarPage::showMetaInfo() unsigned long int totalSize = 0; foreach (const KFileItem& item, selectedItems) { - // TODO: what to do with directories (same with the one-item-selected-code)?, - // item.size() does not return the size of the content : not very instinctive for users - totalSize += item.size(); + // Only count the size of files, not dirs; to match what + // DolphinViewContainer::selectionStatusBarText does. + if (!item.isDir() && !item.isLink()) + totalSize += item.size(); } addInfoLine(text, i18nc("@label", "Total size:"), KIO::convertSize(totalSize)); }