mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-14 18:27:51 -06:00
Update SaveButton to the changed OutputDevicesModel API
This commit is contained in:
parent
7c3e53f714
commit
68cde3f780
1 changed files with 6 additions and 6 deletions
|
@ -105,13 +105,13 @@ Rectangle {
|
||||||
anchors.topMargin: UM.Theme.sizes.save_button_text_margin.height;
|
anchors.topMargin: UM.Theme.sizes.save_button_text_margin.height;
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: UM.Theme.sizes.default_margin.width;
|
anchors.leftMargin: UM.Theme.sizes.default_margin.width;
|
||||||
tooltip: devicesModel.currentDevice.description;
|
tooltip: devicesModel.activeDevice.description;
|
||||||
enabled: progress >= 0.99;
|
enabled: progress >= 0.99;
|
||||||
|
|
||||||
width: infoBox.width/6*4.5
|
width: infoBox.width/6*4.5
|
||||||
height: UM.Theme.sizes.save_button_save_to_button.height
|
height: UM.Theme.sizes.save_button_save_to_button.height
|
||||||
|
|
||||||
text: devicesModel.currentDevice.short_description;
|
text: devicesModel.activeDevice.short_description;
|
||||||
|
|
||||||
style: ButtonStyle {
|
style: ButtonStyle {
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
|
@ -126,7 +126,7 @@ Rectangle {
|
||||||
}
|
}
|
||||||
label: Item { }
|
label: Item { }
|
||||||
}
|
}
|
||||||
onClicked: devicesModel.requestWriteToDevice(devicesModel.currentDevice.id)
|
onClicked: devicesModel.requestWriteToDevice(devicesModel.activeDevice.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
|
@ -141,7 +141,7 @@ Rectangle {
|
||||||
width: infoBox.width/6*1.3 - UM.Theme.sizes.save_button_text_margin.height;
|
width: infoBox.width/6*1.3 - UM.Theme.sizes.save_button_text_margin.height;
|
||||||
height: UM.Theme.sizes.save_button_save_to_button.height
|
height: UM.Theme.sizes.save_button_save_to_button.height
|
||||||
|
|
||||||
iconSource: UM.Theme.icons[devicesModel.currentDevice.icon_name];
|
iconSource: UM.Theme.icons[devicesModel.activeDevice.icon_name];
|
||||||
|
|
||||||
style: ButtonStyle {
|
style: ButtonStyle {
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
|
@ -186,10 +186,10 @@ Rectangle {
|
||||||
MenuItem {
|
MenuItem {
|
||||||
text: model.description
|
text: model.description
|
||||||
checkable: true;
|
checkable: true;
|
||||||
checked: model.id == devicesModel.currentDevice.id;
|
checked: model.id == devicesModel.activeDevice.id;
|
||||||
exclusiveGroup: devicesMenuGroup;
|
exclusiveGroup: devicesMenuGroup;
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
devicesModel.setCurrentDevice(model.id);
|
devicesModel.setActiveDevice(model.id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onObjectAdded: devicesMenu.insertItem(index, object)
|
onObjectAdded: devicesMenu.insertItem(index, object)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue