cutter/src/helpers.cpp

30 lines
613 B
C++
Raw Normal View History

#include "helpers.h"
#include <QPlainTextEdit>
#include <QTextEdit>
namespace qhelpers
{
2017-04-09 19:55:06 +00:00
// TODO: wouldn't it be enough to setFont on the QWidget?
2017-04-09 19:55:06 +00:00
void normalizeFont(QPlainTextEdit *edit)
{
#ifdef Q_OS_LINUX
QFont anonFont("Inconsolata", 12);
QTextDocument *out_doc = edit->document();
out_doc->setDefaultFont(anonFont);
2017-04-09 19:55:06 +00:00
#endif
}
2017-04-09 19:55:06 +00:00
void normalizeEditFont(QTextEdit *edit)
{
#ifdef Q_OS_LINUX
QFont anonFont("Inconsolata", 12);
QTextDocument *out_doc = edit->document();
out_doc->setDefaultFont(anonFont);
2017-04-09 19:55:06 +00:00
#endif
}
} // end namespace