Changeset View
Changeset View
Standalone View
Standalone View
kdecoration/breezedecoration.cpp
Show First 20 Lines • Show All 470 Lines • ▼ Show 20 Line(s) | 61 | { | |||
---|---|---|---|---|---|
471 | } | 471 | } | ||
472 | 472 | | |||
473 | //________________________________________________________________ | 473 | //________________________________________________________________ | ||
474 | void Decoration::paintTitleBar(QPainter *painter, const QRect &repaintRegion) | 474 | void Decoration::paintTitleBar(QPainter *painter, const QRect &repaintRegion) | ||
475 | { | 475 | { | ||
476 | const auto c = client().data(); | 476 | const auto c = client().data(); | ||
477 | const QRect titleRect(QPoint(0, 0), QSize(size().width(), borderTop())); | 477 | const QRect titleRect(QPoint(0, 0), QSize(size().width(), borderTop())); | ||
478 | 478 | | |||
479 | if ( !titleRect.contains(repaintRegion) ) return; | ||||
graesslin: are you sure contains is correct here? If repaint Region intersects the titleRect it should get… | |||||
Only if proper = true is set, the rect would need to be entirely contained inside the other. broulik: Only if `proper = true` is set, the rect would need to be entirely contained inside the other. | |||||
480 | | ||||
479 | painter->save(); | 481 | painter->save(); | ||
480 | painter->setPen(Qt::NoPen); | 482 | painter->setPen(Qt::NoPen); | ||
481 | 483 | | |||
482 | // render a linear gradient on title area | 484 | // render a linear gradient on title area | ||
483 | if( c->isActive() && m_internalSettings->drawBackgroundGradient() ) | 485 | if( c->isActive() && m_internalSettings->drawBackgroundGradient() ) | ||
484 | { | 486 | { | ||
485 | 487 | | |||
486 | const QColor titleBarColor( this->titleBarColor() ); | 488 | const QColor titleBarColor( this->titleBarColor() ); | ||
▲ Show 20 Lines • Show All 254 Lines • Show Last 20 Lines |
are you sure contains is correct here? If repaint Region intersects the titleRect it should get repainted?