From 3b654438b6774f27e05d9d8f35496166c2f155dc Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Wed, 7 Jan 2015 15:19:19 -0200 Subject: Draw a nice rounded rect around the avaliable column names This drawns a nice rounded rect around the avaliable column names, using antialiasing. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/divelogimportdialog.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'qt-ui/divelogimportdialog.cpp') diff --git a/qt-ui/divelogimportdialog.cpp b/qt-ui/divelogimportdialog.cpp index 3c76665c9..8eadc5b32 100644 --- a/qt-ui/divelogimportdialog.cpp +++ b/qt-ui/divelogimportdialog.cpp @@ -493,5 +493,10 @@ QSize TagDragDelegate::sizeHint(const QStyleOptionViewItem & option, const QMode void TagDragDelegate::paint(QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index) const { + painter->save(); + painter->setRenderHints(QPainter::Antialiasing); + painter->drawRoundedRect(option.rect.adjusted(4,4,-4,-4), 5, 5); + painter->restore(); QStyledItemDelegate::paint(painter, option, index); } + -- cgit v1.2.3-70-g09d2