From b251dc9ed6a0a56dc4767c29d79875584288ce5e Mon Sep 17 00:00:00 2001 From: "Anthony J. Thibault" Date: Thu, 12 Jan 2017 13:10:31 -0800 Subject: [PATCH] Tablet springboard can now be scrolled --- .../resources/qml/hifi/tablet/Tablet.qml | 31 ++++++++++++------- scripts/developer/tests/tabletTest.js | 8 +++++ 2 files changed, 28 insertions(+), 11 deletions(-) diff --git a/interface/resources/qml/hifi/tablet/Tablet.qml b/interface/resources/qml/hifi/tablet/Tablet.qml index ee3f0a4f32..63ea386452 100644 --- a/interface/resources/qml/hifi/tablet/Tablet.qml +++ b/interface/resources/qml/hifi/tablet/Tablet.qml @@ -170,19 +170,28 @@ Item { anchors.top: bgTopBar.bottom anchors.topMargin: 0 - Flow { - id: flowMain - spacing: 16 - anchors.right: parent.right - anchors.rightMargin: 30 - anchors.left: parent.left - anchors.leftMargin: 30 - anchors.bottom: parent.bottom - anchors.bottomMargin: 30 - anchors.top: parent.top - anchors.topMargin: 30 + Flickable { + id: flickable + width: parent.width + height: parent.height + contentWidth: parent.width + contentHeight: flowMain.childrenRect.height + flowMain.anchors.topMargin + flowMain.anchors.bottomMargin + flowMain.spacing + clip: true + Flow { + id: flowMain + spacing: 16 + anchors.right: parent.right + anchors.rightMargin: 30 + anchors.left: parent.left + anchors.leftMargin: 30 + anchors.bottom: parent.bottom + anchors.bottomMargin: 30 + anchors.top: parent.top + anchors.topMargin: 30 + } } } + states: [ State { name: "muted state" diff --git a/scripts/developer/tests/tabletTest.js b/scripts/developer/tests/tabletTest.js index 9eba7e53d7..438d0a4b99 100644 --- a/scripts/developer/tests/tabletTest.js +++ b/scripts/developer/tests/tabletTest.js @@ -15,6 +15,14 @@ var button = tablet.addButton({ text: "BAM!!!" }); +var TEST_BUTTON_COUNT = 10; +for (var i = 0; i < TEST_BUTTON_COUNT; i++) { + tablet.addButton({ + text: "TEST_" + i, + inDebugMode: true + }); +} + // change the name and isActive state every second... var names = ["BAM!", "BAM!!", "BAM!!!", "BAM!!!!"]; var nameIndex = 0;