[PATCH] Make divelist header corrections Mac specific
Anton Lundin
glance at acc.umu.se
Wed Apr 2 12:30:10 PDT 2014
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 at acc.umu.se>
---
qt-ui/divelistview.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/qt-ui/divelistview.cpp b/qt-ui/divelistview.cpp
index d9f5eb9..6e2024a 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);
--
1.9.1
More information about the subsurface
mailing list