diff options
author | Norwegian Rock Cat <qt-info@nokia.com> | 2009-03-24 09:32:49 (GMT) |
---|---|---|
committer | Norwegian Rock Cat <qt-info@nokia.com> | 2009-03-24 09:32:49 (GMT) |
commit | e773b0486a4784994a900c03a2620baf2775ac9d (patch) | |
tree | 017462ff83fa7af86027a2d0b91c42eae329a5e7 /src/gui/kernel/qt_mac.cpp | |
parent | 4fe23655d3fbf141e3a2c0406c7d1a929166c30f (diff) | |
download | Qt-e773b0486a4784994a900c03a2620baf2775ac9d.zip Qt-e773b0486a4784994a900c03a2620baf2775ac9d.tar.gz Qt-e773b0486a4784994a900c03a2620baf2775ac9d.tar.bz2 |
Handle monochrome CGColors as well.
It seems that snow leopard is storing some colors as grayscale. This
means that we need to handle them or otherwise things go very black.
It's an easy case to do as well, so just do it.
Reviewed-by: Bradley T. Hughes
Diffstat (limited to 'src/gui/kernel/qt_mac.cpp')
-rw-r--r-- | src/gui/kernel/qt_mac.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/kernel/qt_mac.cpp b/src/gui/kernel/qt_mac.cpp index b462b13..4703475 100644 --- a/src/gui/kernel/qt_mac.cpp +++ b/src/gui/kernel/qt_mac.cpp @@ -93,6 +93,8 @@ static QColor qcolorFromCGColor(CGColorRef cgcolor) pc.setRgbF(components[0], components[1], components[2], components[3]); } else if (model == kCGColorSpaceModelCMYK) { pc.setCmykF(components[0], components[1], components[2], components[3]); + } else if (model == kCGColorSpaceModelMonochrome) { + pc.setRgbF(components[0], components[0], components[0], components[1]); } else { // Colorspace we can't deal with. qWarning("Qt: qcolorFromCGColor: cannot convert from colorspace model: %d", model); |