mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-07 22:13:58 -06:00
Use re-useable scrollbar and remove ScrollView
The machine selector has the scroll view inside of the listview. It just needs to use our new scrollbar element instead of the default. Contributes to issue CURA-8686.
This commit is contained in:
parent
7e1b92953c
commit
c57126fb00
2 changed files with 22 additions and 33 deletions
|
@ -14,10 +14,15 @@ ListView
|
|||
section.property: "hasRemoteConnection"
|
||||
property real contentHeight: childrenRect.height
|
||||
|
||||
ScrollBar.vertical: UM.ScrollBar
|
||||
{
|
||||
id: scrollBar
|
||||
}
|
||||
|
||||
section.delegate: UM.Label
|
||||
{
|
||||
text: section == "true" ? catalog.i18nc("@label", "Connected printers") : catalog.i18nc("@label", "Preset printers")
|
||||
width: parent.width
|
||||
width: parent.width - scrollBar.width
|
||||
height: UM.Theme.getSize("action_button").height
|
||||
leftPadding: UM.Theme.getSize("default_margin").width
|
||||
font: UM.Theme.getFont("medium")
|
||||
|
@ -27,7 +32,7 @@ ListView
|
|||
delegate: MachineSelectorButton
|
||||
{
|
||||
text: model.name ? model.name : ""
|
||||
width: listView.width
|
||||
width: listView.width - scrollBar.width
|
||||
outputDevice: Cura.MachineManager.printerOutputDevices.length >= 1 ? Cura.MachineManager.printerOutputDevices[0] : null
|
||||
|
||||
checked: Cura.MachineManager.activeMachine ? Cura.MachineManager.activeMachine.id == model.id : false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue