KDE/kdelibs/kutils

Rafael Fernández López ereslibre at kde.org
Wed Jan 2 01:22:33 GMT 2008


SVN commit 755675 by ereslibre:

Better looking categories. Thanks to Aurélien Gâteau for the original patch.

CCMAIL: kde-core-devel at kde.org


 M  +3 -16     kpluginselector.cpp  


--- trunk/KDE/kdelibs/kutils/kpluginselector.cpp #755674:755675
@@ -78,7 +78,6 @@
     pluginDelegate->setSeparatorPixels(8);
 
     QFont title(parent->font());
-    title.setPointSize(title.pointSize() + 2);
     title.setWeight(QFont::Bold);
 
     QFontMetrics titleMetrics(title);
@@ -806,7 +805,6 @@
     QFont previousFont(painter->font());
     QFont configureFont(painter->font());
 
-    title.setPointSize(title.pointSize() + 2);
     title.setWeight(QFont::Bold);
 
     if (index.internalPointer())
@@ -968,16 +966,15 @@
 
         QFont painterFont = painter->font();
         painterFont.setWeight(QFont::Bold);
-        painterFont.setPointSize(painterFont.pointSize() + 2);
         QFontMetrics metrics(painterFont);
         painter->setFont(painterFont);
 
         opt.fontMetrics = painter->fontMetrics();
 
         QRect auxRect(optionCopy.rect.left() + leftMargin,
-                      optionCopy.rect.bottom() - 2,
+                      optionCopy.rect.bottom() - 1,
                       optionCopy.rect.width() - leftMargin - rightMargin,
-                      2);
+                      1);
 
         QPainterPath path;
         path.addRect(auxRect);
@@ -995,15 +992,6 @@
 
         int iconSize = KIconLoader::global()->currentSize(KIconLoader::Small);
 
-        if (option.direction == Qt::LeftToRight)
-        {
-            optionCopy.rect.setLeft(optionCopy.rect.left() + (iconSize / 4));
-        }
-        else
-        {
-            optionCopy.rect.setRight(optionCopy.rect.width() - (iconSize / 4));
-        }
-
         QRect auxRect2(optionCopy.rect.left() + leftMargin,
                        option.rect.top(),
                        optionCopy.rect.width() - leftMargin - rightMargin,
@@ -1021,7 +1009,6 @@
     Q_UNUSED(option);
 
     QFont title(option.font);
-    title.setPointSize(title.pointSize() + 2);
     title.setWeight(QFont::Bold);
 
     QFontMetrics titleMetrics(title);
@@ -1042,7 +1029,7 @@
         return QSize(minimumItemWidth, qMax((separatorPixels * 2) + iconHeight, (separatorPixels * 3) + qMax(titleMetrics.height(), opt.rect.height()) + currentMetrics.height()));
     }
 
-    return QSize(minimumItemWidth, separatorPixels + titleMetrics.height() + 2);
+    return QSize(minimumItemWidth, separatorPixels + titleMetrics.height() + 1);
 }
 
 void KPluginSelector::Private::PluginDelegate::setIconSize(int width, int height)




More information about the kde-core-devel mailing list