From 8633e1a7b48f71e91f81ef5c667d6eb7a8db3adb Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Fri, 26 Jan 2018 13:54:23 -0800 Subject: 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 --- src/plugins/styles/mac/qmacstyle_mac_p_p.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/plugins/styles/mac/qmacstyle_mac_p_p.h') 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 -- cgit v1.2.3