QWindowsStyle: Do not rely on the widget to draw the dock title
There is no need to query widget->isWindow when this information is present in the QStyleOption state (it is even set using isWindow in QStyleOption::init) Change-Id: I4f3bbdd9c70d6253e9301bc168d61c7ecdbfdc06 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
This commit is contained in:
parent
d3d10cf23d
commit
0ad05259a5
@ -1795,7 +1795,7 @@ void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPai
|
||||
QColor left, right;
|
||||
|
||||
//Titlebar gradient
|
||||
if (widget && widget->isWindow()) {
|
||||
if (opt->state & QStyle::State_Window) {
|
||||
floating = true;
|
||||
if (active) {
|
||||
left = d->activeCaptionColor;
|
||||
|
Loading…
x
Reference in New Issue
Block a user