From 967720ecbe1c37f774428174bdde21e400ed4420 Mon Sep 17 00:00:00 2001 From: Hugo Pereira Da Costa Date: Tue, 6 Oct 2009 07:33:44 +0000 Subject: [PATCH] fixed regression concerning title vertical alignment svn path=/trunk/KDE/kdebase/workspace/; revision=1031812 --- clients/oxygen/oxygenclient.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/clients/oxygen/oxygenclient.cpp b/clients/oxygen/oxygenclient.cpp index 83e1c09043..49b64bfb05 100644 --- a/clients/oxygen/oxygenclient.cpp +++ b/clients/oxygen/oxygenclient.cpp @@ -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 ) ) );