Monitor Tab - Improved camera icon

- Fixed: Camera icon is too small, and the icon does not look centred
- Fixed: No hover effect for the camera button

Contributes to CL-1049
This commit is contained in:
Ian Paschal 2018-09-12 16:31:59 +02:00
parent e51089a880
commit 0a01e7c25b

View file

@ -628,24 +628,28 @@ Component
Rectangle Rectangle
{ {
id: showCameraIcon id: showCameraButton
width: 35 * screenScaleFactor width: 36 * screenScaleFactor
height: width height: width
radius: 0.5 * width radius: 0.5 * width
anchors.left: parent.left anchors.left: parent.left
anchors.bottom: printJobPreview.bottom anchors.bottom: printJobPreview.bottom
color: UM.Theme.getColor("setting_control_border_highlight") color: showCameraMouseArea.containsMouse ? UM.Theme.getColor("primary_hover") : UM.Theme.getColor("primary")
Image UM.RecolorImage
{ {
width: parent.width id: showCameraIcon
width: parent.width - 1
height: width height: width
anchors.right: parent.right anchors.verticalCenter: parent.verticalCenter
anchors.rightMargin: parent.rightMargin anchors.horizontalCenter: parent.horizontalCenter
color: UM.Theme.getColor("primary_text")
source: "../svg/camera-icon.svg" source: "../svg/camera-icon.svg"
} }
MouseArea MouseArea
{ {
id: showCameraMouseArea
anchors.fill:parent anchors.fill:parent
hoverEnabled: true
onClicked: onClicked:
{ {
OutputDevice.setActiveCamera(modelData.camera) OutputDevice.setActiveCamera(modelData.camera)