drawGradient( p, rr, act ? cg.highlight() : cg.dark(), col,
horiz ? LeftToRight : UpToDown, linear );
-
- 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 )
- {
- 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 );
- }
- }
+\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
break;
}
r2.setRect( r2.left(), r2.top(), r2.width() - 2, r2.height() - 1 );
p->setPen( cg.foreground() );
- QBrush brsh = cg.brush( selected ? QColorGroup::Base : QColorGroup::Background );
- p->fillRect( r2.left(), r2.top(), r2.width(), r2.height() - 1, brsh );
+ drawGradient( p, QRect( r2.left(), r2.top(), r2.width(), r2.height() - 1 ),\r
+ selected ? cg.highlight() : cg.dark(), cg.background(), UpToDown, linear );\r
+
+// p->fillRect( r2.left(), r2.top(), r2.width(), r2.height() - 1, selected ? cg.highlight() : cg.background() );\r
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_PushButton:
{