summaryrefslogtreecommitdiff
path: root/noncore/styles/flat/flat.cpp
Unidiff
Diffstat (limited to 'noncore/styles/flat/flat.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/styles/flat/flat.cpp18
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
@@ -374,5 +374,5 @@ void FlatStyle::drawPushButtonLabel( QPushButton *btn, QPainter *p )
374 if ( mode == QIconSet::Normal && btn->hasFocus() ) 374 if ( mode == QIconSet::Normal && btn->hasFocus() )
375 mode = QIconSet::Active; 375 mode = QIconSet::Active;
376 QPixmap pixmap = btn->iconSet()->pixmap( QIconSet::Small, mode ); 376 QPixmap pixmap = btn->iconSet()->pixmap( QIconSet::Automatic, mode );
377 int pixw = pixmap.width(); 377 int pixw = pixmap.width();
378 int pixh = pixmap.height(); 378 int pixh = pixmap.height();
@@ -392,6 +392,6 @@ QRect FlatStyle::comboButtonRect( int x, int y, int w, int h)
392 return QRect(x+2, y+2, w-4-13, h-4); 392 return QRect(x+2, y+2, w-4-13, h-4);
393} 393}
394 394
395 395
396QRect FlatStyle::comboButtonFocusRect( int x, int y, int w, int h) 396QRect FlatStyle::comboButtonFocusRect( int x, int y, int w, int h)
397{ 397{
@@ -893,5 +893,5 @@ int FlatStyle::extraPopupMenuItemWidth( bool checkable, int maxpmw, QMenuItem* m
893int FlatStyle::popupMenuItemHeight( bool /*checkable*/, QMenuItem* mi, const QFontMetrics& fm ) 893int FlatStyle::popupMenuItemHeight( bool /*checkable*/, QMenuItem* mi, const QFontMetrics& fm )
894{ 894{
895#ifndef QT_NO_MENUDATA 895#ifndef QT_NO_MENUDATA
896 int h = 0; 896 int h = 0;
897 if ( mi->isSeparator() ) // separator height 897 if ( mi->isSeparator() ) // separator height
@@ -903,5 +903,5 @@ int FlatStyle::popupMenuItemHeight( bool /*checkable*/, QMenuItem* mi, const QFo
903 903
904 if ( !mi->isSeparator() && mi->iconSet() != 0 ) { 904 if ( !mi->isSeparator() && mi->iconSet() != 0 ) {
905 h = QMAX( h, mi->iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).height() + 2*motifItemFrame ); 905 h = QMAX( h, mi->iconSet()->pixmap().height() + 2*motifItemFrame );
906 } 906 }
907 if ( mi->custom() ) 907 if ( mi->custom() )
@@ -915,5 +915,5 @@ void FlatStyle::drawPopupMenuItem( QPainter* p, bool checkable, int maxpmw, int
915 bool act, bool enabled, int x, int y, int w, int h) 915 bool act, bool enabled, int x, int y, int w, int h)
916{ 916{
917#ifndef QT_NO_MENUDATA 917#ifndef QT_NO_MENUDATA
918 const QColorGroup & g = pal.active(); 918 const QColorGroup & g = pal.active();
919 bool dis = !enabled; 919 bool dis = !enabled;
@@ -955,5 +955,9 @@ void FlatStyle::drawPopupMenuItem( QPainter* p, bool checkable, int maxpmw, int
955 if (act && !dis ) 955 if (act && !dis )
956 mode = QIconSet::Active; 956 mode = QIconSet::Active;
957 QPixmap pixmap = mi->iconSet()->pixmap( QIconSet::Small, mode ); 957 QPixmap pixmap;
958 if ( mode == QIconSet::Disabled )
959 pixmap = mi->iconSet()->pixmap( QIconSet::Automatic, mode );
960 else
961 pixmap = mi->iconSet()->pixmap();
958 int pixw = pixmap.width(); 962 int pixw = pixmap.width();
959 int pixh = pixmap.height(); 963 int pixh = pixmap.height();