mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-14 08:38:45 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user