X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=gui%2Fstyle.cpp;h=54889868dfbf79936cd8ace762402fcfea215812;hp=62105529ec16e3e8a77de6425f1f7b000ffa794e;hb=6fc26e28a07a2b6bbc60ee786514a802e628d6d3;hpb=2a068c11e76c7b34afb64d443dbb1afd2e208aaa diff --git a/gui/style.cpp b/gui/style.cpp index 62105529..54889868 100644 --- a/gui/style.cpp +++ b/gui/style.cpp @@ -40,6 +40,7 @@ void Style::init() { colors["15"] = QColor("silver"); QTextCharFormat def; + def.setForeground(QBrush("black")); def.setFont(QFont("Verdana",9)); formats["default"] = def; @@ -49,7 +50,7 @@ void Style::init() { formats["%B"] = bold; // %O - 0x0f - plain - formats["%O"] = QTextCharFormat(); + formats["%O"] = def; // %R - 0x12 - reverse // -- - 0x16 - reverse @@ -115,6 +116,11 @@ void Style::init() { QTextCharFormat mode; mode.setForeground(QBrush("steelblue")); formats["%Dm"] = mode; + // %Da - ctcp action + QTextCharFormat action; + action.setFontItalic(true); + action.setForeground(QBrush("darkmagenta")); + formats["%Da"] = action; // %DT - timestamp QTextCharFormat ts; @@ -220,6 +226,7 @@ Style::FormattedString Style::internalToFormatted(QString s) { } } else if(s[i] == 'O') { foreach(QString key, toggles.keys()) { + if(key == "default") continue; sf.formats[toggles[key]].length = j - sf.formats[toggles[key]].start; toggles.remove(key); }