]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Icons height is the same as the title
authorRafael Fernández López <ereslibre@kde.org>
Fri, 28 Sep 2007 13:12:53 +0000 (13:12 +0000)
committerRafael Fernández López <ereslibre@kde.org>
Fri, 28 Sep 2007 13:12:53 +0000 (13:12 +0000)
svn path=/trunk/KDE/kdebase/apps/; revision=718317

src/dolphincategorydrawer.cpp

index 5012369ce0ecb7edb0d2e053a93d83680bb4399f..dd2c26bd92f0f7c3e3eda7ae4bae3b1b8b95f6be 100644 (file)
@@ -173,11 +173,11 @@ void DolphinCategoryDrawer::drawCategory(const QModelIndex &index, int sortRole,
 
             if (!faceIconPath.isEmpty())
             {
-                icon = QPixmap::fromImage(QImage(faceIconPath).scaledToHeight(KIconLoader::global()->currentSize(K3Icon::MainToolbar), Qt::SmoothTransformation));
+                icon = QPixmap::fromImage(QImage(faceIconPath).scaledToHeight(option.fontMetrics.height(), Qt::SmoothTransformation));
             }
             else
             {
-                icon = KIconLoader::global()->loadIcon("user", K3Icon::MainToolbar, option.fontMetrics.height());
+                icon = KIconLoader::global()->loadIcon("user", K3Icon::NoGroup, option.fontMetrics.height());
             }
 
             opt.rect.setTop(opt.rect.top() - icon.height());
@@ -199,7 +199,7 @@ void DolphinCategoryDrawer::drawCategory(const QModelIndex &index, int sortRole,
             // so the group icon drawn is that one particularly. This way assures the drawn
             // icon is the one of the mimetype of the group itself. (ereslibre)
             icon = KIconLoader::global()->loadMimeTypeIcon(item.mimeTypePtr()->iconName(),
-                                                           K3Icon::MainToolbar);
+                                                           K3Icon::NoGroup, option.fontMetrics.height());
 
             opt.rect.setTop(opt.rect.top() - icon.height());