]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Title for Dock windows
authorstv <stv@opencascade.com>
Wed, 29 Jun 2005 11:11:01 +0000 (11:11 +0000)
committerstv <stv@opencascade.com>
Wed, 29 Jun 2005 11:11:01 +0000 (11:11 +0000)
src/Style/SalomeStyle.cxx

index 5c6c0e0755f9aa9a4342b177ea43aefe49053ccb..c53feb6e8dab6e91bd8b386226a21ea384d1582c 100644 (file)
@@ -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;
     }