moved pixmap rendering to separate method.
It is called independently from window background in decoration code; It is called together with window background in style.
This commit is contained in:
parent
77dd014d8a
commit
d84f048b6a
1 changed files with 20 additions and 0 deletions
|
@ -572,6 +572,7 @@ namespace Oxygen
|
||||||
void Client::renderWindowBackground( QPainter* painter, const QRect& rect, const QWidget* widget, const QPalette& palette ) const
|
void Client::renderWindowBackground( QPainter* painter, const QRect& rect, const QWidget* widget, const QPalette& palette ) const
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// window background
|
||||||
if(
|
if(
|
||||||
configuration().blendColor() == Configuration::NoBlending ||
|
configuration().blendColor() == Configuration::NoBlending ||
|
||||||
( configuration().blendColor() == Configuration::BlendFromStyle &&
|
( configuration().blendColor() == Configuration::BlendFromStyle &&
|
||||||
|
@ -604,6 +605,25 @@ namespace Oxygen
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
// background pixmap
|
||||||
|
int offset = layoutMetric( LM_OuterPaddingTop );
|
||||||
|
|
||||||
|
// radial gradient positionning
|
||||||
|
int height = 64 - Configuration::ButtonDefault;
|
||||||
|
if( !hideTitleBar() ) height += configuration().buttonSize();
|
||||||
|
if( isMaximized() ) offset -= 3;
|
||||||
|
|
||||||
|
// background pixmap
|
||||||
|
QPoint backgroundPixmapOffset( layoutMetric( LM_OuterPaddingLeft ) + layoutMetric( LM_BorderLeft ), 0 );
|
||||||
|
helper().setBackgroundPixmapOffset( backgroundPixmapOffset );
|
||||||
|
|
||||||
|
const QWidget* window( isPreview() ? this->widget() : widget->window() );
|
||||||
|
helper().renderBackgroundPixmap(painter, rect, widget, window, offset, height );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//_________________________________________________________
|
//_________________________________________________________
|
||||||
|
|
Loading…
Reference in a new issue