summaryrefslogtreecommitdiff
path: root/noncore/styles/phase/phasestyle.cpp
Unidiff
Diffstat (limited to 'noncore/styles/phase/phasestyle.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/styles/phase/phasestyle.cpp14
1 files changed, 10 insertions, 4 deletions
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
@@ -390,7 +390,10 @@ void PhaseStyle::drawPushButtonLabel (QPushButton *button, QPainter *painter) {
390 } 390 }
391#endif 391#endif
392 392
393 pixmap = button->iconSet()->pixmap(QIconSet::Small, mode); 393 if ( mode == QIconSet::Disabled )
394 pixmap = button->iconSet()->pixmap( QIconSet::Automatic, mode );
395 else
396 pixmap = button->iconSet()->pixmap();
394 if (button->text().isEmpty() && !button->pixmap()) { 397 if (button->text().isEmpty() && !button->pixmap()) {
395 painter->drawPixmap(x+w/2 - pixmap.width()/2, 398 painter->drawPixmap(x+w/2 - pixmap.width()/2,
396 y+h/2 - pixmap.height()/2, pixmap); 399 y+h/2 - pixmap.height()/2, pixmap);
@@ -569,8 +572,7 @@ int PhaseStyle::popupMenuItemHeight ( bool ,
569 + ITEMVMARGIN*2 + ITEMFRAME*2 ); 572 + ITEMVMARGIN*2 + ITEMFRAME*2 );
570 } 573 }
571 if ( mi->iconSet() ) 574 if ( mi->iconSet() )
572 h = QMAX(h, mi->iconSet()-> 575 h = QMAX(h, mi->iconSet()->pixmap().height()
573 pixmap(QIconSet::Small, QIconSet::Normal ).height()
574 + ITEMFRAME*2 ); 576 + ITEMFRAME*2 );
575 } 577 }
576 578
@@ -661,7 +663,11 @@ void PhaseStyle::drawPopupMenuItem ( QPainter * p, bool checkable,
661 mode = enabled ? QIconSet::Active : QIconSet::Disabled; 663 mode = enabled ? QIconSet::Active : QIconSet::Disabled;
662 else 664 else
663 mode = enabled ? QIconSet::Normal : QIconSet::Disabled; 665 mode = enabled ? QIconSet::Normal : QIconSet::Disabled;
664 QPixmap pixmap = mi->iconSet()->pixmap(QIconSet::Small, mode ); 666 QPixmap pixmap;
667 if ( mode == QIconSet::Disabled )
668 pixmap = mi->iconSet()->pixmap( QIconSet::Automatic, mode );
669 else
670 pixmap = mi->iconSet()->pixmap();
665 QRect pmrect(0, 0, pixmap.width(), pixmap.height() ); 671 QRect pmrect(0, 0, pixmap.width(), pixmap.height() );
666 QRect cr(x, y, maxpmw, h ); 672 QRect cr(x, y, maxpmw, h );
667 pmrect.moveCenter( cr.center() ); 673 pmrect.moveCenter( cr.center() );