From d84f048b6aa6a5585acc6f8b3003aec97bc7b8b6 Mon Sep 17 00:00:00 2001 From: Hugo Pereira Da Costa Date: Wed, 20 Apr 2011 11:28:45 +0200 Subject: [PATCH] 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. --- clients/oxygen/oxygenclient.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/clients/oxygen/oxygenclient.cpp b/clients/oxygen/oxygenclient.cpp index 74e4b3aa4d..447437f5c2 100644 --- a/clients/oxygen/oxygenclient.cpp +++ b/clients/oxygen/oxygenclient.cpp @@ -572,6 +572,7 @@ namespace Oxygen void Client::renderWindowBackground( QPainter* painter, const QRect& rect, const QWidget* widget, const QPalette& palette ) const { + // window background if( configuration().blendColor() == Configuration::NoBlending || ( 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 ); + + } + } //_________________________________________________________