Monitor view component loader should have width and height from parent

This commit is contained in:
ChrisTerBeke 2017-12-08 14:56:03 +01:00
parent 8cd9439497
commit c4d7a33c31
2 changed files with 6 additions and 2 deletions

View file

@ -8,6 +8,9 @@ import Cura 1.0 as Cura
Item Item
{ {
width: parent.width
height: parent.height
// We show a nice overlay on the 3D viewer when the current output device has no monitor view // We show a nice overlay on the 3D viewer when the current output device has no monitor view
Rectangle Rectangle
{ {
@ -16,7 +19,6 @@ Item
color: UM.Theme.getColor("viewport_overlay") color: UM.Theme.getColor("viewport_overlay")
width: parent.width width: parent.width
height: parent.height height: parent.height
visible: monitorViewComponent.sourceComponent == null ? 1 : 0
MouseArea MouseArea
{ {
@ -30,6 +32,9 @@ Item
{ {
id: monitorViewComponent id: monitorViewComponent
width: parent.width
height: parent.height
property real maximumWidth: parent.width property real maximumWidth: parent.width
property real maximumHeight: parent.height property real maximumHeight: parent.height

View file

@ -202,7 +202,6 @@ Item
target: Printer target: Printer
onAdditionalComponentsChanged: onAdditionalComponentsChanged:
{ {
print("areaId", areaId)
if(areaId == "monitorButtons") { if(areaId == "monitorButtons") {
for (var component in CuraApplication.additionalComponents["monitorButtons"]) { for (var component in CuraApplication.additionalComponents["monitorButtons"]) {
CuraApplication.additionalComponents["monitorButtons"][component].parent = additionalComponentsRow CuraApplication.additionalComponents["monitorButtons"][component].parent = additionalComponentsRow