-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbigsurtoolbar.h
27 lines (21 loc) · 1014 Bytes
/
bigsurtoolbar.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef bigsurtoolbar_h
#define bigsurtoolbar_h
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
using QMacToolBar = QToolBar;
#else
#include <QMacToolBar>
#endif
class QMacToolBarBigSur : public QMacToolBar
{
public:
enum BigSurToolbarStyle { // macOS 11.0+ (Big Sur)
StyleAutomatic, // The default value. The style will be determined by the window's given configuration
StyleExpanded, // The toolbar will appear below the window title
StylePreference, // The toolbar will appear below the window title and the items in the toolbar will attempt to have equal widths when possible
StyleUnified, // The window title will appear inline with the toolbar when visible
StyleUnifiedCompact // Same as NSWindowToolbarStyleUnified, but with reduced margins in the toolbar allowing more focus to be on the contents of the window
};
using QMacToolBar::QMacToolBar;
void attachToWindowWithStyle(QWindow *window, BigSurToolbarStyle style);
};
#endif // bigsurtoolbar_h