Make the backupList use a scrollview instead of manually re-doing it

CURA-6005
This commit is contained in:
Jaime van Kessel 2019-01-04 10:39:39 +01:00
parent 31156d6230
commit 8ebd4282fd

View file

@ -2,32 +2,35 @@
// Cura is released under the terms of the LGPLv3 or higher. // Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.7 import QtQuick 2.7
import QtQuick.Controls 2.1 import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3
import UM 1.1 as UM import UM 1.1 as UM
ListView ScrollView
{ {
id: backupList property alias model: backupList.model
width: parent.width width: parent.width
clip: true ListView
delegate: Item
{ {
id: backupList
width: parent.width width: parent.width
height: childrenRect.height delegate: Item
BackupListItem
{
id: backupListItem
width: parent.width - UM.Theme.getSize("default_margin").width // Add a margin, otherwise the scrollbar is be on top of the right most component
}
Divider
{ {
width: parent.width width: parent.width
anchors.top: backupListItem.bottom height: childrenRect.height
BackupListItem
{
id: backupListItem
width: parent.width
}
Divider
{
width: parent.width
anchors.top: backupListItem.bottom
}
} }
} }
ScrollBar.vertical: RightSideScrollBar {}
} }