summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoahelpers.h
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@theqtcompany.com>2015-12-06 23:26:52 -0800
committerJake Petroules <jake.petroules@theqtcompany.com>2015-12-11 10:55:33 +0000
commit2f549d61ec1d2c95ddcddc69060f16f9d7938f75 (patch)
treeed61491294256f88f33de3b7be555bfa5f491017 /src/plugins/platforms/cocoa/qcocoahelpers.h
parent1bf1d0f493a4561239961dbe582bdc798b69a946 (diff)
Add some functions to convert an NSColor to a QBrush.
NSColors can be quite complex and store patterns, gradients, dynamic system colors that change based on global state (!), etc. QBrush is a better equivalent to it than QColor. Change-Id: I4b66a1ab85342bbb9efcf78011965ec74e5fc738 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoahelpers.h')
-rw-r--r--src/plugins/platforms/cocoa/qcocoahelpers.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoahelpers.h b/src/plugins/platforms/cocoa/qcocoahelpers.h
index affe6e74ff..b83977c7d8 100644
--- a/src/plugins/platforms/cocoa/qcocoahelpers.h
+++ b/src/plugins/platforms/cocoa/qcocoahelpers.h
@@ -46,6 +46,7 @@
//
#include "qt_mac_p.h"
#include <private/qguiapplication_p.h>
+#include <QtGui/qpalette.h>
#include <QtGui/qscreen.h>
QT_BEGIN_NAMESPACE
@@ -75,6 +76,8 @@ QRect qt_mac_toQRect(const NSRect &rect);
QColor qt_mac_toQColor(const NSColor *color);
QColor qt_mac_toQColor(CGColorRef color);
+QBrush qt_mac_toQBrush(CGColorRef color);
+QBrush qt_mac_toQBrush(const NSColor *color, QPalette::ColorGroup colorGroup = QPalette::Normal);
// Creates a mutable shape, it's the caller's responsibility to release.
HIMutableShapeRef qt_mac_QRegionToHIMutableShape(const QRegion &region);