X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fuisupport%2Fuistyle.cpp;h=8c3afaab4dc470a0d37a3882668c27e0db272a48;hb=48979ba2c343ab50ae93a8bb1c355ce79115bd4f;hp=3fc53bd7332c0ca059e9de7eb13ebfe3b3a6c050;hpb=85cc2479ab9bd85b33f4d8494b1eeeb46a6a1049;p=quassel.git diff --git a/src/uisupport/uistyle.cpp b/src/uisupport/uistyle.cpp index 3fc53bd7..8c3afaab 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; @@ -104,8 +106,8 @@ QString UiStyle::formatCode(FormatType ftype) const { return _formatCodes.key(ftype); } -UiStyle::StyledString UiStyle::styleString(QString s) { - StyledString result; +UiStyle::StyledText UiStyle::styleString(QString s) { + StyledText result; QList fmtList; fmtList.append(None); QTextLayout::FormatRange curFmtRng;