aboutsummaryrefslogtreecommitdiff
path: root/src/qt/overviewpage.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2011-08-03 21:28:11 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2011-08-03 21:28:11 +0200
commit2ccd47596b14111f8be4984bde469adbc316db0d (patch)
treefb09cddc6f7121b9918775af14f75c8753628cce /src/qt/overviewpage.cpp
parent82303fc3ca8762e5d3b9afe521069df81190b9ab (diff)
fix drawing on gtk
Diffstat (limited to 'src/qt/overviewpage.cpp')
-rw-r--r--src/qt/overviewpage.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp
index 98f0476ba6..8aa3bb860c 100644
--- a/src/qt/overviewpage.cpp
+++ b/src/qt/overviewpage.cpp
@@ -10,17 +10,17 @@
#include "guiconstants.h"
#include <QDebug>
-#include <QItemDelegate>
+#include <QAbstractItemDelegate>
#include <QPainter>
#define DECORATION_SIZE 64
#define NUM_ITEMS 3
-class TxViewDelegate : public QItemDelegate
+class TxViewDelegate : public QAbstractItemDelegate
{
//Q_OBJECT
public:
- TxViewDelegate(): QItemDelegate(), unit(BitcoinUnits::BTC)
+ TxViewDelegate(): QAbstractItemDelegate(), unit(BitcoinUnits::BTC)
{
}
@@ -28,7 +28,6 @@ public:
inline void paint(QPainter *painter, const QStyleOptionViewItem &option,
const QModelIndex &index ) const
{
- //QItemDelegate::paint(painter, option, index);
painter->save();
QIcon icon = qvariant_cast<QIcon>(index.data(Qt::DecorationRole));
@@ -81,6 +80,11 @@ public:
painter->restore();
}
+ inline QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
+ {
+ return QSize(DECORATION_SIZE, DECORATION_SIZE);
+ }
+
int unit;
};