Do not overwrite background color with system background color if this color is white

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35295 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2010-09-06 10:26:58 +00:00
parent ef3c8c10e1
commit 4f45a35918

View File

@ -80,9 +80,14 @@ QColor ColorCache::get(Color const & color, bool syscolors) const
const_cast<ColorCache *>(this)->init();
if (color <= Color_ignore && color.mergeColor == Color_ignore) {
QPalette::ColorRole cr = role(color.baseColor);
if (syscolors && cr != NoRole)
return pal_.brush(QPalette::Active, cr).color();
if (syscolors && cr != NoRole) {
static QColor white = Qt::white;
QColor c = pal_.brush(QPalette::Active, cr).color();
if (cr == QPalette::Base && c == white)
return lcolors_[color.baseColor];
else
return c;
} else
return lcolors_[color.baseColor];
}
if (color.mergeColor != Color_ignore) {