- 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
|
||||
{
|
||||
|
||||
// check if outline is needed
|
||||
if( clientGroupItems().count() < 2 && !itemData_.isAnimated() && !( isActive() && configuration().drawTitleOutline() ) ) return;
|
||||
|
||||
// get coordinates relative to the client area
|
||||
// this is annoying. One could use mapTo if this was taking const QWidget* and not
|
||||
// const QWidget* as argument.
|
||||
|
@ -1414,7 +1411,9 @@ namespace Oxygen
|
|||
|
||||
// window background
|
||||
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
|
||||
if( compositingActive() )
|
||||
|
@ -1696,7 +1695,7 @@ namespace Oxygen
|
|||
itemData_.setDirty( true );
|
||||
moveItemInClientGroup( from, itemClicked );
|
||||
updateTitleRect();
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
setForceActive( true );
|
||||
|
|
|
@ -204,12 +204,13 @@ namespace Oxygen
|
|||
|
||||
//! resize event
|
||||
virtual void resizeEvent(QResizeEvent *e);
|
||||
|
||||
|
||||
public slots:
|
||||
|
||||
|
||||
//! triggers widget update in titleRect only
|
||||
/*! one needs to add the title top margin to avoid some clipping glitches */
|
||||
void updateTitleRect( void )
|
||||
{ widget()->update( titleRect() ); }
|
||||
{ widget()->update( titleRect().adjusted( 0, -layoutMetric( LM_TitleEdgeTop ), 0, 0 ) ); }
|
||||
|
||||
protected:
|
||||
|
||||
|
@ -327,6 +328,15 @@ namespace Oxygen
|
|||
!isPreview();
|
||||
}
|
||||
|
||||
//! true if some title outline is rendered
|
||||
bool hasTitleOutline( void ) const
|
||||
{
|
||||
return
|
||||
clientGroupItems().count() >= 2 ||
|
||||
itemData_.isAnimated() ||
|
||||
( isActive() && configuration().drawTitleOutline() );
|
||||
}
|
||||
|
||||
//! calculate mask
|
||||
QRegion calcMask( void ) const;
|
||||
|
||||
|
@ -371,7 +381,7 @@ namespace Oxygen
|
|||
//! clear force active flag
|
||||
void clearForceActive( void )
|
||||
{ if( isActive() ) setForceActive( false ); }
|
||||
|
||||
|
||||
//! title bounding rects
|
||||
/*! calculate and return title bounding rects in case of tabbed window */
|
||||
void updateItemBoundingRects( bool alsoUpdate = true );
|
||||
|
|
Loading…
Reference in a new issue