Use new ScrollBar with controls 2

Contributes to issue CURA-8686.
This commit is contained in:
Ghostkeeper 2022-01-17 17:15:23 +01:00
parent 70a79c9b5c
commit 10303c10f9
No known key found for this signature in database
GPG key ID: D2A8871EE34EC59A

View file

@ -1,25 +1,21 @@
// Copyright (c) 2018 Ultimaker B.V.
// Copyright (c) 2022 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.7
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import UM 1.1 as UM
import UM 1.5 as UM
ScrollView
ListView
{
property alias model: backupList.model
width: parent.width
clip: true
ListView
{
id: backupList
width: parent.width
ScrollBar.vertical: UM.ScrollBar {}
delegate: Item
{
// Add a margin, otherwise the scrollbar is on top of the right most component
width: parent.width - UM.Theme.getSize("default_margin").width
width: parent.width - UM.Theme.getSize("scrollbar").width
height: childrenRect.height
BackupListItem
@ -35,5 +31,4 @@ ScrollView
height: UM.Theme.getSize("default_lining").height
}
}
}
}