aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJonas Schnelli <dev@jonasschnelli.ch>2015-12-23 10:12:49 +0100
committerJonas Schnelli <dev@jonasschnelli.ch>2015-12-23 10:13:00 +0100
commitbe9a9a3d2253ceccf123572b97a890c489a5a9be (patch)
tree667d73942bcf19b7329ccbb8941a6a84762cfd5f /src
parent97d83739db0631be5d4ba86af3616014652c00ec (diff)
parentfa2f4bc4eb0f21f5be8c88954ae2d99c5b18b987 (diff)
Merge pull request #7214
fa2f4bc qt5: Use the fixed font the system recommends (MarcoFalke)
Diffstat (limited to 'src')
-rw-r--r--src/qt/guiutil.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index 43cfba63d6..34675b53dc 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)