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/qstylehelper.cpp | |
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/qstylehelper.cpp')
-rw-r--r-- | src/widgets/styles/qstylehelper.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/widgets/styles/qstylehelper.cpp b/src/widgets/styles/qstylehelper.cpp index 6be07a3f45..49e406a8b7 100644 --- a/src/widgets/styles/qstylehelper.cpp +++ b/src/widgets/styles/qstylehelper.cpp @@ -47,6 +47,7 @@ #include <qmath.h> #include <qscrollbar.h> #include <qabstractscrollarea.h> +#include <qwindow.h> #include "qstylehelper_p.h" #include <qstringbuilder.h> @@ -397,5 +398,14 @@ QColor backgroundColor(const QPalette &pal, const QWidget* widget) return widget->parentWidget()->parentWidget()->palette().color(QPalette::Base); return pal.color(QPalette::Base); } + +QWindow *styleObjectWindow(QObject *so) +{ + if (so) + return so->property("_q_styleObjectWindow").value<QWindow *>(); + + return 0; +} + } QT_END_NAMESPACE |