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,16 +2,19 @@
// 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
{ {
property alias model: backupList.model
width: parent.width
ListView
{
id: backupList id: backupList
width: parent.width width: parent.width
clip: true
delegate: Item delegate: Item
{ {
width: parent.width width: parent.width
@ -20,7 +23,7 @@ ListView
BackupListItem BackupListItem
{ {
id: 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 width: parent.width
} }
Divider Divider
@ -29,5 +32,5 @@ ListView
anchors.top: backupListItem.bottom anchors.top: backupListItem.bottom
} }
} }
ScrollBar.vertical: RightSideScrollBar {} }
} }