projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge all stylesheet formats with the base format
[quassel.git]
/
src
/
uisupport
/
uistyle.cpp
diff --git
a/src/uisupport/uistyle.cpp
b/src/uisupport/uistyle.cpp
index
6cfff50
..
1a478f2
100644
(file)
--- 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...
}
// Now initialize the mapping between FormatCodes and FormatTypes...
- _formatCodes["%O"] =
Non
e;
+ _formatCodes["%O"] =
Bas
e;
_formatCodes["%B"] = Bold;
_formatCodes["%S"] = Italic;
_formatCodes["%U"] = Underline;
_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());
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
}
qApp->setStyleSheet(styleSheet); // pass the remaining sections to the application
}