X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fuisupport%2Fuistyle.cpp;h=cbf2eca81b1aa0112d331f7bffd36eb72d0c66c3;hb=906789f761e5d1b37b46b5a05a2f649e28900e36;hp=79f23c6727d56e53015b9e94d1fa371270defdbb;hpb=682c6e31834a863c4c78b6dfd5f830c72a6b665d;p=quassel.git diff --git a/src/uisupport/uistyle.cpp b/src/uisupport/uistyle.cpp index 79f23c67..cbf2eca8 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("Courier", 10)); + //def.setFont(QFont("Mono", 10)); + def.font().setFixedPitch(true); def.font().setStyleHint(QFont::TypeWriter); _defaultFormats = QVector(NumFormatTypes, def); _customFormats = QVector(NumFormatTypes, QTextFormat().toCharFormat()); @@ -130,9 +131,7 @@ QString UiStyle::formatCode(FormatType ftype) const { } UiStyle::StyledText UiStyle::styleString(const QString &_s) { - QString s = _s; // we can't use call-by-value since this seems to maybe screw up Qt's implicit sharing somehow - // at least invalid formats are created if we do that - if(s.startsWith(" ")) {}; // and yet some other stupid no-op that seems to fix the font issue on some machines... -_- + QString s = _s; StyledText result; QList fmtList; fmtList.append(None); @@ -240,5 +239,3 @@ QTextCharFormat UiStyle::mergedFormat(QList formatList) { } return fmt; } - -