QComboBox: Set the proper font after a MacSizeChange event
Change-Id: I5c90817e52a3e87d9b06b2bb670d69a6953efd47 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
This commit is contained in:
parent
624df9cf7f
commit
9ee07d5544
@ -2834,6 +2834,18 @@ void QComboBox::changeEvent(QEvent *e)
|
||||
d->updateLineEditGeometry();
|
||||
d->setLayoutItemMargins(QStyle::SE_ComboBoxLayoutItem);
|
||||
|
||||
if (e->type() == QEvent::MacSizeChange){
|
||||
QPlatformTheme::Font f = QPlatformTheme::SystemFont;
|
||||
if (testAttribute(Qt::WA_MacSmallSize))
|
||||
f = QPlatformTheme::SmallFont;
|
||||
else if (testAttribute(Qt::WA_MacMiniSize))
|
||||
f = QPlatformTheme::MiniFont;
|
||||
if (const QFont *platformFont = QApplicationPrivate::platformTheme()->font(f)) {
|
||||
QFont f = font();
|
||||
f.setPointSizeF(platformFont->pointSizeF());
|
||||
setFont(f);
|
||||
}
|
||||
}
|
||||
// ### need to update scrollers etc. as well here
|
||||
break;
|
||||
case QEvent::EnabledChange:
|
||||
|
Loading…
Reference in New Issue
Block a user