summaryrefslogtreecommitdiffstats
path: root/src/plugins/styles/mac/qmacstyle_mac_p_p.h
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dedietrich@qt.io>2018-01-26 13:54:23 -0800
committerGabriel de Dietrich <gabriel.dedietrich@qt.io>2018-02-05 19:44:50 +0000
commit8633e1a7b48f71e91f81ef5c667d6eb7a8db3adb (patch)
tree73b75bbe93cd15eb5a836b45837e465ff192c071 /src/plugins/styles/mac/qmacstyle_mac_p_p.h
parent80515c811a4c455d7f2fb9ded751b2406b08d045 (diff)
QMacStyle: QMdiSubWindow is now HITheme-free
There are a couple issues. Because the actual class for the buttons returned by +[NSWindow standardWindowButton: forStyleMask:] is private, we can't fully configure them as we could with HITheme. Therefore, we don't get the mouse hovered state and the zoom button will show the fullscreen arrow instead of the '+' icon. Hopefully, QMdiArea will go the way of the dodo soon enough. It is not a thing on macOS and it has been replaced by tabbed windows UI on most desktop apps. Change-Id: Ia581f72611ad0224f42657afbc4d9f94bf5e5a3a Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Diffstat (limited to 'src/plugins/styles/mac/qmacstyle_mac_p_p.h')
-rw-r--r--src/plugins/styles/mac/qmacstyle_mac_p_p.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/plugins/styles/mac/qmacstyle_mac_p_p.h b/src/plugins/styles/mac/qmacstyle_mac_p_p.h
index 8eee80ce50..cf2609e9ec 100644
--- a/src/plugins/styles/mac/qmacstyle_mac_p_p.h
+++ b/src/plugins/styles/mac/qmacstyle_mac_p_p.h
@@ -182,6 +182,7 @@ class QMacStylePrivate : public QCommonStylePrivate
Q_DECLARE_PUBLIC(QMacStyle)
public:
enum CocoaControlType {
+ NoControl, // For when there's no such a control in Cocoa
Box, // QGroupBox
Button_CheckBox,
Button_Disclosure, // Disclosure triangle, like in QTreeView
@@ -189,6 +190,9 @@ public:
Button_PullDown, // QPushButton with menu
Button_PushButton,
Button_RadioButton,
+ Button_WindowClose,
+ Button_WindowMiniaturize,
+ Button_WindowZoom,
ComboBox, // Editable QComboBox
ProgressIndicator_Determinate,
ProgressIndicator_Indeterminate,
@@ -272,6 +276,10 @@ public:
void drawFocusRing(QPainter *p, const QRect &targetRect, int hMargin, int vMargin, qreal radius = 0) const;
void drawFocusRing(QPainter *p, const QRect &targetRect, int hMargin, int vMargin, const CocoaControl &cw) const;
+ QPainterPath windowPanelPath(const QRectF &r) const;
+
+ CocoaControlType windowButtonCocoaControl(QStyle::SubControl sc) const;
+
#if QT_CONFIG(tabbar)
void tabLayout(const QStyleOptionTab *opt, const QWidget *widget, QRect *textRect, QRect *iconRect) const;
#endif