summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-11-21 21:58:18 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-11-21 21:58:18 -0600
commitb11ba445cccfa2cb9e5e6c09131d6e32c32392a6 (patch)
treeb0d01710c17ce1441eafb9c963c0031d8aad1557
parentb5f543cd3ac21fbe8bf461de25a6216533453bb6 (diff)
downloadqt3-b11ba445cccfa2cb9e5e6c09131d6e32c32392a6.tar.gz
qt3-b11ba445cccfa2cb9e5e6c09131d6e32c32392a6.zip
Properly polish QPopupMenu widgets
This relates to Bug 1489
-rw-r--r--src/kernel/qstyle.cpp2
-rw-r--r--src/widgets/qpopupmenu.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/kernel/qstyle.cpp b/src/kernel/qstyle.cpp
index e0b39b6..9b8e7ff 100644
--- a/src/kernel/qstyle.cpp
+++ b/src/kernel/qstyle.cpp
@@ -783,7 +783,7 @@ void QStyle::polish( QPalette&)
*/
void QStyle::polishPopupMenu( QPopupMenu *pm ) {
const QStyleControlElementData &ceData = populateControlElementDataFromWidget(pm, QStyleOption());
- unPolish(ceData, getControlElementFlagsForObject(pm, QStyleOption()), pm);
+ polish(ceData, getControlElementFlagsForObject(pm, QStyleOption()), pm);
}
/*!
diff --git a/src/widgets/qpopupmenu.cpp b/src/widgets/qpopupmenu.cpp
index 8821537..46e5220 100644
--- a/src/widgets/qpopupmenu.cpp
+++ b/src/widgets/qpopupmenu.cpp
@@ -1222,7 +1222,7 @@ QSize QPopupMenu::updateSize(bool force_update, bool do_resize)
continue;
int itemh = itemHeight( mi );
-
+
sz = style().sizeFromContents(QStyle::CT_PopupMenuItem, this,
QSize(0, itemh), QStyleOption(mi,maxPMWidth));
sz = sz.expandedTo(QSize(itemw, sz.height()));
@@ -1233,7 +1233,7 @@ QSize QPopupMenu::updateSize(bool force_update, bool do_resize)
y = contentsRect().y();
x +=itemw;
}
- if ( mi->widget() )
+ if ( mi->widget() )
mi->widget()->setGeometry( x, y, itemw, mi->widget()->height() );
y += itemh;
}