From c870a4980ba79f784781e75b89ec537f1ec343ac Mon Sep 17 00:00:00 2001 From: Manuel Nickschas Date: Wed, 24 Jun 2009 09:44:21 +0200 Subject: [PATCH] Parse format parameters in QSS Adds [format="$fmt"], where $fmt can be one of "bold", "italic", "underline" and "reverse" corresponding to the respective mIRC format codes. --- src/uisupport/qssparser.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/uisupport/qssparser.cpp b/src/uisupport/qssparser.cpp index c25bceb8..585b769d 100644 --- a/src/uisupport/qssparser.cpp +++ b/src/uisupport/qssparser.cpp @@ -243,6 +243,20 @@ quint64 QssParser::parseFormatType(const QString &decl) { } fmtType |= val << 48; } + } else if(condName == "format") { + if(condValue == "bold") + fmtType |= UiStyle::Bold; + if(condValue == "italic") + fmtType |= UiStyle::Italic; + if(condValue == "underline") + fmtType |= UiStyle::Underline; + if(condValue == "reverse") + fmtType |= UiStyle::Reverse; + else { + qWarning() << Q_FUNC_INFO << tr("Invalid format name: %1").arg(condValue); + return UiStyle::Invalid; + } + } // TODO: colors } -- 2.20.1