From 5cec965cb7bea3abbb12823404b6a7cfcfb57225 Mon Sep 17 00:00:00 2001 From: Anton Lundin Date: Wed, 2 Apr 2014 21:30:10 +0200 Subject: 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 Signed-off-by: Dirk Hohndel --- qt-ui/divelistview.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'qt-ui') 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); -- cgit v1.2.3-70-g09d2