X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Fuistyle.cpp;h=017fee24689efd5e6953fe4587bafd7d5d1c4b57;hp=f0ff8c06e8b3786a970999a93c48ef2a70cb1123;hb=5ee9c75fb9301473d40ca1f219201950529096f7;hpb=8699dd758516d0ded076811e8ea656adc95e69d0 diff --git a/src/uisupport/uistyle.cpp b/src/uisupport/uistyle.cpp index f0ff8c06..017fee24 100644 --- a/src/uisupport/uistyle.cpp +++ b/src/uisupport/uistyle.cpp @@ -25,7 +25,8 @@ UiStyle::UiStyle(const QString &settingsKey) : _settingsKey(settingsKey) { // Default format QTextCharFormat def; def.setForeground(QBrush("#000000")); - def.setFont(QFont("Mono",12)); + //def.setFont(QFont("Courier", 10)); + def.font().setStyleHint(QFont::TypeWriter); _defaultFormats = QVector(NumFormatTypes, def); _customFormats = QVector(NumFormatTypes, QTextFormat().toCharFormat()); @@ -77,6 +78,9 @@ UiStyle::UiStyle(const QString &settingsKey) : _settingsKey(settingsKey) { QTextCharFormat fgf, bgf; fgf.setForeground(QBrush(QColor(colors[i]))); setFormat((FormatType)(FgCol00 + i), fgf, Settings::Default); bgf.setBackground(QBrush(QColor(colors[i]))); setFormat((FormatType)(BgCol00 + i), bgf, Settings::Default); + //FIXME fix the havoc caused by ColorSettingsPage + setFormat((FormatType)(FgCol00 + i), fgf, Settings::Custom); + setFormat((FormatType)(BgCol00 + i), bgf, Settings::Custom); } // Set a few more standard formats @@ -156,6 +160,8 @@ UiStyle::StyledText UiStyle::styleString(QString s) { length = 4; } else { int color = 10 * s[pos+4].digitValue() + s[pos+5].digitValue(); + //TODO: use 99 as transparent color (re mirc color "standard") + color &= 0x0f; int *colptr; FormatType coltype; if(s[pos+3] == 'f') { // foreground colptr = &fgCol; coltype = FgCol00;