From: Jean-Marc Lasgouttes Date: Mon, 6 Sep 2010 10:26:58 +0000 (+0000) Subject: Do not overwrite background color with system background color if this color is white X-Git-Tag: 2.0.0~2680 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=4f45a35918bbb1cbf44179d4699031e1220f6323;p=features.git 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 --- diff --git a/src/frontends/qt4/ColorCache.cpp b/src/frontends/qt4/ColorCache.cpp index 5b0e56d32a..66b10c1df9 100644 --- a/src/frontends/qt4/ColorCache.cpp +++ b/src/frontends/qt4/ColorCache.cpp @@ -80,9 +80,14 @@ QColor ColorCache::get(Color const & color, bool syscolors) const const_cast(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(); - else + 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) {