Merge pull request #9892 from hyperlogic/bug-fix/tablet-running-scripts-improvements

Tablet Running Scripts dialog fixes
This commit is contained in:
Seth Alves 2017-03-15 08:38:40 -08:00 committed by GitHub
commit df82c30e83
2 changed files with 273 additions and 238 deletions

View file

@ -79,9 +79,19 @@ Rectangle {
scripts.stopAllScripts();
}
Flickable {
id: flickable
width: parent.width
height: parent.height - (keyboard.raised ? keyboard.raisedHeight : 0)
contentWidth: parent.width
contentHeight: column.childrenRect.height
clip: true
Column {
id: column
width: parent.width
HifiControls.TabletContentSection {
id: firstSection
name: "Currently Running"
isFirst: true
@ -262,6 +272,15 @@ Rectangle {
placeholderText: "Filter"
onTextChanged: scriptsModel.filterRegExp = new RegExp("^.*" + text + ".*$", "i")
Component.onCompleted: scriptsModel.filterRegExp = new RegExp("^.*$", "i")
onActiveFocusChanged: {
// raise the keyboard
keyboard.raised = activeFocus;
// scroll to the bottom of the content area.
if (activeFocus) {
flickable.contentY = (flickable.contentHeight - flickable.height);
}
}
}
HifiControls.VerticalSpacer {
@ -341,5 +360,17 @@ Rectangle {
}
}
}
}
HifiControls.Keyboard {
id: keyboard
raised: false
numeric: false
anchors {
bottom: parent.bottom
left: parent.left
right: parent.right
}
}
}

View file

@ -54,6 +54,10 @@ Item {
d.currentItem.focus = true;
d.currentItem.forceActiveFocus();
breadcrumbText.text = d.currentItem.title;
if (typeof bgNavBar !== "undefined") {
d.currentItem.y = bgNavBar.height;
d.currentItem.height -= bgNavBar.height;
}
}
function popSource() {