X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fuisupport%2Fuistyle.cpp;h=94c9742bef3b9e57042922eb82cddca07006cb63;hb=09e9b338ecb81a79eddc38b03daef7c31dcfe493;hp=e04a0bd0508987d8b72416867ab4491aed87b4ef;hpb=aa40491595ffec54ba340a9850d99dc14d920eb3;p=quassel.git diff --git a/src/uisupport/uistyle.cpp b/src/uisupport/uistyle.cpp index e04a0bd0..94c9742b 100644 --- a/src/uisupport/uistyle.cpp +++ b/src/uisupport/uistyle.cpp @@ -17,6 +17,7 @@ * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ +#include #include "uistyle.h" #include "uistylesettings.h" @@ -25,7 +26,8 @@ UiStyle::UiStyle(const QString &settingsKey) : _settingsKey(settingsKey) { // Default format QTextCharFormat def; def.setForeground(QBrush("#000000")); - //def.setFont(QFont("Courier", 10)); + def.setFont(QFont("Monospace", QApplication::font().pointSize())); + def.font().setFixedPitch(true); def.font().setStyleHint(QFont::TypeWriter); _defaultFormats = QVector(NumFormatTypes, def); _customFormats = QVector(NumFormatTypes, QTextFormat().toCharFormat()); @@ -130,9 +132,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 - + QString s = _s; StyledText result; QList fmtList; fmtList.append(None); @@ -240,5 +240,3 @@ QTextCharFormat UiStyle::mergedFormat(QList formatList) { } return fmt; } - -