X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Fuistyle.cpp;h=1a478f28835a0a599a88670b0cfeb7615964389e;hp=6cfff50a433653465f621c5987c783f571b6c62c;hb=d33a73406dc7b2a41c97d169b865836f6fce4980;hpb=fdf69d69f0dda76a65a27ce7059b7b86696ff79c;ds=sidebyside diff --git a/src/uisupport/uistyle.cpp b/src/uisupport/uistyle.cpp index 6cfff50a..1a478f28 100644 --- a/src/uisupport/uistyle.cpp +++ b/src/uisupport/uistyle.cpp @@ -38,7 +38,7 @@ UiStyle::UiStyle(QObject *parent) : QObject(parent) { } // Now initialize the mapping between FormatCodes and FormatTypes... - _formatCodes["%O"] = None; + _formatCodes["%O"] = Base; _formatCodes["%B"] = Bold; _formatCodes["%S"] = Italic; _formatCodes["%U"] = Underline; @@ -81,7 +81,13 @@ void UiStyle::loadStyleSheet() { QssParser parser; parser.processStyleSheet(styleSheet); QApplication::setPalette(parser.palette()); - _formatCache = parser.formats(); + + QTextCharFormat baseFmt = parser.formats().value(Base); + foreach(quint64 fmtType, parser.formats().keys()) { + QTextCharFormat fmt = baseFmt; + fmt.merge(parser.formats().value(fmtType)); + _formatCache[fmtType] = fmt; + } qApp->setStyleSheet(styleSheet); // pass the remaining sections to the application }