diff options
author | Gabriel de Dietrich <gabriel.dedietrich@qt.io> | 2017-05-17 13:15:18 -0700 |
---|---|---|
committer | Gabriel de Dietrich <gabriel.dedietrich@qt.io> | 2017-06-01 17:56:12 +0000 |
commit | 83cbb314609250131d45b14678bbefda8b76bcb1 (patch) | |
tree | 6a1daa6fbbb05858391359a7779a8b518f7b339b /src/plugins/styles/mac/qmacstyle_mac_p_p.h | |
parent | 8b6d6d4832ea8ed5f9857d5ddf06408ee9d0b4e0 (diff) |
QMacStyle: Remove HITheme APIs to render QProgresssBar
We use NSProgressIndicator in a similar fashion as we do
with NSScroller for transient scrollers.
Also changed the signature of QCocoaDrawRectBlock.
Change-Id: I0fef8e327494fb557af2c2bab2aafa57c2e69564
Reviewed-by: Morten Johan Sørvig <morten.sorvig@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.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/styles/mac/qmacstyle_mac_p_p.h b/src/plugins/styles/mac/qmacstyle_mac_p_p.h index 2c701713c8..03282e1bbc 100644 --- a/src/plugins/styles/mac/qmacstyle_mac_p_p.h +++ b/src/plugins/styles/mac/qmacstyle_mac_p_p.h @@ -141,6 +141,8 @@ enum QCocoaWidgetKind { QCocoaComboBox, // Editable QComboBox QCocoaDisclosureButton, // Disclosure triangle, like in QTreeView QCocoaPopupButton, // Non-editable QComboBox + QCocoaProgressIndicator, + QCocoaIndeterminateProgressIndicator, QCocoaPullDownButton, // QPushButton with menu QCocoaPushButton, QCocoaRadioButton, @@ -153,7 +155,7 @@ enum QCocoaWidgetKind { typedef QPair<QCocoaWidgetKind, QStyleHelper::WidgetSizePolicy> QCocoaWidget; -typedef void (^QCocoaDrawRectBlock)(NSRect, CGContextRef); +typedef void (^QCocoaDrawRectBlock)(CGContextRef, const CGRect &); #define SIZE(large, small, mini) \ (controlSize == QStyleHelper::SizeLarge ? (large) : controlSize == QStyleHelper::SizeSmall ? (small) : (mini)) @@ -233,6 +235,8 @@ public: void setupNSGraphicsContext(CGContextRef cg, bool flipped) const; void restoreNSGraphicsContext(CGContextRef cg) const; + void setupVerticalInvertedXform(CGContextRef cg, bool reverse, bool vertical, const CGRect &rect) const; + void drawNSViewInRect(QCocoaWidget widget, NSView *view, const QRect &rect, QPainter *p, bool isQWidget = true, QCocoaDrawRectBlock drawRectBlock = nil) const; void resolveCurrentNSView(QWindow *window); |