summaryrefslogtreecommitdiff
path: root/liblightdm-qt
diff options
context:
space:
mode:
authorAurélien Gâteau <aurelien.gateau@canonical.com>2012-02-14 11:31:01 +0100
committerAurélien Gâteau <aurelien.gateau@canonical.com>2012-02-14 11:31:01 +0100
commit35475c0ffc19a3a2ef1192b676b6d930b263a8d7 (patch)
treecc76e67cd96d51539d391bbf483df30b0c54aed4 /liblightdm-qt
parent2841ac0a663e120c7ff40d3ae3c5a7a3f876528d (diff)
downloadlightdm-35475c0ffc19a3a2ef1192b676b6d930b263a8d7.tar.gz
Return the user face as a QIcon rather than a QPixmap
If we don't use a QIcon then when the model is used in a QComboBox the QComboBox::iconSize() is ignored, causing the icon to be huge in the drop-down list.
Diffstat (limited to 'liblightdm-qt')
-rw-r--r--liblightdm-qt/usersmodel.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/liblightdm-qt/usersmodel.cpp b/liblightdm-qt/usersmodel.cpp
index 9e79bb2d..f591a2b3 100644
--- a/liblightdm-qt/usersmodel.cpp
+++ b/liblightdm-qt/usersmodel.cpp
@@ -13,7 +13,7 @@
#include <QtCore/QString>
#include <QtCore/QDebug>
-#include <QtGui/QPixmap>
+#include <QtGui/QIcon>
#include <lightdm.h>
@@ -214,7 +214,7 @@ QVariant UsersModel::data(const QModelIndex &index, int role) const
case Qt::DisplayRole:
return d->users[row].displayName();
case Qt::DecorationRole:
- return QPixmap(d->users[row].image);
+ return QIcon(d->users[row].image);
case UsersModel::NameRole:
return d->users[row].name;
case UsersModel::RealNameRole: