aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/rendercontrol/rendercontrol_d3d11
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@qt.io>2024-06-17 10:52:38 +0200
committerRichard Moe Gustavsen <richard.gustavsen@qt.io>2024-06-24 19:29:33 +0200
commit060afe7c097af0dc7bbc104706e6bb9607fdb47c (patch)
treedd365fba7f1a7505cb691750fa5aa88cfbe3c5e5 /examples/quick/rendercontrol/rendercontrol_d3d11
parent3d1632ac7ffe2ac3e67e9b2f599caff67e41232d (diff)
QQuickPopup: support popups with negative insetsHEADdev
A Popup can have negative insets. This means that the the background will be drawn outside the bounds of the popup. This is fine when the popup is an item in the scene, since items are allowed to draw out-of-bounds. But when placing the popup inside a window, this is no longer true; Since the window will be resized to the same size as the popup, the background will be clipped. Since we plan to make popup windows the default in Qt 6.8, this clipping will quickly be seen as a regression. This issue can be seen if opening a context menu in the Imagine style, since the menus in that style use negative insets to draw a drop-shadow outside the popup. In order to make sure that we end up drawing the whole popup also when using popup windows, this patch will ensure that we resize the window to also include the (negative) insets. By positioning the popupItem inside the window according to the insets, and at the same time, move the window a bit back and up accordingly, the whole popupItem will be visible and end up at the requested position. With this change, the menus in the Imagine style will be drawn correctly. So update the macOS and Windows styles as well so that they all implement shadows the same way. This also allowes us to remove some early changes done to QQuickPopupItem, like overriding the contains() function. Pick-to: 6.8 Change-Id: I7a0b597bc768d3c485a125c644139dfc7eb0b8ab Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'examples/quick/rendercontrol/rendercontrol_d3d11')
0 files changed, 0 insertions, 0 deletions