QHeaderView and others: Fix font lookup name
It should the the actual class name, without any suffix. This also allows us to use the painter font when rendering CE_HeaderLabel and, as a consequence, change QHeaderView's font through the usual methods. Change-Id: I0b13ee349f5fa505be66a9c884c26885f5fc468f Task-number: QTBUG-33855 Task-number: QTBUG-37153 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>bb10
parent
e5f3b653f0
commit
15163d1939
|
|
@ -740,15 +740,15 @@ void QApplicationPrivate::initializeWidgetFontHash()
|
|||
if (const QFont *font = theme->font(QPlatformTheme::ItemViewFont))
|
||||
fontHash->insert(QByteArrayLiteral("QAbstractItemView"), *font);
|
||||
if (const QFont *font = theme->font(QPlatformTheme::ListViewFont))
|
||||
fontHash->insert(QByteArrayLiteral("QListViewFont"), *font);
|
||||
fontHash->insert(QByteArrayLiteral("QListView"), *font);
|
||||
if (const QFont *font = theme->font(QPlatformTheme::HeaderViewFont))
|
||||
fontHash->insert(QByteArrayLiteral("QHeaderViewFont"), *font);
|
||||
fontHash->insert(QByteArrayLiteral("QHeaderView"), *font);
|
||||
if (const QFont *font = theme->font(QPlatformTheme::ListBoxFont))
|
||||
fontHash->insert(QByteArrayLiteral("QListBox"), *font);
|
||||
if (const QFont *font = theme->font(QPlatformTheme::ComboMenuItemFont))
|
||||
fontHash->insert(QByteArrayLiteral("QComboMenuItemFont"), *font);
|
||||
fontHash->insert(QByteArrayLiteral("QComboMenuItem"), *font);
|
||||
if (const QFont *font = theme->font(QPlatformTheme::ComboLineEditFont))
|
||||
fontHash->insert(QByteArrayLiteral("QComboLineEditFont"), *font);
|
||||
fontHash->insert(QByteArrayLiteral("QComboLineEdit"), *font);
|
||||
if (const QFont *font = theme->font(QPlatformTheme::SmallFont))
|
||||
fontHash->insert(QByteArrayLiteral("QSmallFont"), *font);
|
||||
if (const QFont *font = theme->font(QPlatformTheme::MiniFont))
|
||||
|
|
|
|||
|
|
@ -3698,7 +3698,6 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
|
|||
textr.translate(pixmap.width() / pixmap.devicePixelRatio() + 2, 0);
|
||||
}
|
||||
|
||||
p->setFont(qt_app_fonts_hash()->value("QSmallFont", QFont()));
|
||||
proxy()->drawItemText(p, textr, header->textAlignment | Qt::AlignVCenter, header->palette,
|
||||
header->state & State_Enabled, header->text, QPalette::ButtonText);
|
||||
p->restore();
|
||||
|
|
|
|||
Loading…
Reference in New Issue