QMacStyle: Properly polish and unpolish QTabBar
Task-number: QTBUG-61092 Change-Id: Id8b6caef264c61936a425757c6d8fac63142d5ec Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
f7aaff01de
commit
eaa54a8f98
@ -2262,6 +2262,8 @@ void QMacStyle::polish(QWidget* w)
|
|||||||
QPalette p = w->palette();
|
QPalette p = w->palette();
|
||||||
p.setColor(QPalette::WindowText, QColor(17, 17, 17));
|
p.setColor(QPalette::WindowText, QColor(17, 17, 17));
|
||||||
w->setPalette(p);
|
w->setPalette(p);
|
||||||
|
w->setAttribute(Qt::WA_SetPalette, false);
|
||||||
|
w->setAttribute(Qt::WA_SetFont, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -2304,6 +2306,15 @@ void QMacStyle::unpolish(QWidget* w)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef QT_NO_TABBAR
|
||||||
|
if (QTabBar *tb = qobject_cast<QTabBar*>(w)) {
|
||||||
|
if (!w->testAttribute(Qt::WA_SetFont))
|
||||||
|
w->setFont(qApp->font(w));
|
||||||
|
if (!w->testAttribute(Qt::WA_SetPalette))
|
||||||
|
w->setPalette(qApp->palette(w));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (QRubberBand *rubber = qobject_cast<QRubberBand*>(w)) {
|
if (QRubberBand *rubber = qobject_cast<QRubberBand*>(w)) {
|
||||||
rubber->setWindowOpacity(1.0);
|
rubber->setWindowOpacity(1.0);
|
||||||
rubber->setAttribute(Qt::WA_PaintOnScreen, true);
|
rubber->setAttribute(Qt::WA_PaintOnScreen, true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user