summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2014-04-02 21:30:10 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-04-02 12:44:49 -0700
commit5cec965cb7bea3abbb12823404b6a7cfcfb57225 (patch)
tree1acaccfee807022fdebe658328f94f1a65a04d1b /qt-ui
parent4722104e1c762a01b521f0dce1b2cbb9bf76891e (diff)
downloadsubsurface-5cec965cb7bea3abbb12823404b6a7cfcfb57225.tar.gz
Make divelist header corrections Mac specific
The +10 pixels fix was introduced to fix some layout issue on Mac ways back, but it breaks things on Android. This makes sure this only gets applied when build for mac. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/divelistview.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/qt-ui/divelistview.cpp b/qt-ui/divelistview.cpp
index d9f5eb93b..6e2024a2d 100644
--- a/qt-ui/divelistview.cpp
+++ b/qt-ui/divelistview.cpp
@@ -42,8 +42,11 @@ DiveListView::DiveListView(QWidget *parent) : QTreeView(parent), mouseClickSelec
setSortingEnabled(false);
setContextMenuPolicy(Qt::DefaultContextMenu);
header()->setContextMenuPolicy(Qt::ActionsContextMenu);
+#ifdef Q_OS_MAC
+ // Fixes for the layout needed for mac
const QFontMetrics metrics(defaultModelFont());
header()->setMinimumHeight(metrics.height() + 10);
+#endif
header()->setStretchLastSection(true);
QAction *showSearchBox = new QAction(tr("Show Search Box"), this);
showSearchBox->setShortcut(Qt::CTRL + Qt::Key_F);