]> git.lyx.org Git - features.git/commitdiff
Set the preamble in fixed-width font and without line breaks (#9966)
authorGuillaume Munch <gm@lyx.org>
Wed, 17 Feb 2016 21:45:44 +0000 (21:45 +0000)
committerGuillaume Munch <gm@lyx.org>
Thu, 18 Feb 2016 17:19:38 +0000 (17:19 +0000)
src/frontends/qt4/GuiDocument.cpp

index cf64849ef5975349f4516b93ce46cbe9f8591701..60aee1ccfbc911634325d812776207bf3c4c3479 100644 (file)
@@ -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()));
 }