summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2015-07-08 10:11:13 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-07-08 07:49:49 -0700
commit967bd68e6499b133264372ca5c81a9320a79e6c0 (patch)
treede98bb69f2e2cf3cadda2a04fa0f38b656e8db62
parenteff22c28db77594e84f306dc58fa4456d0563009 (diff)
downloadsubsurface-967bd68e6499b133264372ca5c81a9320a79e6c0.tar.gz
Better spacing on the delegate
Makes the location delegate pleasant to the eye. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--qt-ui/modeldelegates.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/qt-ui/modeldelegates.cpp b/qt-ui/modeldelegates.cpp
index 68e62a5cb..0399722ba 100644
--- a/qt-ui/modeldelegates.cpp
+++ b/qt-ui/modeldelegates.cpp
@@ -506,7 +506,7 @@ void LocationFilterDelegate::paint(QPainter *painter, const QStyleOptionViewItem
QString diveSiteCoords(gpsCoords);
free( (void*) gpsCoords);
- fontBigger.setPointSize(fontBigger.pointSize() + 2);
+ fontBigger.setPointSize(fontBigger.pointSize() + 1);
fontBigger.setBold(true);
painter->save();
@@ -533,7 +533,7 @@ void LocationFilterDelegate::paint(QPainter *painter, const QStyleOptionViewItem
QSize LocationFilterDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
{
QFont fontBigger = qApp->font();
- fontBigger.setPointSize(fontBigger.pointSize() + 2);
+ fontBigger.setPointSize(fontBigger.pointSize());
fontBigger.setBold(true);
QFontMetrics fmBigger(fontBigger);
@@ -542,6 +542,9 @@ QSize LocationFilterDelegate::sizeHint(const QStyleOptionViewItem &option, const
QFontMetrics fmSmaller(fontSmaller);
QSize retSize = QStyledItemDelegate::sizeHint(option, index);
- retSize.setHeight(fmBigger.boundingRect("Yellow House").height() + 5 /*spacing*/ + fmSmaller.boundingRect("Yellow House").height());
+ retSize.setHeight(
+ fmBigger.boundingRect("Yellow House").height() + 5 /*spacing*/ +
+ fmSmaller.boundingRect("Yellow House").height());
+
return retSize;
}