Don't merge all custom formats with the base format
authorManuel Nickschas <sputnick@quassel-irc.org>
Wed, 12 Aug 2009 07:09:23 +0000 (09:09 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Wed, 12 Aug 2009 07:09:23 +0000 (09:09 +0200)
This was needed at some point, but now it just screws up things. Should make
combinations (like "color and bold") work again properly.

src/uisupport/uistyle.cpp

index f0c7e9f..75524db 100644 (file)
@@ -102,14 +102,9 @@ void UiStyle::loadStyleSheet() {
     QssParser parser;
     parser.processStyleSheet(styleSheet);
     QApplication::setPalette(parser.palette());
-    _uiStylePalette = parser.uiStylePalette();
 
-    QTextCharFormat baseFmt = parser.formats().value(Base);
-    foreach(quint64 fmtType, parser.formats().keys()) {
-      QTextCharFormat fmt = baseFmt;
-      fmt.merge(parser.formats().value(fmtType));
-      _formats[fmtType] = fmt;
-    }
+    _uiStylePalette = parser.uiStylePalette();
+    _formats = parser.formats();
     _listItemFormats = parser.listItemFormats();
 
     styleSheet = styleSheet.trimmed();