From 5421162ab88054f288717534e426f2a8cfda9c47 Mon Sep 17 00:00:00 2001 From: Igor Andruszkiewicz Date: Sat, 5 Mar 2016 17:04:49 +0100 Subject: [PATCH] tests: Rectangle implicitWidth and implicitHeight test Added test that covers implicitWidth and implicitHeight. --- tests/Render/Simple/RectangleImplicitSize.png | Bin 0 -> 162 bytes tests/Render/Simple/RectangleImplicitSize.qml | 64 ++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 tests/Render/Simple/RectangleImplicitSize.png create mode 100644 tests/Render/Simple/RectangleImplicitSize.qml diff --git a/tests/Render/Simple/RectangleImplicitSize.png b/tests/Render/Simple/RectangleImplicitSize.png new file mode 100644 index 0000000000000000000000000000000000000000..7cf0c79e30703eb95308309530df6050ec9babf5 GIT binary patch literal 162 zcmeAS@N?(olHy`uVBq!ia0vp^Q9#Va!3HEv)I7feDb50q$YKTtz9S&aI8~cZ8Ymdz z>EamT(fRhmM&1Jo0xSpH=XGeFy)d)5tBT9upr@Po+m;tg+@p<@A1_mSckgTM>$k7M z{hrBO%4^wn+I@HQR>^-#TR0c`a^yN?2s_OdxYcq&t;Ou-w`H7yg{=?o0?lXeboFyt I=akR{02Bc^fdBvi literal 0 HcmV?d00001 diff --git a/tests/Render/Simple/RectangleImplicitSize.qml b/tests/Render/Simple/RectangleImplicitSize.qml new file mode 100644 index 000000000..dc5e45a42 --- /dev/null +++ b/tests/Render/Simple/RectangleImplicitSize.qml @@ -0,0 +1,64 @@ +import QtQuick 2.0 + +Rectangle { + width: 90 + height: 10 + color: 'yellow' + + Rectangle { + width: 0 + height: 10 + color: 'pink' + } + Rectangle { + width: 10 + height: 0 + color: 'brown' + } + Rectangle { + width: 0 + height: 0 + x: 10 + color: 'blue' + } + Rectangle { + implicitWidth: 10 + implicitHeight: 10 + x: 20 + color: 'red' + } + Rectangle { + width: 5 + height: 10 + implicitWidth: 10 + implicitHeight: 5 + x: 30 + color: 'pink' + } + Rectangle { + width: 0 + height: 0 + implicitWidth: 10 + implicitHeight: 10 + x: 40 + color: 'orange' + } + Rectangle { + implicitWidth: -5 + implicitHeight: 10 + x: 50 + color: "#00ffee" + } + Rectangle { + width: 10 + implicitHeight: 10 + x: 60 + color: 'gray' + } + Rectangle { + height: 10 + implicitWidth: 10 + x: 70 + color: 'green' + } +}