Merge pull request #7214
fa2f4bc
qt5: Use the fixed font the system recommends (MarcoFalke)
This commit is contained in:
commit
be9a9a3d22
1 changed files with 8 additions and 0 deletions
|
@ -62,6 +62,10 @@
|
||||||
#include <QUrlQuery>
|
#include <QUrlQuery>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if QT_VERSION >= 0x50200
|
||||||
|
#include <QFontDatabase>
|
||||||
|
#endif
|
||||||
|
|
||||||
#if BOOST_FILESYSTEM_VERSION >= 3
|
#if BOOST_FILESYSTEM_VERSION >= 3
|
||||||
static boost::filesystem::detail::utf8_codecvt_facet utf8;
|
static boost::filesystem::detail::utf8_codecvt_facet utf8;
|
||||||
#endif
|
#endif
|
||||||
|
@ -90,6 +94,9 @@ QString dateTimeStr(qint64 nTime)
|
||||||
|
|
||||||
QFont fixedPitchFont()
|
QFont fixedPitchFont()
|
||||||
{
|
{
|
||||||
|
#if QT_VERSION >= 0x50200
|
||||||
|
return QFontDatabase::systemFont(QFontDatabase::FixedFont);
|
||||||
|
#else
|
||||||
QFont font("Monospace");
|
QFont font("Monospace");
|
||||||
#if QT_VERSION >= 0x040800
|
#if QT_VERSION >= 0x040800
|
||||||
font.setStyleHint(QFont::Monospace);
|
font.setStyleHint(QFont::Monospace);
|
||||||
|
@ -97,6 +104,7 @@ QFont fixedPitchFont()
|
||||||
font.setStyleHint(QFont::TypeWriter);
|
font.setStyleHint(QFont::TypeWriter);
|
||||||
#endif
|
#endif
|
||||||
return font;
|
return font;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void setupAddressWidget(QValidatedLineEdit *widget, QWidget *parent)
|
void setupAddressWidget(QValidatedLineEdit *widget, QWidget *parent)
|
||||||
|
|
Loading…
Reference in a new issue