diff options
| author | Peter Penz <[email protected]> | 2008-05-06 21:46:30 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2008-05-06 21:46:30 +0000 |
| commit | c5727efd24a209d72515fb518adb7c35a4202141 (patch) | |
| tree | b7ed1bcc65219776b38a187e3a9ca42ab613b637 /src | |
| parent | 0de9ce998583f5b7ed2e741edfbfcd1271224886 (diff) | |
* prevent that cut icons are shift left in the icons view by using the correct size
* apply cut item effect before generating previews
BUG: 161707
svn path=/trunk/KDE/kdebase/apps/; revision=804768
Diffstat (limited to 'src')
| -rw-r--r-- | src/iconmanager.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/iconmanager.cpp b/src/iconmanager.cpp index c6c07be7b..6bd916917 100644 --- a/src/iconmanager.cpp +++ b/src/iconmanager.cpp @@ -98,6 +98,8 @@ void IconManager::updatePreviews() void IconManager::generatePreviews(const KFileItemList &items) { + applyCutItemEffect(); + if (!m_showPreview) { return; } @@ -274,7 +276,10 @@ void IconManager::applyCutItemEffect() 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 actualSize = icon.actualSize(m_view->iconSize()); + QPixmap pixmap = icon.pixmap(actualSize); + //QSize size(m_view->iconSize().height(), m_view->iconSize().height()); + //QPixmap pixmap = icon.pixmap(size); // remember current pixmap for the item to be able // to restore it when other items get cut |
