mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-16 18:35:53 +08:00
Use new ScrollBar with controls 2
Contributes to issue CURA-8686.
This commit is contained in:
parent
70a79c9b5c
commit
10303c10f9
@ -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.
|
// Cura is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
import QtQuick 2.7
|
import QtQuick 2.7
|
||||||
import QtQuick.Controls 2.2
|
import QtQuick.Controls 2.2
|
||||||
import QtQuick.Layouts 1.3
|
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
|
clip: true
|
||||||
ListView
|
ScrollBar.vertical: UM.ScrollBar {}
|
||||||
{
|
|
||||||
id: backupList
|
|
||||||
width: parent.width
|
|
||||||
delegate: Item
|
delegate: Item
|
||||||
{
|
{
|
||||||
// Add a margin, otherwise the scrollbar is on top of the right most component
|
// 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
|
height: childrenRect.height
|
||||||
|
|
||||||
BackupListItem
|
BackupListItem
|
||||||
@ -35,5 +31,4 @@ ScrollView
|
|||||||
height: UM.Theme.getSize("default_lining").height
|
height: UM.Theme.getSize("default_lining").height
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user