Fix scrolldown arrow not showing on popup for QMenu
authorMiikka Heikkinen <miikka.heikkinen@digia.com>
Thu, 4 Oct 2012 13:09:02 +0000 (16:09 +0300)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 10 Oct 2012 06:45:22 +0000 (08:45 +0200)
commitfe8eb057fa05433e96de21df34871647f421f962
treebfe8624b988b9c12f5a1f9a43baf8b85850a3f1b
parent43325a23f35bce7eddfb2e74d2a65d381b1c6aa0
Fix scrolldown arrow not showing on popup for QMenu

Scrolldown arrow was not shown when a taller than screen QMenu was
opened because the check to draw it used the size that was already
adjusted to the screen.

Fixed by using the actual menu size in the check. Also fixed the case
where the menu was scrolled, closed, and reopened, in which case the
size hint would return incorrect cached value. This led to scrolldown
arrow not being shown in case the menu was previously fully scrolled
down.

Task-number: QTBUG-27445
Change-Id: Icd8d774071662a9317b3ac53cb05b31cadba96ff
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
src/widgets/widgets/qmenu.cpp