Draw inactive menu items

This fixes rendering glitches outside of Qt3/X11
pull/1/head
Timothy Pearson 13 years ago
parent 51673dc2f1
commit 5105b27800

@ -2881,6 +2881,28 @@ void LipstikStyle::drawControl(ControlElement element,
_sharperMenuGradient?_contrast+30:_contrast+3, Draw_Top|Draw_Bottom|Is_Horizontal);
}
} else {
// Draw inactive menu item
if ( widget->erasePixmap() && !widget->erasePixmap()->isNull() ) {
// Draw the transparency pixmap
// Transparency in KDE3/TQt3 is an EVIL hack! Beware!
p->drawPixmap( r.topLeft(), *widget->erasePixmap(), r );
} else {
// Draw a solid background
p->fillRect( r, cg.background().light( 105 ) );
//add a pretty bar on the left side of the menu, now looks good too!
if(_menuLeftSideBar && !active) {
if(_flatStripe) {
p->fillRect( TQRect(r.left(),r.top(), checkcol+4,r.bottom()-r.top()+1), getColor(cg, MenuStripeColor) );
} else {
if(_reverseGradients) {
renderGradient(p, TQRect(r.left(),r.top(), checkcol+4,r.bottom()-r.top()+1), getColor(cg, MenuStripeColor), cg.ba$
} else {
renderGradient(p, TQRect(r.left(),r.top(), checkcol+4,r.bottom()-r.top()+1),cg.background().light( 105 ), getColo$
}
}
}
}
// Draw focus rectangle
if(_drawFocusRect) {
p->setPen(TQPen(cg.highlight().dark(130), 1));
p->drawRect(TQRect(r.left(), r.top(), r.width(), r.height()));

Loading…
Cancel
Save