From 0b868e45c0ab64161be823795f516ef18f9d5799 Mon Sep 17 00:00:00 2001 From: baldurk Date: Thu, 4 May 2017 15:32:53 +0100 Subject: [PATCH] Explicitly set a fixed-width font for scintilla editors --- qrenderdoc/Windows/PythonShell.cpp | 2 ++ qrenderdoc/Windows/ShaderViewer.cpp | 3 +++ 2 files changed, 5 insertions(+) diff --git a/qrenderdoc/Windows/PythonShell.cpp b/qrenderdoc/Windows/PythonShell.cpp index aaabd75f3..43104a138 100644 --- a/qrenderdoc/Windows/PythonShell.cpp +++ b/qrenderdoc/Windows/PythonShell.cpp @@ -45,6 +45,8 @@ PythonShell::PythonShell(ICaptureContext &ctx, QWidget *parent) scriptEditor = new ScintillaEdit(this); + scriptEditor->setFont(QFontDatabase::systemFont(QFontDatabase::FixedFont)); + scriptEditor->setMarginLeft(4); scriptEditor->setMarginWidthN(0, 32); scriptEditor->setMarginWidthN(1, 0); diff --git a/qrenderdoc/Windows/ShaderViewer.cpp b/qrenderdoc/Windows/ShaderViewer.cpp index 74a3a6dc0..8747f4132 100644 --- a/qrenderdoc/Windows/ShaderViewer.cpp +++ b/qrenderdoc/Windows/ShaderViewer.cpp @@ -23,6 +23,7 @@ ******************************************************************************/ #include "ShaderViewer.h" +#include #include #include #include @@ -559,6 +560,8 @@ ScintillaEdit *ShaderViewer::MakeEditor(const QString &name, const QString &text ret->setMarginWidthN(2, 16); ret->setObjectName(name); + ret->setFont(QFontDatabase::systemFont(QFontDatabase::FixedFont)); + // C# DarkGreen ret->indicSetFore(INDICATOR_REGHIGHLIGHT, SCINTILLA_COLOUR(0, 100, 0)); ret->indicSetStyle(INDICATOR_REGHIGHLIGHT, INDIC_ROUNDBOX);