|
|
|
@ -1333,9 +1333,9 @@ void LipstikStyle::drawKStylePrimitive(KStylePrimitive kpe,
|
|
|
|
|
Draw_Left|Draw_Right|Draw_Top|Round_UpperLeft|Round_UpperRight|
|
|
|
|
|
Draw_Bottom|Round_BottomLeft|Round_BottomRight);
|
|
|
|
|
|
|
|
|
|
TQRegion tqmask(xcenter-8, ycenter-6, 18, 13);
|
|
|
|
|
TQRegion mask(xcenter-8, ycenter-6, 18, 13);
|
|
|
|
|
|
|
|
|
|
p->setClipRegion(tqmask);
|
|
|
|
|
p->setClipRegion(mask);
|
|
|
|
|
|
|
|
|
|
uint surfaceFlags = Draw_Left|Draw_Right|Draw_Top|Round_UpperLeft|Round_UpperRight|
|
|
|
|
|
Is_Horizontal;
|
|
|
|
@ -1359,9 +1359,9 @@ void LipstikStyle::drawKStylePrimitive(KStylePrimitive kpe,
|
|
|
|
|
Draw_Left|Draw_Right|Draw_Top|Round_UpperLeft|Round_UpperRight|
|
|
|
|
|
Draw_Bottom|Round_BottomLeft|Round_BottomRight);
|
|
|
|
|
|
|
|
|
|
TQRegion tqmask(xcenter-6, ycenter-8, 13, 18);
|
|
|
|
|
TQRegion mask(xcenter-6, ycenter-8, 13, 18);
|
|
|
|
|
|
|
|
|
|
p->setClipRegion(tqmask);
|
|
|
|
|
p->setClipRegion(mask);
|
|
|
|
|
|
|
|
|
|
uint surfaceFlags = Draw_Left|Draw_Top|Draw_Bottom|Round_UpperLeft|Round_BottomLeft|
|
|
|
|
|
Round_UpperRight|Is_Horizontal;
|
|
|
|
@ -1412,16 +1412,16 @@ void LipstikStyle::drawKStylePrimitive(KStylePrimitive kpe,
|
|
|
|
|
p->drawPoint(xcenter-5+4, ycenter+8);
|
|
|
|
|
p->drawPoint(xcenter+5-4, ycenter+8);
|
|
|
|
|
|
|
|
|
|
TQRegion tqmask(xcenter-4, ycenter-5, 9, 13);
|
|
|
|
|
tqmask -= TQRegion(xcenter-4, ycenter+4, 1, 4);
|
|
|
|
|
tqmask -= TQRegion(xcenter-3, ycenter+5, 1, 3);
|
|
|
|
|
tqmask -= TQRegion(xcenter-2, ycenter+6, 1, 2);
|
|
|
|
|
tqmask -= TQRegion(xcenter-1, ycenter+7, 1, 1);
|
|
|
|
|
tqmask -= TQRegion(xcenter+1, ycenter+7, 1, 1);
|
|
|
|
|
tqmask -= TQRegion(xcenter+2, ycenter+6, 1, 2);
|
|
|
|
|
tqmask -= TQRegion(xcenter+3, ycenter+5, 1, 3);
|
|
|
|
|
tqmask -= TQRegion(xcenter+4, ycenter+4, 1, 4);
|
|
|
|
|
p->setClipRegion(tqmask);
|
|
|
|
|
TQRegion mask(xcenter-4, ycenter-5, 9, 13);
|
|
|
|
|
mask -= TQRegion(xcenter-4, ycenter+4, 1, 4);
|
|
|
|
|
mask -= TQRegion(xcenter-3, ycenter+5, 1, 3);
|
|
|
|
|
mask -= TQRegion(xcenter-2, ycenter+6, 1, 2);
|
|
|
|
|
mask -= TQRegion(xcenter-1, ycenter+7, 1, 1);
|
|
|
|
|
mask -= TQRegion(xcenter+1, ycenter+7, 1, 1);
|
|
|
|
|
mask -= TQRegion(xcenter+2, ycenter+6, 1, 2);
|
|
|
|
|
mask -= TQRegion(xcenter+3, ycenter+5, 1, 3);
|
|
|
|
|
mask -= TQRegion(xcenter+4, ycenter+4, 1, 4);
|
|
|
|
|
p->setClipRegion(mask);
|
|
|
|
|
uint surfaceFlags = Draw_Left|Draw_Right|Draw_Top|Round_UpperLeft|Round_UpperRight|Is_Horizontal;
|
|
|
|
|
if(!enabled)
|
|
|
|
|
surfaceFlags |= Is_Disabled;
|
|
|
|
@ -1462,16 +1462,16 @@ void LipstikStyle::drawKStylePrimitive(KStylePrimitive kpe,
|
|
|
|
|
p->drawPoint(xcenter+8, ycenter-5+4);
|
|
|
|
|
p->drawPoint(xcenter+8, ycenter+5-4);
|
|
|
|
|
|
|
|
|
|
TQRegion tqmask(xcenter-5, ycenter-4, 13, 9);
|
|
|
|
|
tqmask -= TQRegion(xcenter+4, ycenter-4, 4, 1);
|
|
|
|
|
tqmask -= TQRegion(xcenter+5, ycenter-3, 3, 1);
|
|
|
|
|
tqmask -= TQRegion(xcenter+6, ycenter-2, 2, 1);
|
|
|
|
|
tqmask -= TQRegion(xcenter+7, ycenter-1, 1, 1);
|
|
|
|
|
tqmask -= TQRegion(xcenter+7, ycenter+1, 1, 1);
|
|
|
|
|
tqmask -= TQRegion(xcenter+6, ycenter+2, 2, 1);
|
|
|
|
|
tqmask -= TQRegion(xcenter+5, ycenter+3, 3, 1);
|
|
|
|
|
tqmask -= TQRegion(xcenter+4, ycenter+4, 4, 1);
|
|
|
|
|
p->setClipRegion(tqmask);
|
|
|
|
|
TQRegion mask(xcenter-5, ycenter-4, 13, 9);
|
|
|
|
|
mask -= TQRegion(xcenter+4, ycenter-4, 4, 1);
|
|
|
|
|
mask -= TQRegion(xcenter+5, ycenter-3, 3, 1);
|
|
|
|
|
mask -= TQRegion(xcenter+6, ycenter-2, 2, 1);
|
|
|
|
|
mask -= TQRegion(xcenter+7, ycenter-1, 1, 1);
|
|
|
|
|
mask -= TQRegion(xcenter+7, ycenter+1, 1, 1);
|
|
|
|
|
mask -= TQRegion(xcenter+6, ycenter+2, 2, 1);
|
|
|
|
|
mask -= TQRegion(xcenter+5, ycenter+3, 3, 1);
|
|
|
|
|
mask -= TQRegion(xcenter+4, ycenter+4, 4, 1);
|
|
|
|
|
p->setClipRegion(mask);
|
|
|
|
|
uint surfaceFlags = Draw_Left|Draw_Top|Draw_Bottom|Round_UpperLeft|Round_BottomLeft|
|
|
|
|
|
Round_UpperRight|Is_Horizontal;
|
|
|
|
|
if(!enabled)
|
|
|
|
@ -1489,9 +1489,9 @@ void LipstikStyle::drawKStylePrimitive(KStylePrimitive kpe,
|
|
|
|
|
Draw_Left|Draw_Right|Draw_Top|Round_UpperLeft|Round_UpperRight|
|
|
|
|
|
Draw_Bottom|Round_BottomLeft|Round_BottomRight);
|
|
|
|
|
|
|
|
|
|
TQRegion tqmask(xcenter-15, ycenter-6, 31, 13);
|
|
|
|
|
TQRegion mask(xcenter-15, ycenter-6, 31, 13);
|
|
|
|
|
|
|
|
|
|
p->setClipRegion(tqmask);
|
|
|
|
|
p->setClipRegion(mask);
|
|
|
|
|
uint surfaceFlags = Draw_Left|Draw_Right|Draw_Top|Round_UpperLeft|Round_UpperRight|
|
|
|
|
|
Is_Horizontal;
|
|
|
|
|
|
|
|
|
@ -1515,8 +1515,8 @@ void LipstikStyle::drawKStylePrimitive(KStylePrimitive kpe,
|
|
|
|
|
renderContour(p, TQRect(xcenter-7, ycenter-16, 16, 33), cg.background(), contour,
|
|
|
|
|
Draw_Left|Draw_Right|Draw_Top|Round_UpperLeft|Round_UpperRight|Draw_Bottom|Round_BottomLeft|Round_BottomRight);
|
|
|
|
|
|
|
|
|
|
TQRegion tqmask(xcenter-6, ycenter-15, 13, 31);
|
|
|
|
|
p->setClipRegion(tqmask);
|
|
|
|
|
TQRegion mask(xcenter-6, ycenter-15, 13, 31);
|
|
|
|
|
p->setClipRegion(mask);
|
|
|
|
|
uint surfaceFlags = Draw_Left|Draw_Top|Draw_Bottom|Round_UpperLeft|Round_BottomLeft|
|
|
|
|
|
Round_UpperRight|Is_Horizontal;
|
|
|
|
|
|
|
|
|
@ -2524,15 +2524,15 @@ void LipstikStyle::tqdrawControl(ControlElement element,
|
|
|
|
|
reverseLayout ? Draw_Left|Draw_Right|Draw_Top|Draw_Bottom|Round_UpperLeft|Round_BottomLeft
|
|
|
|
|
: Draw_Left|Draw_Right|Draw_Top|Draw_Bottom|Round_UpperRight|Round_BottomRight);
|
|
|
|
|
|
|
|
|
|
TQRegion tqmask(Rsurface);
|
|
|
|
|
TQRegion mask(Rsurface);
|
|
|
|
|
if(reverseLayout) {
|
|
|
|
|
tqmask -= TQRegion(Rsurface.left(), Rsurface.top(), 1, 1);
|
|
|
|
|
tqmask -= TQRegion(Rsurface.left(), Rsurface.bottom(), 1, 1);
|
|
|
|
|
mask -= TQRegion(Rsurface.left(), Rsurface.top(), 1, 1);
|
|
|
|
|
mask -= TQRegion(Rsurface.left(), Rsurface.bottom(), 1, 1);
|
|
|
|
|
} else {
|
|
|
|
|
tqmask -= TQRegion(Rsurface.right(), Rsurface.top(), 1, 1);
|
|
|
|
|
tqmask -= TQRegion(Rsurface.right(), Rsurface.bottom(), 1, 1);
|
|
|
|
|
mask -= TQRegion(Rsurface.right(), Rsurface.top(), 1, 1);
|
|
|
|
|
mask -= TQRegion(Rsurface.right(), Rsurface.bottom(), 1, 1);
|
|
|
|
|
}
|
|
|
|
|
p->setClipRegion(tqmask);
|
|
|
|
|
p->setClipRegion(mask);
|
|
|
|
|
int counter = 0;
|
|
|
|
|
TQPixmap surfaceTile(21, r.height()-2);
|
|
|
|
|
TQPainter surfacePainter(&surfaceTile);
|
|
|
|
@ -2606,8 +2606,8 @@ void LipstikStyle::tqdrawControl(ControlElement element,
|
|
|
|
|
case CE_TabBarTab: {
|
|
|
|
|
const TQTabBar * tb = (const TQTabBar *) widget;
|
|
|
|
|
bool cornerWidget = false;
|
|
|
|
|
if( ::tqqt_cast<TQTabWidget*>(tb->tqparent()) ) {
|
|
|
|
|
const TQTabWidget *tw = (const TQTabWidget*)tb->tqparent();
|
|
|
|
|
if( ::tqqt_cast<TQTabWidget*>(tb->parent()) ) {
|
|
|
|
|
const TQTabWidget *tw = (const TQTabWidget*)tb->parent();
|
|
|
|
|
// is there a corner widget in the (top) left edge?
|
|
|
|
|
TQWidget *cw = tw->cornerWidget(TQt::TopLeft);
|
|
|
|
|
if(cw)
|
|
|
|
@ -2942,7 +2942,7 @@ void LipstikStyle::tqdrawControl(ControlElement element,
|
|
|
|
|
|
|
|
|
|
// Do we have an icon and are checked at the same time?
|
|
|
|
|
// Then dont draw the icon, only the check. I believe its more
|
|
|
|
|
// aptqparent its checked, compared to an almost invisible pressed background only.
|
|
|
|
|
// apparent its checked, compared to an almost invisible pressed background only.
|
|
|
|
|
if ( checkable && /*!active &&*/ mi->isChecked() ) {
|
|
|
|
|
qDrawShadePanel( p, cr.x(), cr.y(), cr.width(), cr.height(), cg, true, 1,
|
|
|
|
|
&cg.brush(TQColorGroup::Midlight) );
|
|
|
|
@ -3890,7 +3890,7 @@ TQSize LipstikStyle::tqsizeFromContents(ContentsType t,
|
|
|
|
|
|
|
|
|
|
case CT_ToolButton:
|
|
|
|
|
{
|
|
|
|
|
if(widget->tqparent() && ::tqqt_cast<TQToolBar*>(widget->tqparent()) )
|
|
|
|
|
if(widget->parent() && ::tqqt_cast<TQToolBar*>(widget->parent()) )
|
|
|
|
|
return TQSize( s.width()+2*4+_toolBarSpacing, s.height()+2*4 );
|
|
|
|
|
else
|
|
|
|
|
return KStyle::tqsizeFromContents (t, widget, s, opt);
|
|
|
|
|