case Color_selectiontext:
return QPalette::HighlightedText;
break;
+ case Color_urllabel:
+ case Color_urltext:
+ return QPalette::Link;
default:
return NoRole;
}
if (!initialized_)
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();
- else
+ QPalette::ColorRole const cr = role(color.baseColor);
+ if (syscolors && cr != NoRole) {
+ static QColor const white = Qt::white;
+ QColor const 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) {
bool ColorCache::isSystem(ColorCode const color) const
{
- return role(color) != NoRole;
+ QPalette::ColorRole const cr = role(color);
+ if (cr == QPalette::Base) {
+ static QColor const white = Qt::white;
+ return pal_.brush(QPalette::Active, cr).color() != white;
+ } else
+ return cr != NoRole;
}