Handle Qt::WA_MacSmallSize in QApplication::font(const QWidget *).
Task-number: QTBUG-27669 Task-number: QTBUG-27665 Change-Id: Id7eb8092076a57a755a53d1eb5c46d706756ca81 Reviewed-by: hjk <qthjk@ovi.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
This commit is contained in:
parent
9a6367a72a
commit
e671110a10
@ -1512,6 +1512,14 @@ QFont QApplication::font(const QWidget *widget)
|
||||
FontHash *hash = app_fonts();
|
||||
|
||||
if (widget && hash && hash->size()) {
|
||||
#ifdef Q_OS_MAC
|
||||
// short circuit for small and mini controls
|
||||
if (widget->testAttribute(Qt::WA_MacSmallSize)) {
|
||||
return hash->value(QByteArrayLiteral("QSmallFont"));
|
||||
} else if (widget->testAttribute(Qt::WA_MacMiniSize)) {
|
||||
return hash->value(QByteArrayLiteral("QMiniFont"));
|
||||
}
|
||||
#endif
|
||||
QHash<QByteArray, QFont>::ConstIterator it =
|
||||
hash->constFind(widget->metaObject()->className());
|
||||
if (it != hash->constEnd())
|
||||
|
Loading…
Reference in New Issue
Block a user