summaryrefslogtreecommitdiffstats
path: root/style/lipstik.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2012-03-22 17:17:24 -0500
committerTimothy Pearson <[email protected]>2012-03-22 17:17:24 -0500
commit5105b278009c2c7c7c42023c2d04b4a526e1ce45 (patch)
treef9567fd76cde3490bbfe50e6d8cd42f6da4bc80f /style/lipstik.cpp
parent51673dc2f113e98a782c12f784b17152c8ceb580 (diff)
downloadtde-style-lipstik-5105b278009c2c7c7c42023c2d04b4a526e1ce45.tar.gz
tde-style-lipstik-5105b278009c2c7c7c42023c2d04b4a526e1ce45.zip
Draw inactive menu items
This fixes rendering glitches outside of Qt3/X11
Diffstat (limited to 'style/lipstik.cpp')
-rw-r--r--style/lipstik.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/style/lipstik.cpp b/style/lipstik.cpp
index c666d07..b6e203e 100644
--- a/style/lipstik.cpp
+++ b/style/lipstik.cpp
@@ -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()));