┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2008-03-13 21:31:34 +0000
committerPeter Penz <[email protected]>2008-03-13 21:31:34 +0000
commit3d75a64e6ea4958e896f2dc7d2376bdf96de983f (patch)
tree8efe652da5ea1bf826195839e4849ec71975e15e /src
parentc2e537a8b1a68747f5e5f5a5746b55804e5cf472 (diff)
Remove the semitransparent effect for hidden items in the IconManager, it just takes too much time at this part of the code. David Faure suggested some alternative ideas, I hope I can try them before KDE 4.1. Currently it is more important to keep the performance high.
BUG: 158807 svn path=/trunk/KDE/kdebase/apps/; revision=785369
Diffstat (limited to 'src')
-rw-r--r--src/iconmanager.cpp30
-rw-r--r--src/iconmanager.h3
2 files changed, 0 insertions, 33 deletions
diff --git a/src/iconmanager.cpp b/src/iconmanager.cpp
index 03dd70cf9..ae2b80b99 100644
--- a/src/iconmanager.cpp
+++ b/src/iconmanager.cpp
@@ -93,13 +93,6 @@ void IconManager::updatePreviews()
void IconManager::updateIcons(const KFileItemList& items)
{
- // make the icons of all hidden files semitransparent
- foreach (KFileItem item, items) {
- if (item.isHidden()) {
- applyHiddenItemEffect(item);
- }
- }
-
if (m_showPreview) {
generatePreviews(items);
}
@@ -139,16 +132,6 @@ void IconManager::replaceIcon(const KFileItem& item, const QPixmap& pixmap)
limitToSize(icon, m_view->iconSize());
}
- if (item.isHidden()) {
- if (!icon.hasAlpha()) {
- // the semitransparent operation requires having an alpha mask
- QPixmap alphaMask(icon.size());
- alphaMask.fill();
- icon.setAlphaChannel(alphaMask);
- }
- KIconEffect::semiTransparent(icon);
- }
-
const QMimeData* mimeData = QApplication::clipboard()->mimeData();
if (KonqMimeData::decodeIsCutSelection(mimeData) && isCutItem(item)) {
KIconEffect iconEffect;
@@ -264,19 +247,6 @@ void IconManager::applyCutItemEffect()
}
}
-void IconManager::applyHiddenItemEffect(const KFileItem& hiddenItem)
-{
- const QModelIndex index = m_dolphinModel->indexForItem(hiddenItem);
- const QVariant value = m_dolphinModel->data(index, Qt::DecorationRole);
- if (value.type() == QVariant::Icon) {
- const QIcon icon(qvariant_cast<QIcon>(value));
- 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);
- }
-}
-
bool IconManager::applyImageFrame(QPixmap& icon)
{
const QSize maxSize = m_view->iconSize();
diff --git a/src/iconmanager.h b/src/iconmanager.h
index e35b13989..888fb42ee 100644
--- a/src/iconmanager.h
+++ b/src/iconmanager.h
@@ -85,9 +85,6 @@ private:
/** Applies an item effect to all cut items. */
void applyCutItemEffect();
- /** Applies an item effect to the hidden item \a hiddenItem. */
- void applyHiddenItemEffect(const KFileItem& hiddenItem);
-
/**
* Applies a frame around the icon. False is returned if
* no frame has been added because the icon is too small.