Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.12.9
-
None
Description
Hi,
I'm facing a problem regarding top / bottom margin on components inside a layout (GridLayout here, but it seems to be the same with a ColumnLayout) with fillHeight.
Considering the following example :
import QtQuick 2.0 import QtQuick.Layouts 1.2 Item { width : 800 height : 480 GridLayout { anchors.fill: parent columns: 2 rows : 2 Rectangle { color:"red" Layout.fillHeight: true width : 400 } Rectangle { color:"green" Layout.rowSpan: 2 Layout.fillHeight: true width : 400 } Rectangle { color:"blue" Layout.fillHeight: true width : 400 Layout.bottomMargin: 10 } } }
The display is as WithBottom.jpg.
Just commenting the line "Layout.bottomMargin: 10" restablish the ratio between red and blue rectangles (see WithoutBottom.jpg).
There seem to be a ratio calculated that take into account the margins when my guess is that it shouldn't. Indeed, the height of the blue rectangle seems to be (top+bottom margins)*height of the red one (I've tested with like a dozen values, maybe not enough).