mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
8531cec100
commit
ce9d972ffa
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue