diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/widgets/qmenu.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/widgets/qmenu.cpp b/src/gui/widgets/qmenu.cpp index 1fd6816..0aa584f 100644 --- a/src/gui/widgets/qmenu.cpp +++ b/src/gui/widgets/qmenu.cpp @@ -1704,10 +1704,10 @@ QSize QMenu::sizeHint() const const QRect &rect = d->actionRects.at(i); if (rect.isNull()) continue; - if (rect.bottom() > s.height()) - s.setHeight(rect.y()+rect.height()); - if (rect.right() > s.width()) - s.setWidth(rect.right()); + if (rect.bottom() >= s.height()) + s.setHeight(rect.y() + rect.height()); + if (rect.right() >= s.width()) + s.setWidth(rect.x() + rect.width()); } if (d->tearoff) s.rheight() += style()->pixelMetric(QStyle::PM_MenuTearoffHeight, &opt, this); |