summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-08-11 16:57:39 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-08-11 16:57:39 -0500
commit672a55040f27575c246bae31e7746b47c3239ee8 (patch)
tree8a68ea638cedcb910eda0bccdb07199b18f115b5 /src
parent403cd53c4e6f6b35bf9881c44efb9f41f5c65b57 (diff)
downloadqt3-672a55040f27575c246bae31e7746b47c3239ee8.tar.gz
qt3-672a55040f27575c246bae31e7746b47c3239ee8.zip
Fix QCompactStyle compilation
Diffstat (limited to 'src')
-rw-r--r--src/styles/qcompactstyle.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/styles/qcompactstyle.cpp b/src/styles/qcompactstyle.cpp
index 7c8d93b..7c7e0f5 100644
--- a/src/styles/qcompactstyle.cpp
+++ b/src/styles/qcompactstyle.cpp
@@ -84,6 +84,7 @@ static const int motifCheckMarkHMargin = 1; // horiz. margins of check mark
static const int windowsRightBorder = 8; // right border on windows
static const int windowsCheckMarkWidth = 2; // checkmarks width on windows
+#if 0
static int extraPopupMenuItemWidth( bool checkable, int maxpmw, QMenuItem* mi, const QFontMetrics& /*fm*/ )
{
int w = 2*motifItemHMargin + 2*motifItemFrame; // a little bit of border can never harm
@@ -132,12 +133,13 @@ static int popupMenuItemHeight( bool /*checkable*/, QMenuItem* mi, const QFontMe
h = QMAX( h, mi->custom()->sizeHint().height() + 2*motifItemVMargin + 2*motifItemFrame ) - 1;
return h;
}
+#endif
-void drawPopupMenuItem( QPainter* p, bool checkable,
- int maxpmw, int tab, QMenuItem* mi,
- const QPalette& pal, bool act,
- bool enabled,
- int x, int y, int w, int h)
+void drawPopupMenuItem( QPainter*, bool,
+ int, int, QMenuItem*,
+ const QPalette&, bool,
+ bool,
+ int, int, int, int)
{
}
@@ -149,7 +151,7 @@ void QCompactStyle::drawControl( ControlElement element, QPainter *p, QStyleCont
switch ( element ) {
case CE_PopupMenuItem:
{
- if (! (elementFlags & CEF_HasWidget) || opt.isDefault())
+ if ( (elementFlags & CEF_UseGenericParameters) || opt.isDefault())
break;
QMenuItem *mi = opt.menuItem();
@@ -234,7 +236,7 @@ void QCompactStyle::drawControl( ControlElement element, QPainter *p, QStyleCont
if (act)
cflags |= Style_On;
- drawPrimitive( PE_CheckMark, p, QRect(x + motifItemFrame + 2, y + motifItemFrame,
+ drawPrimitive( PE_CheckMark, p, ceData, elementFlags, QRect(x + motifItemFrame + 2, y + motifItemFrame,
mw, mh), itemg, cflags, opt );
}
}
@@ -301,10 +303,10 @@ void QCompactStyle::drawControl( ControlElement element, QPainter *p, QStyleCont
white, white,
dis ? discol : white,
discol, white );
- drawPrimitive(PE_ArrowRight, p, QRect(x+w - motifArrowHMargin - motifItemFrame - dim, y + h / 2 - dim / 2, dim, dim),
+ drawPrimitive(PE_ArrowRight, p, ceData, elementFlags, QRect(x+w - motifArrowHMargin - motifItemFrame - dim, y + h / 2 - dim / 2, dim, dim),
g2, Style_Enabled);
} else {
- drawPrimitive(PE_ArrowRight, p, QRect(x+w - motifArrowHMargin - motifItemFrame - dim, y + h / 2 - dim / 2, dim, dim),
+ drawPrimitive(PE_ArrowRight, p, ceData, elementFlags, QRect(x+w - motifArrowHMargin - motifItemFrame - dim, y + h / 2 - dim / 2, dim, dim),
g, !dis ? Style_Enabled : Style_Default);
}
}