mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-19 11:26:11 +00:00
ca821e1064
First commit with the app code
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
|
|
}
|