qt5: Use the fixed font the system recommends
Github-Pull: #7214 Rebased-From: fa2f4bc4eb0f21f5be8c88954ae2d99c5b18b987
This commit is contained in:
parent
605de4a88a
commit
6f8346db5f
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user