summaryrefslogtreecommitdiff
path: root/noncore/styles/liquid/liquid.cpp
authorsandman <sandman>2002-11-21 19:49:00 (UTC)
committer sandman <sandman>2002-11-21 19:49:00 (UTC)
commit440f1d4d439c83368a855355cdceda43660137f2 (patch) (side-by-side diff)
tree1b7ffd5157d2c141b9f978d08e47699ea2d013ff /noncore/styles/liquid/liquid.cpp
parent0b0ebb03a1fc0a316b52ce147d87fa89d3b5af16 (diff)
downloadopie-440f1d4d439c83368a855355cdceda43660137f2.zip
opie-440f1d4d439c83368a855355cdceda43660137f2.tar.gz
opie-440f1d4d439c83368a855355cdceda43660137f2.tar.bz2
- pixmaps in in menubars are now drawn (this is uncommon, but resulted in
blank icons in nethack for example) - small size optimization - updated the QPL diff
Diffstat (limited to 'noncore/styles/liquid/liquid.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/styles/liquid/liquid.cpp20
1 files changed, 15 insertions, 5 deletions
diff --git a/noncore/styles/liquid/liquid.cpp b/noncore/styles/liquid/liquid.cpp
index ba732aa..c8f8d20 100644
--- a/noncore/styles/liquid/liquid.cpp
+++ b/noncore/styles/liquid/liquid.cpp
@@ -2007,2 +2007,11 @@ void LiquidStyle::drawMenuBarItem(QPainter *p, int x, int y, int w, int h,
+ QPixmap *dummy = 0;
+
+ if ( mi-> pixmap ( ) && !mi-> pixmap ( )-> isNull ( )) {
+ dummy = new QPixmap ( mi-> pixmap ( )-> size ( ));
+ QBitmap dummy_mask ( dummy-> size ( ));
+ dummy_mask. fill ( color1 );
+ dummy-> setMask ( dummy_mask );
+ }
+
if(active){
@@ -2011,3 +2020,3 @@ void LiquidStyle::drawMenuBarItem(QPainter *p, int x, int y, int w, int h,
AlignCenter|ShowPrefix|DontClip|SingleLine,
- g, mi->isEnabled(), NULL, mi->text(),
+ g, mi->isEnabled(), dummy, mi->text(),
-1, &shadow);
@@ -2015,3 +2024,3 @@ void LiquidStyle::drawMenuBarItem(QPainter *p, int x, int y, int w, int h,
AlignCenter|ShowPrefix|DontClip|SingleLine,
- g, mi->isEnabled(), NULL, mi->text(),
+ g, mi->isEnabled(), mi-> pixmap ( ), mi->text(),
-1, &g.text());
@@ -2021,3 +2030,3 @@ void LiquidStyle::drawMenuBarItem(QPainter *p, int x, int y, int w, int h,
AlignCenter|ShowPrefix|DontClip|SingleLine,
- g, mi->isEnabled(), NULL, mi->text(),
+ g, mi->isEnabled(), dummy, mi->text(),
-1, &shadow);
@@ -2025,5 +2034,6 @@ void LiquidStyle::drawMenuBarItem(QPainter *p, int x, int y, int w, int h,
AlignCenter|ShowPrefix|DontClip|SingleLine,
- g, mi->isEnabled(), NULL, mi->text(),
+ g, mi->isEnabled(), mi-> pixmap ( ), mi->text(),
-1, &g.text());
}
+ delete dummy;
}
@@ -2034,3 +2044,3 @@ void LiquidStyle::drawMenuBarItem(QPainter *p, int x, int y, int w, int h,
AlignCenter|ShowPrefix|DontClip|SingleLine,
- g, mi->isEnabled(), NULL, mi->text(),
+ g, mi->isEnabled(), mi-> pixmap ( ), mi->text(),
-1, &g.text());