mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 14:37:29 -06:00
Allow buttons to be passed in for drop down.
The change also remove the "Add Printer" and "Manage Printer" buttons from the monitor page drop down. CURA-9424
This commit is contained in:
parent
2019d8f3af
commit
ccb4d181e6
2 changed files with 56 additions and 33 deletions
|
@ -57,6 +57,41 @@ Item
|
|||
Layout.fillHeight: true
|
||||
|
||||
machineListModel: Cura.MachineListModel {}
|
||||
|
||||
buttons: [
|
||||
Cura.SecondaryButton
|
||||
{
|
||||
id: addPrinterButton
|
||||
leftPadding: UM.Theme.getSize("default_margin").width
|
||||
rightPadding: UM.Theme.getSize("default_margin").width
|
||||
text: catalog.i18nc("@button", "Add printer")
|
||||
// The maximum width of the button is half of the total space, minus the padding of the parent, the left
|
||||
// padding of the component and half the spacing because of the space between buttons.
|
||||
fixedWidthMode: true
|
||||
width: parent.width / 2 - leftPadding * 1.5
|
||||
onClicked:
|
||||
{
|
||||
toggleContent()
|
||||
Cura.Actions.addMachine.trigger()
|
||||
}
|
||||
},
|
||||
Cura.SecondaryButton
|
||||
{
|
||||
id: managePrinterButton
|
||||
leftPadding: UM.Theme.getSize("default_margin").width
|
||||
rightPadding: UM.Theme.getSize("default_margin").width
|
||||
text: catalog.i18nc("@button", "Manage printers")
|
||||
fixedWidthMode: true
|
||||
// The maximum width of the button is half of the total space, minus the padding of the parent, the right
|
||||
// padding of the component and half the spacing because of the space between buttons.
|
||||
width: parent.width / 2 - rightPadding * 1.5
|
||||
onClicked:
|
||||
{
|
||||
toggleContent()
|
||||
Cura.Actions.configureMachines.trigger()
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Cura.ConfigurationMenu
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue