X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Fuistyle.cpp;h=c81131f8b17ea0c21ecd69c2803264d91f9deacc;hp=e14208b467a1ae19758b7964e42f80ec5ccb5f3f;hb=1cad7d10240a398c11af0043720d675e631f016f;hpb=70706ff642683d03ff091cab25d984ec7d9612de diff --git a/src/uisupport/uistyle.cpp b/src/uisupport/uistyle.cpp index e14208b4..c81131f8 100644 --- a/src/uisupport/uistyle.cpp +++ b/src/uisupport/uistyle.cpp @@ -23,15 +23,17 @@ UiStyle::UiStyle() { // Default format QTextCharFormat def; - def.setForeground(QBrush("black")); + def.setForeground(QBrush("#000000")); def.setFont(QFont("Verdana",9)); _formats = QVector(NumFormatTypes, def); // Initialize color codes according to mIRC "standard" QStringList colors; - colors << "white" << "black" << "navy" << "green" << "red" << "maroon" << "purple" << "orange"; - colors << "yellow" << "lime" << "teal" << "aqua" << "royalblue" << "fuchsia" << "grey" << "silver"; + //colors << "white" << "black" << "navy" << "green" << "red" << "maroon" << "purple" << "orange"; + //colors << "yellow" << "lime" << "teal" << "aqua" << "royalblue" << "fuchsia" << "grey" << "silver"; + colors << "#ffffff" << "#000000" << "#000080" << "#008000" << "#ff0000" << "#800000" << "#800080" << "#ffa500"; + colors << "#ffff00" << "#00ff00" << "#008080" << "#00ffff" << "#4169E1" << "#ff00ff" << "#808080" << "#c0c0c0"; // Now initialize the mapping between FormatCodes and FormatTypes... _formatCodes["%O"] = None; @@ -158,11 +160,11 @@ UiStyle::StyledText UiStyle::styleString(QString s) { fmtList.clear(); fmtList.append(None); curFmtRng.format = format(None); fgCol = bgCol = -1; - length = 1; + length = 2; } else if(s[pos+1] == 'R') { // reverse // TODO: implement reverse formatting - length = 1; + length = 2; } else { // all others are toggles QString code = QString("%") + s[pos+1]; if(s[pos+1] == 'D') code += s[pos+2];