summaryrefslogtreecommitdiff
authorleseb <leseb>2002-07-13 12:37:36 (UTC)
committer leseb <leseb>2002-07-13 12:37:36 (UTC)
commit6337e3836497ede8bb47aea5c7b65f4f8c08c4cd (patch) (side-by-side diff)
tree3a2b4d0d2ee302b1c01fbe8c0f3fbf40f8a30b3b
parent804c1ce9554548d1c0f46d28eb1b8f63b4341fdb (diff)
downloadopie-6337e3836497ede8bb47aea5c7b65f4f8c08c4cd.zip
opie-6337e3836497ede8bb47aea5c7b65f4f8c08c4cd.tar.gz
opie-6337e3836497ede8bb47aea5c7b65f4f8c08c4cd.tar.bz2
Small fix in drawing menubar
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/styles/liquid/liquid.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/noncore/styles/liquid/liquid.cpp b/noncore/styles/liquid/liquid.cpp
index fc925b8..87b5488 100644
--- a/noncore/styles/liquid/liquid.cpp
+++ b/noncore/styles/liquid/liquid.cpp
@@ -1971,57 +1971,57 @@ void LiquidStyle::drawArrow(QPainter *p, Qt::ArrowType type, bool on, int x,
QPointArray a;
switch(type){
case Qt::UpArrow:
a.setPoints(QCOORDARRLEN(u_arrow), u_arrow);
break;
case Qt::DownArrow:
a.setPoints(QCOORDARRLEN(d_arrow), d_arrow);
break;
case Qt::LeftArrow:
a.setPoints(QCOORDARRLEN(l_arrow), l_arrow);
break;
default:
a.setPoints(QCOORDARRLEN(r_arrow), r_arrow);
break;
}
a.translate(x, y);
p->drawLineSegments(a);
}
void LiquidStyle::drawMenuBarItem(QPainter *p, int x, int y, int w, int h,
QMenuItem *mi, QColorGroup &g, bool /*enabled*/, bool active )
{
- x -= 2; // Bug in Qt/E
- y -= 2;
- w += 2;
- h += 2;
+ if(active){
+ x -= 2; // Bug in Qt/E
+ y -= 2;
+ w += 2;
+ h += 2;
+ }
p-> fillRect ( x, y, w, h, g.brush(QColorGroup::Background));
- w -= 2;
-
if(menuHandler->useShadowText()){
QColor shadow;
if(p->device() && p->device()->devType() == QInternal::Widget &&
((QWidget *)p->device())->inherits("QMenuBar")){
shadow = ((QMenuBar*)p->device())->isTopLevel() ? g.button().dark(130) :
g.background().dark(130);
}
else
shadow = g.background().dark(130);
if(active){
drawClearBevel(p, x+1, y+1, w-1, h-1, g.button(), g.background());
QApplication::style().drawItem(p, x+1, y+1, w, h,
AlignCenter|ShowPrefix|DontClip|SingleLine,
g, mi->isEnabled(), NULL, mi->text(),
-1, &shadow);
QApplication::style().drawItem(p, x, y, w, h,
AlignCenter|ShowPrefix|DontClip|SingleLine,
g, mi->isEnabled(), NULL, mi->text(),
-1, &g.text());
}
else{
QApplication::style().drawItem(p, x+1, y+1, w, h,
AlignCenter|ShowPrefix|DontClip|SingleLine,