Skip to content

Commit

Permalink
fix: terminal auto scroll updates (closes uavos/apx-v10-releases#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
uavinda committed Sep 30, 2019
1 parent 8363d11 commit 059e4c4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 16 deletions.
26 changes: 12 additions & 14 deletions src/Plugins/System/Terminal/qml/Terminal.qml
Expand Up @@ -53,7 +53,7 @@ ColumnLayout {
if(scrolling && (!atYEnd)){
scrollTimer.stop()
stickEnd=false
}else scrollTimer.restart()
}//else scrollTimer.restart()
}
Timer {
id: scrollTimer
Expand All @@ -70,34 +70,32 @@ ColumnLayout {
focus: false
keyNavigationEnabled: false

//onCountChanged: positionViewAtIndex(count-1,ListView.End)
footer: TerminalExec {
width: parent.width
fontSize: consoleItem.fontSize
onFocused: listView.scrollToEnd()
}

//Behavior on contentY { enabled: ui.smooth; NumberAnimation { duration: 100 } }
function scrollToEnd()
{
positionViewAtEnd()
//flick(0,-height)
//currentIndex=count-1
//positionViewAtIndex(count-1,ListView.End)
}
/*footer: TerminalExec {
width: parent.width
fontSize: consoleItem.fontSize
onFocused: listView.positionViewAtEnd()
}*/
MouseArea {
anchors.fill: parent
onClicked: execControl.focusRequested()
onClicked: {
listView.footerItem.focusRequested()
listView.scrollToEnd()
}
}
}

TerminalExec {
/*TerminalExec {
id: execControl
Layout.fillWidth: true
Layout.alignment: Qt.AlignBottom
Layout.maximumWidth: listView.width
fontSize: consoleItem.fontSize
onFocused: listView.scrollToEnd()
}
}*/

}
3 changes: 1 addition & 2 deletions src/main/qml/Apx/Common/FactButton/FactButton.qml
Expand Up @@ -112,8 +112,7 @@ CleanButton {
anchors { fill: parent; margins: 10 }
//keys: String(factButton.parent)
onEntered: {
console.log(drag.source.title+" -> "+title)
//console.log(drag.target.title)
//console.log(drag.source.title+" -> "+title)
if(fact)drag.source.fact.move(fact.num)
}
}
Expand Down

0 comments on commit 059e4c4

Please sign in to comment.