fixed regression concerning title vertical alignment

svn path=/trunk/KDE/kdebase/workspace/; revision=1031812
icc-effect-5.14.5
Hugo Pereira Da Costa 2009-10-06 07:33:44 +00:00
parent 8df96b21ba
commit 967720ecbe
1 changed files with 4 additions and 5 deletions

View File

@ -606,13 +606,12 @@ namespace Oxygen
QRect boundingRect = painter->boundingRect( titleRect, configuration().titleAlignment() | Qt::AlignVCenter, caption );
// adjust to make sure bounding rect
// 1/ uses maximum height
// 2/ does not exceeds available space
boundingRect.setTop( frame.top() );
// 1/ has same vertical alignment as original titleRect
// 2/ does not exceeds available horizontal space
boundingRect.setTop( titleRect.top() );
boundingRect.setBottom( titleRect.bottom() );
boundingRect.setLeft( qMax( boundingRect.left(), titleRect.left() ) );
boundingRect.setRight( qMin( boundingRect.right(), titleRect.right() ) );
return boundingRect;
}
@ -894,7 +893,7 @@ namespace Oxygen
// title outline
if( drawTitleOutline() )
{ renderTitleOutline( &painter, boundingRect.adjusted( -2*HFRAMESIZE, 0, 2*HFRAMESIZE, 0 ), backgroundPalette( widget(), palette ) ); }
{ renderTitleOutline( &painter, boundingRect.adjusted( -2*HFRAMESIZE, -layoutMetric(LM_TitleEdgeTop), 2*HFRAMESIZE, 2 ), backgroundPalette( widget(), palette ) ); }
// draw title text
renderTitleText( &painter, boundingRect, configuration().titleAlignment() | Qt::AlignVCenter, titlebarTextColor( backgroundPalette( widget(), palette ) ) );