diff options
author | MarcoFalke <falke.marco@gmail.com> | 2015-12-14 21:23:05 +0100 |
---|---|---|
committer | Luke Dashjr <luke-jr+git@utopios.org> | 2016-01-13 21:25:36 +0000 |
commit | 6f8346db5fa5b33d1d8ca197641844b7f8a40b5d (patch) | |
tree | 4b2b7aea88d14b3e93a4c8af31191bc2134f588a /src | |
parent | 605de4a88a7a9c17abf2c8c66bf6fed32fcdedbd (diff) |
qt5: Use the fixed font the system recommends
Github-Pull: #7214
Rebased-From: fa2f4bc4eb0f21f5be8c88954ae2d99c5b18b987
Diffstat (limited to 'src')
-rw-r--r-- | src/qt/guiutil.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index 6cb4e3bd1b..ee2744f126 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -62,6 +62,10 @@ #include <QUrlQuery> #endif +#if QT_VERSION >= 0x50200 +#include <QFontDatabase> +#endif + #if BOOST_FILESYSTEM_VERSION >= 3 static boost::filesystem::detail::utf8_codecvt_facet utf8; #endif @@ -90,6 +94,9 @@ QString dateTimeStr(qint64 nTime) QFont fixedPitchFont() { +#if QT_VERSION >= 0x50200 + return QFontDatabase::systemFont(QFontDatabase::FixedFont); +#else QFont font("Monospace"); #if QT_VERSION >= 0x040800 font.setStyleHint(QFont::Monospace); @@ -97,6 +104,7 @@ QFont fixedPitchFont() font.setStyleHint(QFont::TypeWriter); #endif return font; +#endif } void setupAddressWidget(QValidatedLineEdit *widget, QWidget *parent) |