summaryrefslogtreecommitdiff
path: root/noncore/styles/theme/othemestyle.cpp
Side-by-side diff
Diffstat (limited to 'noncore/styles/theme/othemestyle.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/styles/theme/othemestyle.cpp11
1 files changed, 7 insertions, 4 deletions
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
@@ -1180,13 +1180,13 @@ void OThemeStyle::drawPushButtonLabel( QPushButton *btn, QPainter *p )
// Next, draw iconset, if any
if ( btn->iconSet() && !btn->iconSet() ->isNull() ) {
QIconSet::Mode mode = btn->isEnabled()
? QIconSet::Normal : QIconSet::Disabled;
if ( mode == QIconSet::Normal && btn->hasFocus() )
mode = QIconSet::Active;
- QPixmap pixmap = btn->iconSet() ->pixmap( QIconSet::Small, mode );
+ QPixmap pixmap = btn->iconSet() ->pixmap( QIconSet::Automatic, mode );
int pixw = pixmap.width();
int pixh = pixmap.height();
p->drawPixmap( x + 6, y + h / 2 - pixh / 2, pixmap );
x += pixw + 8;
w -= pixw + 8;
@@ -1243,14 +1243,13 @@ int OThemeStyle::popupMenuItemHeight( bool /*checkable*/, QMenuItem *mi,
offset + 16;
if ( mi->pixmap() ) {
h2 = mi->pixmap() ->height() + offset;
h = h2 > h ? h2 : h;
}
if ( mi->iconSet() ) {
- h2 = mi->iconSet() ->
- pixmap( QIconSet::Small, QIconSet::Normal ).height() + offset;
+ h2 = mi->iconSet() ->pixmap().height() + offset;
h = h2 > h ? h2 : h;
}
h2 = fm.height() + offset;
h = h2 > h ? h2 : h;
return ( h );
}
@@ -1322,13 +1321,17 @@ void OThemeStyle::drawPopupMenuItem( QPainter* p, bool checkable, int maxpmw,
if ( !mi )
return ;
if ( mi->iconSet() ) {
QIconSet::Mode mode = dis ? QIconSet::Disabled : QIconSet::Normal;
if ( act && !dis )
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();
int pixh = pixmap.height();
QRect cr( x, y, checkcol, h );
QRect pmr( 0, 0, pixw, pixh );
pmr.moveCenter( cr.center() );
p->setPen( itemg.text() );