Launcher: disable grid mode for update tab
Since the UI doesn’t work well in grid mode, and the list of updates is limited, force list mode for the updates tab. https://sourceforge.net/p/flightgear/codetickets/2172/
This commit is contained in:
parent
d52f1b5d47
commit
cf8ec5998e
1 changed files with 19 additions and 1 deletions
|
@ -28,6 +28,7 @@ FocusScope
|
|||
width: parent.width
|
||||
|
||||
GridToggleButton {
|
||||
id: gridModeToggle
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: Style.margin
|
||||
|
@ -132,7 +133,8 @@ FocusScope
|
|||
|
||||
Loader {
|
||||
id: aircraftContent
|
||||
source: _launcher.aircraftGridMode ? "qrc:///qml/AircraftGridView.qml"
|
||||
// we use gridModeToggle vis to mean enabled, effectively
|
||||
source: (gridModeToggle.visible && _launcher.aircraftGridMode) ? "qrc:///qml/AircraftGridView.qml"
|
||||
: "qrc:///qml/AircraftListView.qml"
|
||||
|
||||
anchors {
|
||||
|
@ -186,6 +188,10 @@ FocusScope
|
|||
__model: _launcher.installedAircraftModel
|
||||
__header: emptyHeader
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
target: gridModeToggle; visible: true
|
||||
}
|
||||
},
|
||||
|
||||
State {
|
||||
|
@ -195,6 +201,10 @@ FocusScope
|
|||
__model: _launcher.searchAircraftModel
|
||||
__header: emptyHeader
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
target: gridModeToggle; visible: true
|
||||
}
|
||||
},
|
||||
|
||||
State {
|
||||
|
@ -204,6 +214,10 @@ FocusScope
|
|||
__model: _launcher.browseAircraftModel
|
||||
__header: _addOns.showNoOfficialHangar ? noDefaultCatalogHeader : ratingsHeader
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
target: gridModeToggle; visible: true
|
||||
}
|
||||
},
|
||||
|
||||
State {
|
||||
|
@ -213,6 +227,10 @@ FocusScope
|
|||
__model: _launcher.aircraftWithUpdatesModel
|
||||
__header: (_launcher.aircraftWithUpdatesModel.count > 0) ? updateAllHeader : emptyHeader
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
target: gridModeToggle; visible: false
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
|
|
Loading…
Reference in a new issue