X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fuisupport%2Fuistyle.cpp;h=75524db86c84dcb65ef6a30013d204465420bc66;hb=3f354bcce2cecfe88a46de90cbf94ffd1bc7c506;hp=12c388921fd8e34589f2e388f4e70a37b75ae8c5;hpb=2cf0c7d0b1fcbab239649c6b5cbdd54f362fb7a8;p=quassel.git diff --git a/src/uisupport/uistyle.cpp b/src/uisupport/uistyle.cpp index 12c38892..75524db8 100644 --- a/src/uisupport/uistyle.cpp +++ b/src/uisupport/uistyle.cpp @@ -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(); @@ -354,7 +349,7 @@ void UiStyle::mergeFormat(QTextCharFormat &fmt, quint32 ftype, quint64 label) { // URL if(ftype & Url) - mergeSubElementFormat(fmt, ftype & Url, label); + mergeSubElementFormat(fmt, ftype & (Url | 0x000000ff), label); } // Merge a subelement format into an existing message format @@ -457,10 +452,10 @@ UiStyle::StyledString UiStyle::styleString(const QString &s_, quint32 baseFormat color &= 0x0f; if(s[pos+3] == 'f') { curfmt &= 0xf0ffffff; - curfmt |= (color << 24) | 0x00400000; + curfmt |= (quint32)(color << 24) | 0x00400000; } else { curfmt &= 0x0fffffff; - curfmt |= (color << 28) | 0x00800000; + curfmt |= (quint32)(color << 28) | 0x00800000; } length = 6; }