if (tb && tb->isMovable())
toolbarsMovable_ = true;
}
+#if QT_VERSION >= 0x050200
+ // set unified mac toolbars only when not movable as recommended:
+ // https://doc.qt.io/qt-5/qmainwindow.html#unifiedTitleAndToolBarOnMac-prop
+ setUnifiedTitleAndToolBarOnMac(!toolbarsMovable_);
+#endif
}
dr.setMessage(_("Toolbars unlocked."));
else
dr.setMessage(_("Toolbars locked."));
- } else if (GuiToolbar * t = toolbar(name)) {
+ } else if (GuiToolbar * tb = toolbar(name))
// toggle current toolbar movablity
- t->movable();
- // update lock (all) toolbars positions
- updateLockToolbars();
- }
+ tb->movable();
+ // update lock (all) toolbars positions
+ updateLockToolbars();
break;
}