diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2018-04-17 14:43:11 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2018-04-17 12:51:18 +0000 |
commit | c0232099a9fac03ef0f5287b6a26dbbd46669c06 (patch) | |
tree | b539ddea2091d2b3bfa0868a367c612541d4bf6c /tests | |
parent | ca406d69544e6ddf20d940d903c9c97bca07ff90 (diff) |
Page: fix implicitWidth bindings
Don't add paddings to header and footer width when choosing the max.
Padding affects content, not headers and footers.
Change-Id: I92381762f97eab384b18510522bf788abecd8338
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/controls/data/tst_page.qml | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/auto/controls/data/tst_page.qml b/tests/auto/controls/data/tst_page.qml index 4fb2d089..8fe4414b 100644 --- a/tests/auto/controls/data/tst_page.qml +++ b/tests/auto/controls/data/tst_page.qml @@ -233,10 +233,13 @@ TestCase { + control.header.implicitHeight + control.footer.implicitHeight + 2 * control.spacing) control.header.implicitWidth = 150 - compare(control.implicitWidth, control.header.implicitWidth + control.leftPadding + control.rightPadding) + compare(control.implicitWidth, control.header.implicitWidth) control.footer.implicitWidth = 160 - compare(control.implicitWidth, control.footer.implicitWidth + control.leftPadding + control.rightPadding) + compare(control.implicitWidth, control.footer.implicitWidth) + + control.contentItem.implicitWidth = 170 + compare(control.implicitWidth, control.contentItem.implicitWidth + control.leftPadding + control.rightPadding) } function test_spacing_data() { |