From: Guillaume Munch Date: Wed, 17 Feb 2016 21:45:44 +0000 (+0000) Subject: Set the preamble in fixed-width font and without line breaks (#9966) X-Git-Tag: 2.2.0rc1~135 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=0c3643ada95e9f0996d93a629b3de39b7fc25e74;p=features.git Set the preamble in fixed-width font and without line breaks (#9966) --- diff --git a/src/frontends/qt4/GuiDocument.cpp b/src/frontends/qt4/GuiDocument.cpp index cf64849ef5..60aee1ccfb 100644 --- a/src/frontends/qt4/GuiDocument.cpp +++ b/src/frontends/qt4/GuiDocument.cpp @@ -453,6 +453,11 @@ PreambleModule::PreambleModule() : current_id_(0) // This is not a memory leak. The object will be destroyed // with this. (void) new LaTeXHighlighter(preambleTE->document()); + QFont font(guiApp->typewriterFontName()); + font.setFixedPitch(true); + font.setStyleHint(QFont::TypeWriter); + preambleTE->setFont(font); + preambleTE->setWordWrapMode(QTextOption::NoWrap); setFocusProxy(preambleTE); connect(preambleTE, SIGNAL(textChanged()), this, SIGNAL(changed())); }