projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Allow reloading stylesheets at runtime
[quassel.git]
/
src
/
uisupport
/
qssparser.cpp
diff --git
a/src/uisupport/qssparser.cpp
b/src/uisupport/qssparser.cpp
index
52ce79a
..
b0e84b8
100644
(file)
--- a/
src/uisupport/qssparser.cpp
+++ b/
src/uisupport/qssparser.cpp
@@
-127,7
+127,7
@@
void QssParser::parseChatLineData(const QString &decl, const QString &contents)
}
}
}
}
- _formats[fmtType]
= format
;
+ _formats[fmtType]
.merge(format)
;
}
quint64 QssParser::parseFormatType(const QString &decl) {
}
quint64 QssParser::parseFormatType(const QString &decl) {
@@
-212,6
+212,8
@@
quint64 QssParser::parseFormatType(const QString &decl) {
quint64 labeltype = 0;
if(condValue == "highlight")
labeltype = UiStyle::Highlight;
quint64 labeltype = 0;
if(condValue == "highlight")
labeltype = UiStyle::Highlight;
+ else if(condValue == "selected")
+ labeltype = UiStyle::Selected;
else {
qWarning() << Q_FUNC_INFO << tr("Invalid message label: %1").arg(condValue);
return UiStyle::Invalid;
else {
qWarning() << Q_FUNC_INFO << tr("Invalid message label: %1").arg(condValue);
return UiStyle::Invalid;
@@
-486,7
+488,7
@@
QGradientStops QssParser::parseGradientStops(const QString &str_) {
/******** Font Properties ********/
void QssParser::parseFont(const QString& value, QTextCharFormat* format) {
/******** Font Properties ********/
void QssParser::parseFont(const QString& value, QTextCharFormat* format) {
- QRegExp rx("((?:(?:normal|italic|oblique|bold|100|200|300|400|500|600|700|800|900) ){0,2}) ?(\\d+)(pt|px)? \"(.*)\"");
+ QRegExp rx("((?:(?:normal|italic|oblique|
underline|
bold|100|200|300|400|500|600|700|800|900) ){0,2}) ?(\\d+)(pt|px)? \"(.*)\"");
if(!rx.exactMatch(value)) {
qWarning() << Q_FUNC_INFO << tr("Invalid font specification: %1").arg(value);
return;
if(!rx.exactMatch(value)) {
qWarning() << Q_FUNC_INFO << tr("Invalid font specification: %1").arg(value);
return;
@@
-497,6
+499,8
@@
void QssParser::parseFont(const QString& value, QTextCharFormat* format) {
foreach(QString prop, proplist) {
if(prop == "italic")
format->setFontItalic(true);
foreach(QString prop, proplist) {
if(prop == "italic")
format->setFontItalic(true);
+ else if(prop == "underline")
+ format->setFontUnderline(true);
//else if(prop == "oblique")
// format->setStyle(QFont::StyleOblique);
else if(prop == "bold")
//else if(prop == "oblique")
// format->setStyle(QFont::StyleOblique);
else if(prop == "bold")
@@
-520,6
+524,8
@@
void QssParser::parseFontStyle(const QString& value, QTextCharFormat* format) {
format->setFontItalic(false);
else if(value == "italic")
format->setFontItalic(true);
format->setFontItalic(false);
else if(value == "italic")
format->setFontItalic(true);
+ else if(value == "underline")
+ format->setFontUnderline(true);
//else if(value == "oblique")
// format->setStyle(QFont::StyleOblique);
else {
//else if(value == "oblique")
// format->setStyle(QFont::StyleOblique);
else {