ignore the width when getting an icon for applying the "hidden files" effect, otherwise a wrong horizontal alignment is done

svn path=/trunk/KDE/kdebase/apps/; revision=782786
This commit is contained in:
Peter Penz 2008-03-06 00:02:39 +00:00
parent 32564f92be
commit 865a33c5db

View file

@ -249,7 +249,8 @@ void IconManager::applyHiddenItemEffect(const KFileItem& hiddenItem)
const QVariant value = m_dolphinModel->data(index, Qt::DecorationRole);
if (value.type() == QVariant::Icon) {
const QIcon icon(qvariant_cast<QIcon>(value));
QPixmap pixmap = icon.pixmap(m_view->iconSize());
const QSize maxSize = m_view->iconSize();
QPixmap pixmap = icon.pixmap(maxSize.height(), maxSize.height()); // ignore the width
KIconEffect::semiTransparent(pixmap);
m_dolphinModel->setData(index, QIcon(pixmap), Qt::DecorationRole);
}