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);
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
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);
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));
}