Ensure the layout gets the right width & height for the output devices popup

CURA-6222
This commit is contained in:
Jaime van Kessel 2019-02-14 17:21:54 +01:00
parent dbb8514a6a
commit 6ff1f49c34

View File

@ -90,6 +90,10 @@ Item
cornerRadius: 0 cornerRadius: 0
hoverColor: UM.Theme.getColor("primary") hoverColor: UM.Theme.getColor("primary")
Layout.fillWidth: true Layout.fillWidth: true
// The total width of the popup should be defined by the largest button. By stating that each
// button should be minimally the size of it's content (aka; implicitWidth) we can ensure that.
Layout.minimumWidth: implicitWidth
Layout.preferredHeight: widget.height
onClicked: onClicked:
{ {
UM.OutputDeviceManager.setActiveDevice(model.id) UM.OutputDeviceManager.setActiveDevice(model.id)