summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2015-01-07 15:09:29 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-01-07 12:31:52 -0800
commitce9d972ffacc475e4b588d2e9a95bfea55391a38 (patch)
treef5e3131d9a03292c915a01ab71b02849fb4950bc /qt-ui
parent8531cec1004f1ee5f0655400557a4619945975b6 (diff)
downloadsubsurface-ce9d972ffacc475e4b588d2e9a95bfea55391a38.tar.gz
Give the items a bit more spacing / enable the delegate
Enable the new delegate on the view, and give the items a bit more spacing, so we can draw things around them. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/divelogimportdialog.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/qt-ui/divelogimportdialog.cpp b/qt-ui/divelogimportdialog.cpp
index 506f9c8d6..3c76665c9 100644
--- a/qt-ui/divelogimportdialog.cpp
+++ b/qt-ui/divelogimportdialog.cpp
@@ -329,7 +329,7 @@ DiveLogImportDialog::DiveLogImportDialog(QStringList fn, QWidget *parent) : QDia
ColumnNameProvider *provider = new ColumnNameProvider(this);
ui->avaliableColumns->setModel(provider);
-
+ ui->avaliableColumns->setItemDelegate(new TagDragDelegate(ui->avaliableColumns));
resultModel = new ColumnNameResult(this);
ui->tableView->setModel(resultModel);
@@ -487,7 +487,8 @@ TagDragDelegate::TagDragDelegate(QObject *parent) : QStyledItemDelegate(parent)
QSize TagDragDelegate::sizeHint(const QStyleOptionViewItem & option, const QModelIndex & index) const
{
- return QStyledItemDelegate::sizeHint(option, index);
+ QSize originalSize = QStyledItemDelegate::sizeHint(option, index);
+ return originalSize + QSize(5,5);
}
void TagDragDelegate::paint(QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index) const