From: stv Date: Wed, 29 Jun 2005 11:11:01 +0000 (+0000) Subject: Title for Dock windows X-Git-Tag: V3_0_1~103 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6d43688394450603c159e695fd3c82a5d6497c5b;p=modules%2Fgui.git Title for Dock windows --- diff --git a/src/Style/SalomeStyle.cxx b/src/Style/SalomeStyle.cxx index 5c6c0e075..c53feb6e8 100644 --- a/src/Style/SalomeStyle.cxx +++ b/src/Style/SalomeStyle.cxx @@ -405,7 +405,7 @@ void SalomeStyle::drawPrimitive( PrimitiveElement pe, QPainter* p, const QRect& drawGradient( p, rr, act ? cg.highlight() : cg.dark(), col, horiz ? LeftToRight : UpToDown, linear ); - QRect rt = rr; + QRect rt = rr; if ( flags & Style_Horizontal ) rt.addCoords( 0, 20, 0, 0 ); else @@ -416,20 +416,19 @@ void SalomeStyle::drawPrimitive( PrimitiveElement pe, QPainter* p, const QRect& QString title = titleText( wnd->caption(), textW, p->fontMetrics() ); - if ( wnd ) - { - QColorGroup cgroup = wnd->isActiveWindow() ? wnd->palette().active() : wnd->palette().inactive(); - p->setPen( cgroup.highlightedText() ); - - if ( flags & Style_Horizontal ) - { - p->rotate( 270.0 ); - p->translate( -(rt.height()+rt.y()), (rt.width()-rt.x()) ); - p->drawText( 0, 0, title ); - } + if ( wnd ) + { + p->setPen( act ? cg.highlightedText() : cg.text() ); + + if ( flags & Style_Horizontal ) + { + p->rotate( 270.0 ); + p->translate( -(rt.height()+rt.y()), (rt.width()-rt.x()) ); + p->drawText( 0, 0, title ); + } else - p->drawText( 2, 2, textW, textH, AlignLeft, title ); - } + p->drawText( 2, 2, textW, textH, AlignLeft, title ); + } } break; }