Commit b1aba4ff authored by Luigi Toscano's avatar Luigi Toscano

Port from KIcon to QIcon

parent 753365bb
...@@ -26,8 +26,7 @@ ...@@ -26,8 +26,7 @@
#include <KMessageBox> #include <KMessageBox>
#include <KLocalizedString> #include <KLocalizedString>
#include <QPainter> #include <QPainter>
#include <KIconLoader> #include <QIcon>
#include <KIcon>
#include <QEvent> #include <QEvent>
...@@ -184,13 +183,13 @@ void GameVariantDelegate::paint(QPainter* painter, const QStyleOptionViewItem& o ...@@ -184,13 +183,13 @@ void GameVariantDelegate::paint(QPainter* painter, const QStyleOptionViewItem& o
// Show icon // Show icon
QPixmap iconPixmap = KIcon(icon(index), KIconLoader::global()).pixmap(m_iconWidth, m_iconHeight); QPixmap iconPixmap = QIcon::fromTheme(icon(index)).pixmap(m_iconWidth, m_iconHeight);
painter->drawPixmap(contentRect.left(), (contentRect.height() - iconPixmap.height()) / 2 + contentRect.top(), iconPixmap); painter->drawPixmap(contentRect.left(), (contentRect.height() - iconPixmap.height()) / 2 + contentRect.top(), iconPixmap);
contentRect.adjust(iconPixmap.width() + m_separatorPixels*2, 0, 0, 0); contentRect.adjust(iconPixmap.width() + m_separatorPixels*2, 0, 0, 0);
// // Show configuration icon // // Show configuration icon
// if(configurable(index)) { // if(configurable(index)) {
// QPixmap configPixmap = KIcon( QLatin1String( "configure" ), KIconLoader::global()).pixmap(32, 32); // QPixmap configPixmap = QIcon::fromTheme( QLatin1String( "configure" ) ).pixmap(32, 32);
// painter->drawPixmap(contentRect.right() - configPixmap.width(), (contentRect.height() - configPixmap.height()) / 2 + contentRect.top(), configPixmap); // painter->drawPixmap(contentRect.right() - configPixmap.width(), (contentRect.height() - configPixmap.height()) / 2 + contentRect.top(), configPixmap);
// contentRect.adjust(0, 0, -(configPixmap.width() + separatorPixels), 0); // contentRect.adjust(0, 0, -(configPixmap.width() + separatorPixels), 0);
// } // }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment