From 6f3b59bfe4d22f8c717f1727816d3f8e775996be Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Mon, 15 May 2017 13:29:07 -0700 Subject: QMacStyle: Use NSStepperCell for QSpinBox buttons Includes painting and subcontrol rectangles. Change-Id: I9a4c704bdea4f20f8dca94de24063f3e14dbaf91 Reviewed-by: Jake Petroules --- src/plugins/styles/mac/qmacstyle_mac_p_p.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (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 f312adac52..3aacd14e60 100644 --- a/src/plugins/styles/mac/qmacstyle_mac_p_p.h +++ b/src/plugins/styles/mac/qmacstyle_mac_p_p.h @@ -118,6 +118,7 @@ Q_FORWARD_DECLARE_MUTABLE_CG_TYPE(CGContext); Q_FORWARD_DECLARE_OBJC_CLASS(NSView); +Q_FORWARD_DECLARE_OBJC_CLASS(NSCell); Q_FORWARD_DECLARE_OBJC_CLASS(NSButtonCell); Q_FORWARD_DECLARE_OBJC_CLASS(QT_MANGLE_NAMESPACE(NotificationReceiver)); @@ -147,7 +148,8 @@ enum QCocoaWidgetKind { QCocoaHorizontalScroller, QCocoaVerticalScroller, QCocoaHorizontalSlider, - QCocoaVerticalSlider + QCocoaVerticalSlider, + QCocoaStepper // QSpinBox buttons }; typedef QPair QCocoaWidget; @@ -227,6 +229,7 @@ public: void setAutoDefaultButton(QObject *button) const; NSView *cocoaControl(QCocoaWidget widget) const; + NSCell *cocoaCell(QCocoaWidget widget) const; void setupNSGraphicsContext(CGContextRef cg, bool flipped) const; void restoreNSGraphicsContext(CGContextRef cg) const; @@ -252,6 +255,7 @@ public: NSButtonCell *indicatorBranchButtonCell; NSView *backingStoreNSView; QHash cocoaControls; + QHash cocoaCells; }; QT_END_NAMESPACE -- cgit v1.2.3