Diffstat (limited to 'noncore/styles/flat/flat.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/styles/flat/flat.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
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(); @@ -393,4 +393,4 @@ QRect FlatStyle::comboButtonRect( int x, int y, int w, int h) } - - + + QRect FlatStyle::comboButtonFocusRect( int x, int y, int w, int h) @@ -894,3 +894,3 @@ int FlatStyle::popupMenuItemHeight( bool /*checkable*/, QMenuItem* mi, const QFo { -#ifndef QT_NO_MENUDATA +#ifndef QT_NO_MENUDATA int h = 0; @@ -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 ); } @@ -916,3 +916,3 @@ void FlatStyle::drawPopupMenuItem( QPainter* p, bool checkable, int maxpmw, int { -#ifndef QT_NO_MENUDATA +#ifndef QT_NO_MENUDATA const QColorGroup & g = pal.active(); @@ -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(); |