diff --git a/plugins/UM3NetworkPrinting/resources/qml/DotButton.qml b/plugins/UM3NetworkPrinting/resources/qml/CameraButton.qml similarity index 97% rename from plugins/UM3NetworkPrinting/resources/qml/DotButton.qml rename to plugins/UM3NetworkPrinting/resources/qml/CameraButton.qml index e36634fc5c..1ceebccf89 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/DotButton.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/CameraButton.qml @@ -19,7 +19,7 @@ Rectangle UM.RecolorImage { id: icon - width: parent.width - 1 + width: parent.width / 2 height: width anchors.verticalCenter: parent.verticalCenter anchors.horizontalCenter: parent.horizontalCenter diff --git a/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml b/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml index c9fc0bc46c..52fe0f544a 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/ClusterControlItem.qml @@ -626,7 +626,7 @@ Component color: "black" } - DotButton + CameraButton { id: showCameraButton iconSource: "../svg/camera-icon.svg" diff --git a/plugins/UM3NetworkPrinting/resources/qml/PrinterVideoStream.qml b/plugins/UM3NetworkPrinting/resources/qml/PrinterVideoStream.qml index 74c8ec8483..c193d0ed71 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/PrinterVideoStream.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/PrinterVideoStream.qml @@ -23,38 +23,50 @@ Item z: 0 } - Button + CameraButton { - id: backButton - anchors.bottom: cameraImage.top - anchors.bottomMargin: UM.Theme.getSize("default_margin").width - anchors.right: cameraImage.right - - // TODO: Hardcoded sizes - width: 20 * screenScaleFactor - height: 20 * screenScaleFactor - - onClicked: OutputDevice.setActiveCamera(null) - - style: ButtonStyle + id: closeCameraButton + iconSource: UM.Theme.getIcon("cross1") + anchors { - label: Item - { - UM.RecolorImage - { - anchors.verticalCenter: parent.verticalCenter - anchors.horizontalCenter: parent.horizontalCenter - width: control.width - height: control.height - sourceSize.width: width - sourceSize.height: width - source: UM.Theme.getIcon("cross1") - } - } - background: Item {} + top: cameraImage.top + topMargin: UM.Theme.getSize("default_margin").height + right: cameraImage.right + rightMargin: UM.Theme.getSize("default_margin").width } + z: 999 } + // Button + // { + // id: backButton + + + // // TODO: Hardcoded sizes + // width: 20 * screenScaleFactor + // height: 20 * screenScaleFactor + + // onClicked: OutputDevice.setActiveCamera(null) + + // style: ButtonStyle + // { + // label: Item + // { + // UM.RecolorImage + // { + // anchors.verticalCenter: parent.verticalCenter + // anchors.horizontalCenter: parent.horizontalCenter + // width: control.width + // height: control.height + // sourceSize.width: width + // sourceSize.height: width + // source: UM.Theme.getIcon("cross1") + // } + // } + // background: Item {} + // } + // } + Image { id: cameraImage diff --git a/plugins/UM3NetworkPrinting/resources/svg/camera-icon.svg b/plugins/UM3NetworkPrinting/resources/svg/camera-icon.svg index 29adfa5875..66bed04508 100644 --- a/plugins/UM3NetworkPrinting/resources/svg/camera-icon.svg +++ b/plugins/UM3NetworkPrinting/resources/svg/camera-icon.svg @@ -1,6 +1,8 @@ - - - - + + + Created with Sketch. + + + \ No newline at end of file