Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.7.0 Alpha
-
None
Description
In test program, popup change own size with window aspect ratio change (i.e. landscape/portrait). In some cases it change height to wrong value.
import QtQuick 2.6 import Qt.labs.controls 1.0 ApplicationWindow { id: main visible: true width: 640 height: 480 Popup { id: popup property bool isLandscape: ApplicationWindow.window.width > ApplicationWindow.window.height x: (ApplicationWindow.window.width - width) / 2 y: (ApplicationWindow.window.height - height) / 2 padding: 0 margins: 0 closePolicy: Popup.NoAutoClose contentItem: Rectangle { implicitWidth: popup.isLandscape ? 400 : 200 implicitHeight: popup.isLandscape ? 200 : 400 color: "red" border { width: 1 color: "green" } } Component.onCompleted: open() onWidthChanged: console.log("width", width) onHeightChanged: console.log("height", height) } }
To reproduce the bug, decrease window size until rectangle change it's size and then increase. It should became almost square and get height 340 instead of 200.
I also cannot reproduce in on 5.6.