diff options
author | Gabriel de Dietrich <gabriel.dedietrich@digia.com> | 2014-09-04 19:11:23 +0200 |
---|---|---|
committer | Gabriel de Dietrich <gabriel.dedietrich@digia.com> | 2014-09-11 11:53:53 +0200 |
commit | 982b9b7ec2441103b100c09cfcca4755d67fe839 (patch) | |
tree | 9b1a11f3b5feca720a448b5654fe7c2423406a98 /src/widgets/styles/qmacstyle_mac_p_p.h | |
parent | c1b46b98edc2f12fb7c596660777debed9191f52 (diff) |
QMacStyle: Use NSView rendering for some inactive widgets on 10.10
Right now, we use them for inactive non-editable combo box, check
box, and radio button only on Yosemite. We keep as much as possible
the previous behavior on older versions.
In addition, we add a way for QQuickStyleItem to specify the window
the item is on. This is currently without effect, since we don't
seem to take the inactive window state into account.
Task-number: QTBUG-40833
Change-Id: I2fb2a99e6adf1972f881195b79b07ce85a960273
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Diffstat (limited to 'src/widgets/styles/qmacstyle_mac_p_p.h')
-rw-r--r-- | src/widgets/styles/qmacstyle_mac_p_p.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/widgets/styles/qmacstyle_mac_p_p.h b/src/widgets/styles/qmacstyle_mac_p_p.h index 6f42f0ea79..3bbff61340 100644 --- a/src/widgets/styles/qmacstyle_mac_p_p.h +++ b/src/widgets/styles/qmacstyle_mac_p_p.h @@ -145,6 +145,7 @@ class QMacStylePrivate : public QCommonStylePrivate Q_DECLARE_PUBLIC(QMacStyle) public: QMacStylePrivate(); + ~QMacStylePrivate(); // Ideally these wouldn't exist, but since they already exist we need some accessors. static const int PushButtonLeftOffset; @@ -194,6 +195,11 @@ public: void setAutoDefaultButton(QObject *button) const; + NSView *buttonOfKind(ThemeButtonKind kind) const; + + void drawNSViewInRect(NSView *view, const QRect &rect, QPainter *p) const; + void resolveCurrentNSView(QWindow *window); + public: mutable QPointer<QObject> pressedButton; mutable QPointer<QObject> defaultButton; @@ -212,6 +218,8 @@ public: void *nsscroller; #endif void *indicatorBranchButtonCell; + NSView *backingStoreNSView; + QHash<ThemeButtonKind , NSView *> buttons; }; QT_END_NAMESPACE |