summaryrefslogtreecommitdiff
path: root/noncore/styles/fresh/fresh.cpp
authordrw <drw>2005-04-14 18:30:23 (UTC)
committer drw <drw>2005-04-14 18:30:23 (UTC)
commit5fd266a3a5a6d9a1acb9c38e4802ff06ba38beaf (patch) (unidiff)
treed4ba8a948d876db9bbff10cbd282fd16aab91feb /noncore/styles/fresh/fresh.cpp
parent7a3b813cc3bfbb2f7c31f347c35405851e82aecf (diff)
downloadopie-5fd266a3a5a6d9a1acb9c38e4802ff06ba38beaf.zip
opie-5fd266a3a5a6d9a1acb9c38e4802ff06ba38beaf.tar.gz
opie-5fd266a3a5a6d9a1acb9c38e4802ff06ba38beaf.tar.bz2
More icon sizing updates
Diffstat (limited to 'noncore/styles/fresh/fresh.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/styles/fresh/fresh.cpp8
1 files changed, 6 insertions, 2 deletions
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
@@ -645,13 +645,13 @@ int FreshStyle::popupMenuItemHeight( bool /*checkable*/, QMenuItem* mi, const QF
645 else if ( mi->pixmap() ) // pixmap height 645 else if ( mi->pixmap() ) // pixmap height
646 h = mi->pixmap()->height() + 2*motifItemFrame; 646 h = mi->pixmap()->height() + 2*motifItemFrame;
647 else // text height 647 else // text height
648 h = fm.height() + 2*motifItemVMargin + 2*motifItemFrame - 1; 648 h = fm.height() + 2*motifItemVMargin + 2*motifItemFrame - 1;
649 649
650 if ( !mi->isSeparator() && mi->iconSet() != 0 ) { 650 if ( !mi->isSeparator() && mi->iconSet() != 0 ) {
651 h = QMAX( h, mi->iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).height() + 2*motifItemFrame ); 651 h = QMAX( h, mi->iconSet()->pixmap().height() + 2*motifItemFrame );
652 } 652 }
653 if ( mi->custom() ) 653 if ( mi->custom() )
654 h = QMAX( h, mi->custom()->sizeHint().height() + 2*motifItemVMargin + 2*motifItemFrame ) - 1; 654 h = QMAX( h, mi->custom()->sizeHint().height() + 2*motifItemVMargin + 2*motifItemFrame ) - 1;
655 return h; 655 return h;
656#endif 656#endif
657} 657}
@@ -699,13 +699,17 @@ void FreshStyle::drawPopupMenuItem( QPainter* p, bool checkable, int maxpmw, int
699 } 699 }
700 700
701 if ( mi->iconSet() ) { // draw iconset 701 if ( mi->iconSet() ) { // draw iconset
702 QIconSet::Mode mode = dis ? QIconSet::Disabled : QIconSet::Normal; 702 QIconSet::Mode mode = dis ? QIconSet::Disabled : QIconSet::Normal;
703 if (act && !dis ) 703 if (act && !dis )
704 mode = QIconSet::Active; 704 mode = QIconSet::Active;
705 QPixmap pixmap = mi->iconSet()->pixmap( QIconSet::Small, mode ); 705 QPixmap pixmap;
706 if ( mode == QIconSet::Disabled )
707 pixmap = mi->iconSet()->pixmap( QIconSet::Automatic, mode );
708 else
709 pixmap = mi->iconSet()->pixmap();
706 int pixw = pixmap.width(); 710 int pixw = pixmap.width();
707 int pixh = pixmap.height(); 711 int pixh = pixmap.height();
708 if ( act && !dis ) { 712 if ( act && !dis ) {
709 if ( !mi->isChecked() ) 713 if ( !mi->isChecked() )
710 qDrawShadePanel( p, x, y, checkcol, h, g, FALSE, 1, &g.brush( QColorGroup::Button ) ); 714 qDrawShadePanel( p, x, y, checkcol, h, g, FALSE, 1, &g.brush( QColorGroup::Button ) );
711 } 715 }