mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-23 13:25:27 +00:00
32 lines
849 B
C++
32 lines
849 B
C++
|
#include "helpers.h"
|
||
|
|
||
|
QHelpers::QHelpers(QObject *parent) :
|
||
|
QObject(parent)
|
||
|
{
|
||
|
// Meow
|
||
|
}
|
||
|
|
||
|
void QHelpers::normalizeFont(QPlainTextEdit *edit) {
|
||
|
#ifdef Q_OS_LINUX
|
||
|
// Add custom monospaced font
|
||
|
QFontDatabase fontDB;
|
||
|
fontDB.addApplicationFont(":/new/prefix1/fonts/Inconsolata-Regular.ttf");
|
||
|
|
||
|
QFont anonFont("Inconsolata", 12);
|
||
|
QTextDocument *out_doc = edit->document();
|
||
|
out_doc->setDefaultFont(anonFont);
|
||
|
#endif
|
||
|
}
|
||
|
|
||
|
void QHelpers::normalizeEditFont(QTextEdit *edit) {
|
||
|
#ifdef Q_OS_LINUX
|
||
|
// Add custom monospaced font
|
||
|
QFontDatabase fontDB;
|
||
|
fontDB.addApplicationFont(":/new/prefix1/fonts/Inconsolata-Regular.ttf");
|
||
|
|
||
|
QFont anonFont("Inconsolata", 12);
|
||
|
QTextDocument *out_doc = edit->document();
|
||
|
out_doc->setDefaultFont(anonFont);
|
||
|
#endif
|
||
|
}
|