mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
Use Controls2 ListView instead of Controls1 ScrollView to scroll
Just a listview with a specialised scroll bar. Contributes to issue CURA-8686.
This commit is contained in:
parent
ca3f29daf7
commit
d87551ac9c
1 changed files with 40 additions and 42 deletions
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright (c) 2019 Ultimaker B.V.
|
||||
// Copyright (c) 2022 Ultimaker B.V.
|
||||
// Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import UM 1.2 as UM
|
||||
import UM 1.5 as UM
|
||||
import Cura 1.5 as Cura
|
||||
|
||||
import QtQuick 2.2
|
||||
|
|
@ -109,18 +109,17 @@ Cura.MachineAction
|
|||
width: Math.round(parent.width * 0.5)
|
||||
spacing: UM.Theme.getSize("default_margin").height
|
||||
|
||||
ScrollView
|
||||
{
|
||||
id: objectListContainer
|
||||
|
||||
width: parent.width
|
||||
height: base.height - contentRow.y - discoveryTip.height
|
||||
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
|
||||
ListView
|
||||
{
|
||||
id: listview
|
||||
model: manager.foundDevices
|
||||
|
||||
width: parent.width
|
||||
height: base.height - contentRow.y - discoveryTip.height
|
||||
|
||||
ScrollBar.vertical: UM.ScrollBar {}
|
||||
clip: true
|
||||
|
||||
model: manager.foundDevices
|
||||
currentIndex: -1
|
||||
onCurrentIndexChanged:
|
||||
{
|
||||
|
|
@ -160,7 +159,6 @@ Cura.MachineAction
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Label
|
||||
{
|
||||
id: discoveryTip
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue