From e773b0486a4784994a900c03a2620baf2775ac9d Mon Sep 17 00:00:00 2001 From: Norwegian Rock Cat Date: Tue, 24 Mar 2009 10:32:49 +0100 Subject: 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 --- src/gui/kernel/qt_mac.cpp | 2 ++ 1 file changed, 2 insertions(+) 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); -- cgit v0.12