summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/launchertab.cpp24
-rw-r--r--core/settings/launcher/menusettings.cpp44
-rw-r--r--libopie2/opieui/otabbar.cpp48
-rw-r--r--libopie2/opieui/otabbar.h42
-rw-r--r--libopie2/opieui/otabwidget.cpp1
-rw-r--r--noncore/styles/flat/flat.cpp10
-rw-r--r--noncore/styles/fresh/fresh.cpp8
-rw-r--r--noncore/styles/liquid/liquid.cpp15
-rw-r--r--noncore/styles/phase/phasestyle.cpp14
-rw-r--r--noncore/styles/theme/othemestyle.cpp11
-rw-r--r--noncore/styles/web/webstyle.cpp126
-rw-r--r--noncore/styles/web/webstyle.h2
12 files changed, 248 insertions, 97 deletions
diff --git a/core/launcher/launchertab.cpp b/core/launcher/launchertab.cpp
index 710f259..72ebf59 100644
--- a/core/launcher/launchertab.cpp
+++ b/core/launcher/launchertab.cpp
@@ -99,6 +99,6 @@ void LauncherTabBar::layoutTabs()
if ( t->iconSet() != 0 )
- available -= t->iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).width();
+ available -= t->iconSet()->pixmap().width();
}
if ( t->iconSet() != 0 )
- iw += t->iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).width();
+ iw += t->iconSet()->pixmap().width();
required += iw;
@@ -118,4 +118,4 @@ void LauncherTabBar::layoutTabs()
if ( t->iconSet() != 0 ) {
- w += t->iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).width();
- ih = t->iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).height();
+ w += t->iconSet()->pixmap().width();
+ ih = t->iconSet()->pixmap().height();
}
@@ -136,4 +136,4 @@ void LauncherTabBar::layoutTabs()
if ( t->iconSet() != 0 ) {
- w += t->iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).width();
- ih = t->iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).height();
+ w += t->iconSet()->pixmap().width();
+ ih = t->iconSet()->pixmap().height();
}
@@ -151,3 +151,3 @@ void LauncherTabBar::layoutTabs()
if ( t->iconSet() != 0 ) {
- ih = t->iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).height();
+ ih = t->iconSet()->pixmap().height();
}
@@ -222,4 +222,4 @@ void LauncherTabBar::paint( QPainter * p, QTab * t, bool selected ) const
if ( t->iconSet() != 0 ) {
- iw = t->iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).width() + 2;
- ih = t->iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).height();
+ iw = t->iconSet()->pixmap().width() + 2;
+ ih = t->iconSet()->pixmap().height();
}
@@ -253,3 +253,7 @@ void LauncherTabBar::paintLabel( QPainter* p, const QRect&,
mode = QIconSet::Active;
- QPixmap pixmap = t->iconSet()->pixmap( QIconSet::Small, mode );
+ QPixmap pixmap;
+ if ( mode == QIconSet::Disabled )
+ pixmap = t->iconSet()->pixmap( QIconSet::Automatic, mode );
+ else
+ pixmap = t->iconSet()->pixmap();
int pixw = pixmap.width();
diff --git a/core/settings/launcher/menusettings.cpp b/core/settings/launcher/menusettings.cpp
index 55bf358..29ce841 100644
--- a/core/settings/launcher/menusettings.cpp
+++ b/core/settings/launcher/menusettings.cpp
@@ -1,24 +1,24 @@
/*
-                This file is part of the OPIE Project
+ This file is part of the OPIE Project
=. Copyright (c) 2002 Trolltech AS <info@trolltech.com>
-             .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org>
-           .>+-=
- _;:,     .>    :=|. This file is free software; you can
-.> <`_,   >  .   <= redistribute it and/or modify it under
-:`=1 )Y*s>-.--   : the terms of the GNU General Public
-.="- .-=="i,     .._ License as published by the Free Software
- - .   .-<_>     .<> Foundation; either version 2 of the License,
-     ._= =}       : or (at your option) any later version.
-    .%`+i>       _;_.
-    .i_,=:_.      -<s. This file is distributed in the hope that
-     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
-    : ..    .:,     . . . without even the implied warranty of
-    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
-  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General
-..}^=.=       =       ; Public License for more details.
-++=   -.     .`     .:
- :     =  ...= . :.=- You should have received a copy of the GNU
- -.   .:....=;==+<; General Public License along with this file;
-  -_. . .   )=.  = see the file COPYING. If not, write to the
-    --        :-=` Free Software Foundation, Inc.,
+ .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org>
+ .>+-=
+_;:, .> :=|. This file is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU General Public
+.="- .-=="i, .._ License as published by the Free Software
+- . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This file is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General
+..}^=.= = ; Public License for more details.
+++= -. .` .:
+: = ...= . :.=- You should have received a copy of the GNU
+-. .:....=;==+<; General Public License along with this file;
+ -_. . . )=. = see the file COPYING. If not, write to the
+ -- :-=` Free Software Foundation, Inc.,
59 Temple Place - Suite 330,
@@ -107,3 +107,3 @@ void MenuSettings::init ( )
name = iface-> name ( );
- icon = iface-> icon ( ). pixmap ( QIconSet::Small, QIconSet::Normal );
+ icon = iface-> icon ( ). pixmap ();
iface-> release ( );
diff --git a/libopie2/opieui/otabbar.cpp b/libopie2/opieui/otabbar.cpp
index a62e18b..dc5df42 100644
--- a/libopie2/opieui/otabbar.cpp
+++ b/libopie2/opieui/otabbar.cpp
@@ -1,26 +1,26 @@
/*
-                This file is part of the Opie Project
+ This file is part of the Opie Project
-              Copyright (c) 2002 Dan Williams <williamsdr@acm.org>
+ Copyright (c) 2002 Dan Williams <williamsdr@acm.org>
=.
.=l.
-           .>+-=
- _;:,     .>    :=|. This program is free software; you can
-.> <`_,   >  .   <= redistribute it and/or modify it under
-:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
-.="- .-=="i,     .._ License as published by the Free Software
- - .   .-<_>     .<> Foundation; either version 2 of the License,
-     ._= =}       : or (at your option) any later version.
-    .%`+i>       _;_.
-    .i_,=:_.      -<s. This program is distributed in the hope that
-     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
-    : ..    .:,     . . . without even the implied warranty of
-    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
-  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
-..}^=.=       =       ; Library General Public License for more
-++=   -.     .`     .: details.
- :     =  ...= . :.=-
- -.   .:....=;==+<; You should have received a copy of the GNU
-  -_. . .   )=.  = Library General Public License along with
-    --        :-=` this library; see the file COPYING.LIB.
+ .>+-=
+_;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+- . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+: = ...= . :.=-
+-. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
@@ -33,2 +33,6 @@
+#include <qpe/applnk.h>
+
+#include <stdio.h>
+
using namespace Opie::Ui;
@@ -50,3 +54,3 @@ void OTabBar::paintLabel( QPainter* p, const QRect& br, QTab* t, bool has_focus
}
- QPixmap pixmap = t->iconset->pixmap( QIconSet::Small, mode );
+ QPixmap pixmap = t->iconset->pixmap();
int pixw = pixmap.width();
diff --git a/libopie2/opieui/otabbar.h b/libopie2/opieui/otabbar.h
index 925ae96..1044bdd 100644
--- a/libopie2/opieui/otabbar.h
+++ b/libopie2/opieui/otabbar.h
@@ -1,26 +1,26 @@
/*
-                This file is part of the Opie Project
+ This file is part of the Opie Project
-              Copyright (c) 2002 Dan Williams <williamsdr@acm.org>
+ Copyright (c) 2002 Dan Williams <williamsdr@acm.org>
=.
.=l.
-           .>+-=
- _;:,     .>    :=|. This program is free software; you can
-.> <`_,   >  .   <= redistribute it and/or modify it under
-:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
-.="- .-=="i,     .._ License as published by the Free Software
- - .   .-<_>     .<> Foundation; either version 2 of the License,
-     ._= =}       : or (at your option) any later version.
-    .%`+i>       _;_.
-    .i_,=:_.      -<s. This program is distributed in the hope that
-     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
-    : ..    .:,     . . . without even the implied warranty of
-    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
-  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
-..}^=.=       =       ; Library General Public License for more
-++=   -.     .`     .: details.
- :     =  ...= . :.=-
- -.   .:....=;==+<; You should have received a copy of the GNU
-  -_. . .   )=.  = Library General Public License along with
-    --        :-=` this library; see the file COPYING.LIB.
+ .>+-=
+_;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+- . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+: = ...= . :.=-
+-. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
diff --git a/libopie2/opieui/otabwidget.cpp b/libopie2/opieui/otabwidget.cpp
index 7333f5e..d617a9c 100644
--- a/libopie2/opieui/otabwidget.cpp
+++ b/libopie2/opieui/otabwidget.cpp
@@ -36,3 +36,2 @@
-#include <qpe/applnk.h>
#include <qpe/config.h>
diff --git a/noncore/styles/flat/flat.cpp b/noncore/styles/flat/flat.cpp
index f3bacf9..c164ecc 100644
--- a/noncore/styles/flat/flat.cpp
+++ b/noncore/styles/flat/flat.cpp
@@ -375,3 +375,3 @@ void FlatStyle::drawPushButtonLabel( QPushButton *btn, QPainter *p )
mode = QIconSet::Active;
- QPixmap pixmap = btn->iconSet()->pixmap( QIconSet::Small, mode );
+ QPixmap pixmap = btn->iconSet()->pixmap( QIconSet::Automatic, mode );
int pixw = pixmap.width();
@@ -904,3 +904,3 @@ int FlatStyle::popupMenuItemHeight( bool /*checkable*/, QMenuItem* mi, const QFo
if ( !mi->isSeparator() && mi->iconSet() != 0 ) {
- h = QMAX( h, mi->iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).height() + 2*motifItemFrame );
+ h = QMAX( h, mi->iconSet()->pixmap().height() + 2*motifItemFrame );
}
@@ -956,3 +956,7 @@ void FlatStyle::drawPopupMenuItem( QPainter* p, bool checkable, int maxpmw, int
mode = QIconSet::Active;
- QPixmap pixmap = mi->iconSet()->pixmap( QIconSet::Small, mode );
+ QPixmap pixmap;
+ if ( mode == QIconSet::Disabled )
+ pixmap = mi->iconSet()->pixmap( QIconSet::Automatic, mode );
+ else
+ pixmap = mi->iconSet()->pixmap();
int pixw = pixmap.width();
diff --git a/noncore/styles/fresh/fresh.cpp b/noncore/styles/fresh/fresh.cpp
index 831b620..856f68b 100644
--- a/noncore/styles/fresh/fresh.cpp
+++ b/noncore/styles/fresh/fresh.cpp
@@ -650,3 +650,3 @@ int FreshStyle::popupMenuItemHeight( bool /*checkable*/, QMenuItem* mi, const QF
if ( !mi->isSeparator() && mi->iconSet() != 0 ) {
- h = QMAX( h, mi->iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).height() + 2*motifItemFrame );
+ h = QMAX( h, mi->iconSet()->pixmap().height() + 2*motifItemFrame );
}
@@ -704,3 +704,7 @@ void FreshStyle::drawPopupMenuItem( QPainter* p, bool checkable, int maxpmw, int
mode = QIconSet::Active;
- QPixmap pixmap = mi->iconSet()->pixmap( QIconSet::Small, mode );
+ QPixmap pixmap;
+ if ( mode == QIconSet::Disabled )
+ pixmap = mi->iconSet()->pixmap( QIconSet::Automatic, mode );
+ else
+ pixmap = mi->iconSet()->pixmap();
int pixw = pixmap.width();
diff --git a/noncore/styles/liquid/liquid.cpp b/noncore/styles/liquid/liquid.cpp
index 51814e7..77cf198 100644
--- a/noncore/styles/liquid/liquid.cpp
+++ b/noncore/styles/liquid/liquid.cpp
@@ -1305,3 +1305,7 @@ void LiquidStyle::drawPushButtonLabel(QPushButton *btn, QPainter *p)
mode = QIconSet::Active;
- QPixmap pixmap = btn->iconSet()->pixmap( QIconSet::Small, mode );
+ QPixmap pixmap;
+ if ( mode == QIconSet::Disabled )
+ pixmap = btn->iconSet()->pixmap( QIconSet::Automatic, mode );
+ else
+ pixmap = btn->iconSet()->pixmap();
int pixw = pixmap.width();
@@ -2157,3 +2161,7 @@ static const int windowsRightBorder = 12;
mode = QIconSet::Active;
- QPixmap pixmap = mi->iconSet()->pixmap(QIconSet::Small, mode);
+ QPixmap pixmap;
+ if ( mode == QIconSet::Disabled )
+ pixmap = mi->iconSet()->pixmap( QIconSet::Automatic, mode );
+ else
+ pixmap = mi->iconSet()->pixmap();
int pixw = pixmap.width();
@@ -2238,4 +2246,3 @@ int LiquidStyle::popupMenuItemHeight(bool /*checkable*/, QMenuItem *mi,
if (mi->iconSet())
- h = QMAX(mi->iconSet()->
- pixmap(QIconSet::Small, QIconSet::Normal).height(), h);
+ h = QMAX(mi->iconSet()->pixmap().height(), h);
diff --git a/noncore/styles/phase/phasestyle.cpp b/noncore/styles/phase/phasestyle.cpp
index 746354e..c2b9de8 100644
--- a/noncore/styles/phase/phasestyle.cpp
+++ b/noncore/styles/phase/phasestyle.cpp
@@ -392,3 +392,6 @@ void PhaseStyle::drawPushButtonLabel (QPushButton *button, QPainter *painter) {
- pixmap = button->iconSet()->pixmap(QIconSet::Small, mode);
+ if ( mode == QIconSet::Disabled )
+ pixmap = button->iconSet()->pixmap( QIconSet::Automatic, mode );
+ else
+ pixmap = button->iconSet()->pixmap();
if (button->text().isEmpty() && !button->pixmap()) {
@@ -571,4 +574,3 @@ int PhaseStyle::popupMenuItemHeight ( bool ,
if ( mi->iconSet() )
- h = QMAX(h, mi->iconSet()->
- pixmap(QIconSet::Small, QIconSet::Normal ).height()
+ h = QMAX(h, mi->iconSet()->pixmap().height()
+ ITEMFRAME*2 );
@@ -663,3 +665,7 @@ void PhaseStyle::drawPopupMenuItem ( QPainter * p, bool checkable,
mode = enabled ? QIconSet::Normal : QIconSet::Disabled;
- QPixmap pixmap = mi->iconSet()->pixmap(QIconSet::Small, mode );
+ QPixmap pixmap;
+ if ( mode == QIconSet::Disabled )
+ pixmap = mi->iconSet()->pixmap( QIconSet::Automatic, mode );
+ else
+ pixmap = mi->iconSet()->pixmap();
QRect pmrect(0, 0, pixmap.width(), pixmap.height() );
diff --git a/noncore/styles/theme/othemestyle.cpp b/noncore/styles/theme/othemestyle.cpp
index 98e7253..106d206 100644
--- a/noncore/styles/theme/othemestyle.cpp
+++ b/noncore/styles/theme/othemestyle.cpp
@@ -1185,3 +1185,3 @@ void OThemeStyle::drawPushButtonLabel( QPushButton *btn, QPainter *p )
mode = QIconSet::Active;
- QPixmap pixmap = btn->iconSet() ->pixmap( QIconSet::Small, mode );
+ QPixmap pixmap = btn->iconSet() ->pixmap( QIconSet::Automatic, mode );
int pixw = pixmap.width();
@@ -1248,4 +1248,3 @@ int OThemeStyle::popupMenuItemHeight( bool /*checkable*/, QMenuItem *mi,
if ( mi->iconSet() ) {
- h2 = mi->iconSet() ->
- pixmap( QIconSet::Small, QIconSet::Normal ).height() + offset;
+ h2 = mi->iconSet() ->pixmap().height() + offset;
h = h2 > h ? h2 : h;
@@ -1327,3 +1326,7 @@ void OThemeStyle::drawPopupMenuItem( QPainter* p, bool checkable, int maxpmw,
mode = QIconSet::Active;
- QPixmap pixmap = mi->iconSet() ->pixmap( QIconSet::Small, mode );
+ QPixmap pixmap;
+ if ( mode == QIconSet::Disabled )
+ pixmap = mi->iconSet()->pixmap( QIconSet::Automatic, mode );
+ else
+ pixmap = mi->iconSet()->pixmap();
int pixw = pixmap.width();
diff --git a/noncore/styles/web/webstyle.cpp b/noncore/styles/web/webstyle.cpp
index cd3cf08..7b58d89 100644
--- a/noncore/styles/web/webstyle.cpp
+++ b/noncore/styles/web/webstyle.cpp
@@ -45,2 +45,11 @@ static ulong _savedFrameStyle;
+static const int ITEMFRAME = 1; // menu stuff
+static const int ITEMHMARGIN = 3;
+static const int ITEMVMARGIN = 0;
+
+static const int ARROWMARGIN = 6;
+static const int RIGHTBORDER = 10;
+static const int MINICONSIZE = 12;
+
+
static QColor contrastingForeground(const QColor & fg, const QColor & bg)
@@ -971,3 +980,3 @@ WebStyle::drawPopupMenuItem
int maxpmw,
- int tab,
+ int tabwidth,
QMenuItem * mi,
@@ -983,3 +992,114 @@ WebStyle::drawPopupMenuItem
// TODO
- QWindowsStyle::drawPopupMenuItem(p, checkable, maxpmw, tab, mi, pal, act, enabled, x, y, w, h);
+ //QWindowsStyle::drawPopupMenuItem(p, checkable, maxpmw, tab, mi, pal, act, enabled, x, y, w, h);
+ if ( !mi )
+ return;
+
+ QRect rect(x, y, w, h );
+ int x2, y2;
+ x2 = rect.right();
+ y2 = rect.bottom();
+ const QColorGroup& g = pal.active();
+ QColorGroup itemg = !enabled ? pal.disabled() : pal.active();
+
+ if ( checkable || maxpmw ) maxpmw = QMAX(maxpmw, 20);
+
+ if (act && enabled )
+ p->fillRect(x, y, w, h, g.highlight() );
+ else
+ p->fillRect(x, y, w, h, g.background() );
+
+ // draw seperator
+ if (mi->isSeparator() ) {
+ p->setPen( g.dark() );
+ p->drawLine( x+8, y+1, x+w-8, y+1 );
+
+ p->setPen( g.mid() );
+ p->drawLine( x+8, y, x+w-8, y );
+ p->drawPoint(x+w,y+1);
+
+ p->setPen( g.midlight() );
+ p->drawLine( x+8, y-1, x+w-8, y-1 );
+ p->drawPoint(x+8, y );
+ return;
+ }
+
+ // draw icon
+ QIconSet::Mode mode;
+ if ( mi->iconSet() && !mi->isChecked() ) {
+ if ( act )
+ mode = enabled ? QIconSet::Active : QIconSet::Disabled;
+ else
+ mode = enabled ? QIconSet::Normal : QIconSet::Disabled;
+ QPixmap pixmap;
+ if ( mode == QIconSet::Disabled )
+ pixmap = mi->iconSet()->pixmap( QIconSet::Automatic, mode );
+ else
+ pixmap = mi->iconSet()->pixmap();
+ QRect pmrect(0, 0, pixmap.width(), pixmap.height() );
+ QRect cr(x, y, maxpmw, h );
+ pmrect.moveCenter( cr.center() );
+ p->drawPixmap(pmrect.topLeft(), pixmap);
+ }
+
+ // draw check
+ if(mi->isChecked() ) {
+ drawCheckMark(p, x, y, maxpmw, h, itemg, act, !enabled );
+ }
+
+
+ // draw text
+ int xm = maxpmw + 2;
+ int xp = x + xm;
+ int tw = w -xm - 2;
+
+ p->setPen( enabled ? ( act ? g.highlightedText() : g.buttonText() ) :
+ g.mid() );
+
+
+ if ( mi->custom() ) {
+ p->save();
+ mi->custom()->paint(p, g, act, enabled,
+ xp, y+1, tw, h-2 );
+ p->restore();
+ }else { // draw label
+ QString text = mi->text();
+ if (!text.isNull() ) {
+ int t = text.find('\t');
+ const int tflags = AlignVCenter | DontClip |
+ ShowPrefix | SingleLine |
+ AlignLeft;
+
+ if (t >= 0) {
+ int tabx = x + w - tabwidth - RIGHTBORDER -
+ ITEMHMARGIN - ITEMFRAME;
+ p->drawText(tabx, y+ITEMVMARGIN, tabwidth,
+ h-2*ITEMVMARGIN, tflags,
+ text.mid(t+1) );
+ text = text.left(t );
+ }
+
+ // draw left label
+ p->drawText(xp, y+ITEMVMARGIN,
+ tw, h-2*ITEMVMARGIN,
+ tflags, text, t);
+ }else if ( mi->pixmap() ) { // pixmap as label
+ QPixmap pixmap = *mi->pixmap();
+ if ( pixmap.depth() == 1 )
+ p->setBackgroundMode( OpaqueMode );
+
+ int dx = ((w-pixmap.width() ) /2 ) +
+ ((w - pixmap.width()) %2 );
+ p->drawPixmap(x+dx, y+ITEMFRAME, pixmap );
+
+ if ( pixmap.depth() == 1 )
+ p->setBackgroundMode( TransparentMode );
+ }
+ }
+
+ if ( mi->popup() ) { // draw submenu arrow
+ int dim = (h-2*ITEMFRAME) / 2;
+ drawArrow( p, RightArrow, false,
+ x+w-ARROWMARGIN-ITEMFRAME-dim,
+ y+h/2-dim/2, dim, dim, g, enabled );
+ }
}
@@ -1170,3 +1290,3 @@ WebStyle::popupMenuItemHeight(bool, QMenuItem * i, const QFontMetrics & fm)
(
- i->iconSet()->pixmap(QIconSet::Small, QIconSet::Normal).height(),
+ i->iconSet()->pixmap().height(),
h
diff --git a/noncore/styles/web/webstyle.h b/noncore/styles/web/webstyle.h
index 83ab784..d6f153b 100644
--- a/noncore/styles/web/webstyle.h
+++ b/noncore/styles/web/webstyle.h
@@ -217,3 +217,3 @@ class WebStyle : public QWindowsStyle {
int maxpmw,
- int tab,
+ int tabwidth,
QMenuItem *,