diff options
author | Daniel d'Andrada <daniel.dandrada@luxoft.com> | 2017-10-24 09:30:33 +0200 |
---|---|---|
committer | Daniel d'Andrada <daniel.dandrada@luxoft.com> | 2018-02-28 15:58:02 +0100 |
commit | d563abee402d616bdff2639c275775184069e042 (patch) | |
tree | 0959e93a7fe4379a934635e9b924464d9f32acb6 /tests | |
parent | 9962fb888ad888b768c1f4db549d0c250d07a43c (diff) |
Improve widget resizing
- Consider all widgets while dragging a handle and not just
those immediately above and below it
- Make it follow the users finger but still snap
at the proper places both during drag and upon release
Diffstat (limited to 'tests')
-rw-r--r-- | tests/qmltests/tst_HomePage.qml | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/tests/qmltests/tst_HomePage.qml b/tests/qmltests/tst_HomePage.qml index f4012545..32654372 100644 --- a/tests/qmltests/tst_HomePage.qml +++ b/tests/qmltests/tst_HomePage.qml @@ -9,7 +9,7 @@ Item { height: 600 QtObject { - id: foo + id: redApp property Item window property Item loadedWindow: Rectangle { color: "red" } @@ -25,14 +25,30 @@ Item { } QtObject { - id: bar + id: greenApp + property Item window + property Item loadedWindow: Rectangle { color: "green" } + + property bool active: false + property bool canBeActive: true + + property int heightRows: 2 + property int minHeightRows: 1 + + function start() { + window = loadedWindow; + } + } + + QtObject { + id: blueApp property Item window property Item loadedWindow: Rectangle { color: "blue" } property bool active: false property bool canBeActive: true - property int heightRows: 3 + property int heightRows: 2 property int minHeightRows: 1 function start() { @@ -44,8 +60,9 @@ Item { anchors.fill: parent widgetsList: ListModel { id: listModel } Component.onCompleted: { - listModel.append({"appInfo":foo}) - listModel.append({"appInfo":bar}) + listModel.append({"appInfo":redApp}) + listModel.append({"appInfo":greenApp}) + listModel.append({"appInfo":blueApp}) } } |