fix gradient positionning for maximized windows

This commit is contained in:
Hugo Pereira Da Costa 2011-04-16 13:06:59 +02:00
parent 38f5c5d055
commit e213b3ca9f

View file

@ -583,10 +583,16 @@ namespace Oxygen
} else { } else {
const int offset = layoutMetric( LM_OuterPaddingTop ); int offset = layoutMetric( LM_OuterPaddingTop );
// radial gradient positionning
int height = 64 - Configuration::ButtonDefault; int height = 64 - Configuration::ButtonDefault;
if( !hideTitleBar() ) height += configuration().buttonSize(); if( !hideTitleBar() ) height += configuration().buttonSize();
if( isMaximized() )
{
offset -= 3;
height -= 3;
}
const QWidget* window( isPreview() ? this->widget() : widget->window() ); const QWidget* window( isPreview() ? this->widget() : widget->window() );
helper().renderWindowBackground(painter, rect, widget, window, palette, offset, height ); helper().renderWindowBackground(painter, rect, widget, window, palette, offset, height );