- fixed rendering glitch because updateTitleRect had too small clip region
- moved check on titleOutline to dedicated inline function - removed some trailing spaces. svn path=/trunk/KDE/kdebase/workspace/; revision=1155744
This commit is contained in:
parent
1491e9b7d2
commit
5ce103a6e6
2 changed files with 18 additions and 9 deletions
|
@ -593,9 +593,6 @@ namespace Oxygen
|
||||||
void Client::renderWindowBorder( QPainter* painter, const QRect& clipRect, const QWidget* widget, const QPalette& palette ) const
|
void Client::renderWindowBorder( QPainter* painter, const QRect& clipRect, const QWidget* widget, const QPalette& palette ) const
|
||||||
{
|
{
|
||||||
|
|
||||||
// check if outline is needed
|
|
||||||
if( clientGroupItems().count() < 2 && !itemData_.isAnimated() && !( isActive() && configuration().drawTitleOutline() ) ) return;
|
|
||||||
|
|
||||||
// get coordinates relative to the client area
|
// get coordinates relative to the client area
|
||||||
// this is annoying. One could use mapTo if this was taking const QWidget* and not
|
// this is annoying. One could use mapTo if this was taking const QWidget* and not
|
||||||
// const QWidget* as argument.
|
// const QWidget* as argument.
|
||||||
|
@ -1414,7 +1411,9 @@ namespace Oxygen
|
||||||
|
|
||||||
// window background
|
// window background
|
||||||
renderWindowBackground( &painter, frame, widget(), backgroundPalette( widget(), palette ) );
|
renderWindowBackground( &painter, frame, widget(), backgroundPalette( widget(), palette ) );
|
||||||
renderWindowBorder( &painter, frame, widget(), palette );
|
|
||||||
|
// window border (for title outline)
|
||||||
|
if( hasTitleOutline() ) renderWindowBorder( &painter, frame, widget(), palette );
|
||||||
|
|
||||||
// clipping
|
// clipping
|
||||||
if( compositingActive() )
|
if( compositingActive() )
|
||||||
|
|
|
@ -208,8 +208,9 @@ namespace Oxygen
|
||||||
public slots:
|
public slots:
|
||||||
|
|
||||||
//! triggers widget update in titleRect only
|
//! triggers widget update in titleRect only
|
||||||
|
/*! one needs to add the title top margin to avoid some clipping glitches */
|
||||||
void updateTitleRect( void )
|
void updateTitleRect( void )
|
||||||
{ widget()->update( titleRect() ); }
|
{ widget()->update( titleRect().adjusted( 0, -layoutMetric( LM_TitleEdgeTop ), 0, 0 ) ); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
@ -327,6 +328,15 @@ namespace Oxygen
|
||||||
!isPreview();
|
!isPreview();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! true if some title outline is rendered
|
||||||
|
bool hasTitleOutline( void ) const
|
||||||
|
{
|
||||||
|
return
|
||||||
|
clientGroupItems().count() >= 2 ||
|
||||||
|
itemData_.isAnimated() ||
|
||||||
|
( isActive() && configuration().drawTitleOutline() );
|
||||||
|
}
|
||||||
|
|
||||||
//! calculate mask
|
//! calculate mask
|
||||||
QRegion calcMask( void ) const;
|
QRegion calcMask( void ) const;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue