Improve transitions and eliminate conflicting anchor warnings

This commit is contained in:
Cameron Gutman 2019-03-27 01:28:46 -07:00
parent 89c8725766
commit a079ecd20b
6 changed files with 17 additions and 17 deletions

View file

@ -8,15 +8,15 @@ import ComputerManager 1.0
GridView {
property int computerIndex
property AppModel appModel : createModel()
property bool activated
id: appGrid
focus: true
activeFocusOnTab: true
anchors.fill: parent
anchors.leftMargin: (parent.width % (cellWidth + anchors.rightMargin)) / 2
anchors.topMargin: 20
anchors.rightMargin: 5
anchors.bottomMargin: 5
leftMargin: (parent.width % (cellWidth + rightMargin)) / 2
topMargin: 20
rightMargin: 5
bottomMargin: 5
cellWidth: 225; cellHeight: 385;
function computerLost()
@ -34,10 +34,12 @@ GridView {
StackView.onActivated: {
appModel.computerLost.connect(computerLost)
activated = true
}
StackView.onDeactivating: {
appModel.computerLost.disconnect(computerLost)
activated = false
}
function createModel()
@ -237,6 +239,12 @@ GridView {
}
ScrollBar.vertical: ScrollBar {
// Manually hide the scrollbar to prevent it from being drawn on top
// of the StreamSegue during the transition. It can sometimes get stuck
// there since we're not consistently pumping the event loop while
// starting the stream.
visible: activated
parent: appGrid.parent
anchors {
top: appGrid.top

View file

@ -6,8 +6,6 @@ import ComputerManager 1.0
import Session 1.0
Item {
anchors.fill: parent
function onSearchingComputer() {
stageLabel.text = "Establishing connection to PC..."
}

View file

@ -14,11 +14,10 @@ GridView {
id: pcGrid
focus: true
activeFocusOnTab: true
anchors.fill: parent
anchors.leftMargin: (parent.width % (cellWidth + anchors.rightMargin)) / 2
anchors.topMargin: 20
anchors.rightMargin: 5
anchors.bottomMargin: 5
leftMargin: (parent.width % (cellWidth + rightMargin)) / 2
topMargin: 20
rightMargin: 5
bottomMargin: 5
cellWidth: 350; cellHeight: 350;
objectName: "Computers"

View file

@ -12,8 +12,6 @@ Item {
property string stageText : "Quitting " + appName + "..."
anchors.fill: parent
function quitAppCompleted(error)
{
// Display a failed dialog if we got an error

View file

@ -9,7 +9,6 @@ import SystemProperties 1.0
Flickable {
id: settingsPage
objectName: "Settings"
anchors.fill: parent
contentWidth: settingsColumn1.width > settingsColumn2.width ? settingsColumn1.width : settingsColumn2.width
contentHeight: settingsColumn1.height > settingsColumn2.height ? settingsColumn1.height : settingsColumn2.height

View file

@ -13,8 +13,6 @@ Item {
property string stageText : "Starting " + appName + "..."
property bool quitAfter : false
anchors.fill: parent
function stageStarting(stage)
{
// Update the spinner text