mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Use new ScrollBar with controls 2
Contributes to issue CURA-8686.
This commit is contained in:
parent
70a79c9b5c
commit
10303c10f9
1 changed files with 19 additions and 24 deletions
|
@ -1,39 +1,34 @@
|
||||||
// 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 {}
|
||||||
|
|
||||||
|
delegate: Item
|
||||||
{
|
{
|
||||||
id: backupList
|
// Add a margin, otherwise the scrollbar is on top of the right most component
|
||||||
width: parent.width
|
width: parent.width - UM.Theme.getSize("scrollbar").width
|
||||||
delegate: Item
|
height: childrenRect.height
|
||||||
|
|
||||||
|
BackupListItem
|
||||||
{
|
{
|
||||||
// Add a margin, otherwise the scrollbar is on top of the right most component
|
id: backupListItem
|
||||||
width: parent.width - UM.Theme.getSize("default_margin").width
|
width: parent.width
|
||||||
height: childrenRect.height
|
}
|
||||||
|
|
||||||
BackupListItem
|
Rectangle
|
||||||
{
|
{
|
||||||
id: backupListItem
|
id: divider
|
||||||
width: parent.width
|
color: UM.Theme.getColor("lining")
|
||||||
}
|
height: UM.Theme.getSize("default_lining").height
|
||||||
|
|
||||||
Rectangle
|
|
||||||
{
|
|
||||||
id: divider
|
|
||||||
color: UM.Theme.getColor("lining")
|
|
||||||
height: UM.Theme.getSize("default_lining").height
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue