-rw-r--r-- | library/lightstyle.cpp | 30 | ||||
-rw-r--r-- | library/qpestyle.cpp | 8 |
2 files changed, 23 insertions, 15 deletions
diff --git a/library/lightstyle.cpp b/library/lightstyle.cpp index 3bd1623..c5073ca 100644 --- a/library/lightstyle.cpp +++ b/library/lightstyle.cpp | |||
@@ -569,3 +569,3 @@ void LightStyle::drawTab( QPainter *p, const QTabBar *tb, QTab *t, bool selected | |||
569 | p->setFont( f ); | 569 | p->setFont( f ); |
570 | #endif | 570 | #endif |
571 | QRect r( t->rect() ); | 571 | QRect r( t->rect() ); |
@@ -595,3 +595,3 @@ void LightStyle::drawTab( QPainter *p, const QTabBar *tb, QTab *t, bool selected | |||
595 | //do shading; will not work for pixmap brushes | 595 | //do shading; will not work for pixmap brushes |
596 | QColor bg = tb->colorGroup().button(); | 596 | QColor bg = tb->colorGroup().button(); |
597 | // int h,s,v; | 597 | // int h,s,v; |
@@ -608,3 +608,3 @@ void LightStyle::drawTab( QPainter *p, const QTabBar *tb, QTab *t, bool selected | |||
608 | } | 608 | } |
609 | 609 | ||
610 | } | 610 | } |
@@ -688,3 +688,3 @@ void LightStyle::drawTab(QPainter *p, const QTabBar *tabbar, QTab *tab, | |||
688 | 688 | ||
689 | p->setPen( NoPen ); | 689 | p->setPen( NoPen ); |
690 | p->setBrush(g.brush(selected ? QColorGroup::Background : QColorGroup::Mid)); | 690 | p->setBrush(g.brush(selected ? QColorGroup::Background : QColorGroup::Mid)); |
@@ -884,5 +884,5 @@ void LightStyle::drawScrollBarControls( QPainter* p, const QScrollBar* scrollbar | |||
884 | 884 | ||
885 | 885 | ||
886 | int fudge = 3; //####disgusting hack | 886 | int fudge = 3; //####disgusting hack |
887 | 887 | ||
888 | if (scrollbar->orientation() == Horizontal) { | 888 | if (scrollbar->orientation() == Horizontal) { |
@@ -970,9 +970,9 @@ void LightStyle::drawScrollBarControls( QPainter* p, const QScrollBar* scrollbar | |||
970 | g.brush( QColorGroup::Mid )); | 970 | g.brush( QColorGroup::Mid )); |
971 | p->fillRect( sliderR.x() + sliderR.width() - 2, | 971 | p->fillRect( sliderR.x() + sliderR.width() - 2, |
972 | sliderR.y(), 2, 2, | 972 | sliderR.y(), 2, 2, |
973 | g.brush( QColorGroup::Mid )); | 973 | g.brush( QColorGroup::Mid )); |
974 | p->fillRect( sliderR.x() + sliderR.width() - 2, | 974 | p->fillRect( sliderR.x() + sliderR.width() - 2, |
975 | sliderR.y() + sliderR.height() - 2, 2, 2, | 975 | sliderR.y() + sliderR.height() - 2, 2, 2, |
976 | g.brush( QColorGroup::Mid )); | 976 | g.brush( QColorGroup::Mid )); |
977 | p->fillRect( sliderR.x(), | 977 | p->fillRect( sliderR.x(), |
978 | sliderR.y() + sliderR.height() - 2, 2, 2, | 978 | sliderR.y() + sliderR.height() - 2, 2, 2, |
@@ -1120,3 +1120,3 @@ int LightStyle::popupMenuItemHeight( bool /*checkable*/, QMenuItem* mi, const QF | |||
1120 | { | 1120 | { |
1121 | #ifndef QT_NO_MENUDATA | 1121 | #ifndef QT_NO_MENUDATA |
1122 | int h = 0; | 1122 | int h = 0; |
@@ -1130,3 +1130,3 @@ int LightStyle::popupMenuItemHeight( bool /*checkable*/, QMenuItem* mi, const QF | |||
1130 | if ( !mi->isSeparator() && mi->iconSet() != 0 ) { | 1130 | if ( !mi->isSeparator() && mi->iconSet() != 0 ) { |
1131 | h = QMAX( h, mi->iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).height() + 2*motifItemFrame ); | 1131 | h = QMAX( h, mi->iconSet()->pixmap().height() + 2*motifItemFrame ); |
1132 | } | 1132 | } |
@@ -1142,3 +1142,3 @@ void LightStyle::drawPopupMenuItem( QPainter* p, bool checkable, int maxpmw, int | |||
1142 | { | 1142 | { |
1143 | #ifndef QT_NO_MENUDATA | 1143 | #ifndef QT_NO_MENUDATA |
1144 | const QColorGroup & g = pal.active(); | 1144 | const QColorGroup & g = pal.active(); |
@@ -1184,3 +1184,7 @@ void LightStyle::drawPopupMenuItem( QPainter* p, bool checkable, int maxpmw, int | |||
1184 | mode = QIconSet::Active; | 1184 | mode = QIconSet::Active; |
1185 | QPixmap pixmap = mi->iconSet()->pixmap( QIconSet::Small, mode ); | 1185 | QPixmap pixmap; |
1186 | if ( mode == QIconSet::Disabled ) | ||
1187 | pixmap = mi->iconSet()->pixmap( QIconSet::Automatic, mode ); | ||
1188 | else | ||
1189 | pixmap = mi->iconSet()->pixmap(); | ||
1186 | int pixw = pixmap.width(); | 1190 | int pixw = pixmap.width(); |
diff --git a/library/qpestyle.cpp b/library/qpestyle.cpp index 0566f6b..9503e02 100644 --- a/library/qpestyle.cpp +++ b/library/qpestyle.cpp | |||
@@ -1037,3 +1037,3 @@ int QPEStyle::popupMenuItemHeight( bool /*checkable*/, QMenuItem* mi, const QFon | |||
1037 | if ( !mi->isSeparator() && mi->iconSet() != 0 ) { | 1037 | if ( !mi->isSeparator() && mi->iconSet() != 0 ) { |
1038 | h = QMAX( h, mi->iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).height() + 2*motifItemFrame ); | 1038 | h = QMAX( h, mi->iconSet()->pixmap().height() + 2*motifItemFrame ); |
1039 | } | 1039 | } |
@@ -1091,3 +1091,7 @@ void QPEStyle::drawPopupMenuItem( QPainter* p, bool checkable, int maxpmw, int t | |||
1091 | mode = QIconSet::Active; | 1091 | mode = QIconSet::Active; |
1092 | QPixmap pixmap = mi->iconSet()->pixmap( QIconSet::Small, mode ); | 1092 | QPixmap pixmap; |
1093 | if ( mode == QIconSet::Disabled ) | ||
1094 | pixmap = mi->iconSet()->pixmap( QIconSet::Automatic, mode ); | ||
1095 | else | ||
1096 | pixmap = mi->iconSet()->pixmap(); | ||
1093 | int pixw = pixmap.width(); | 1097 | int pixw = pixmap.width(); |