UI Nits: Mac and QT5 Toolbar

Fixed up to make the toolbar on a build on QT5 look a little
more like one on QT4 where they still have unified toolbar
and title support.

We should look at managing via the native NSToolbar in the
near future since Digia have made it clear that they are not
keen to reintroduce unified toolbars in QT5.
This commit is contained in:
Mark Liversedge
2013-12-29 14:49:18 +00:00
parent bd37801225
commit 69a4956d61

View File

@@ -231,6 +231,17 @@ MainWindow::MainWindow(const QDir &home)
* Mac Toolbar
*--------------------------------------------------------------------*/
#ifdef Q_OS_MAC
#if QT_VERSION > 0x50000
head = addToolBar(context->athlete->cyclist);
head->setContentsMargins(20,0,20,0);
head->setFloatable(false);
head->setMovable(false);
// widgets
QWidget *macAnalButtons = new QWidget(this);
macAnalButtons->setContentsMargins(20,5,20,0);
#else
setUnifiedTitleAndToolBarOnMac(true);
head = addToolBar(context->athlete->cyclist);
head->setContentsMargins(0,0,0,0);
@@ -239,6 +250,8 @@ MainWindow::MainWindow(const QDir &home)
QWidget *macAnalButtons = new QWidget(this);
macAnalButtons->setContentsMargins(0,0,20,0);
#endif
// lhs buttons
QHBoxLayout *lb = new QHBoxLayout(macAnalButtons);
lb->setContentsMargins(0,0,10,8);