drawGradient( p, rr, act ? cg.highlight() : cg.dark(), col,
horiz ? LeftToRight : UpToDown, linear );
-\r
- QRect rt = rr;\r
- if ( flags & Style_Horizontal )\r
- rt.addCoords( 0, 20, 0, 0 );\r
- else\r
- rt.addCoords( 0, 0, -20, 0 );\r
-\r
- int textW = flags & Style_Horizontal ? rt.height() : rt.width();\r
- int textH = flags & Style_Horizontal ? rt.width() : rt.height();\r
-\r
- QString title = titleText( wnd->caption(), textW, p->fontMetrics() );\r
-\r
- if ( wnd )\r
- {\r
- QColorGroup cgroup = wnd->isActiveWindow() ? wnd->palette().active() : wnd->palette().inactive();\r
- p->setPen( cgroup.highlightedText() );\r
-\r
- if ( flags & Style_Horizontal )\r
- {\r
- p->rotate( 270.0 );\r
- p->translate( -(rt.height()+rt.y()), (rt.width()-rt.x()) );\r
- p->drawText( 0, 0, title );\r
- }\r
- else\r
- p->drawText( 2, 2, textW, textH, AlignLeft, title );\r
- }\r
- }\r
+
+ QRect rt = rr;
+ if ( flags & Style_Horizontal )
+ rt.addCoords( 0, 20, 0, 0 );
+ else
+ rt.addCoords( 0, 0, -20, 0 );
+
+ int textW = flags & Style_Horizontal ? rt.height() : rt.width();
+ int textH = flags & Style_Horizontal ? rt.width() : rt.height();
+
+ 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 );
+ }
+ else
+ p->drawText( 2, 2, textW, textH, AlignLeft, title );
+ }
+ }
break;
}
r2.setRect( r2.left(), r2.top(), r2.width() - 2, r2.height() - 1 );
p->setPen( cg.foreground() );
- drawGradient( p, QRect( r2.left(), r2.top(), r2.width(), r2.height() - 1 ),\r
- selected ? cg.highlight() : cg.dark(), cg.background(), UpToDown, linear );\r
+ drawGradient( p, QRect( r2.left(), r2.top(), r2.width(), r2.height() - 1 ),
+ selected ? cg.highlight() : cg.dark(), cg.background(), UpToDown, linear );
-// p->fillRect( r2.left(), r2.top(), r2.width(), r2.height() - 1, selected ? cg.highlight() : cg.background() );\r
+// p->fillRect( r2.left(), r2.top(), r2.width(), r2.height() - 1, selected ? cg.highlight() : cg.background() );
p->drawRect( r2.left(), r2.top(), r2.width(), r2.height() - 1 );
if ( selected )
break;
}
-\r
- case CE_TabBarLabel:\r
- {\r
- QColorGroup tmp( cg );\r
- if ( flags & Style_Selected )\r
- tmp.setColor( QColorGroup::Foreground, tmp.highlightedText() );\r
- PARENT_STYLE::drawControl( element, p, widget, r, tmp, flags, opt );\r
- }\r
- break;\r
+
+ case CE_TabBarLabel:
+ {
+ QColorGroup tmp( cg );
+ if ( flags & Style_Selected )
+ tmp.setColor( QColorGroup::Foreground, tmp.highlightedText() );
+ PARENT_STYLE::drawControl( element, p, widget, r, tmp, flags, opt );
+ }
+ break;
case CE_PushButton:
{