Cura/plugins/UM3NetworkPrinting/resources/qml/CameraButton.qml
Ian Paschal 406ef20802 Revert "Add theme colors"
This reverts commit 2e5eb61144.
2019-01-21 14:05:24 +01:00

49 lines
No EOL
1.2 KiB
QML

// Copyright (c) 2018 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.3
import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.3
import UM 1.3 as UM
import Cura 1.0 as Cura
Rectangle {
id: base
property var iconSource: null;
color: "#0a0850" // TODO: Theme!
height: width;
radius: Math.round(0.5 * width);
width: 24 * screenScaleFactor;
property var enabled: true
UM.RecolorImage {
id: icon;
anchors {
horizontalCenter: parent.horizontalCenter;
verticalCenter: parent.verticalCenter;
}
color: UM.Theme.getColor("primary_text");
height: width;
source: iconSource;
width: Math.round(parent.width / 2);
}
MouseArea {
id: clickArea;
anchors.fill: parent;
hoverEnabled: base.enabled
onClicked: {
if (base.enabled)
{
if (OutputDevice.activeCameraUrl != "")
{
OutputDevice.setActiveCameraUrl("")
}
else
{
OutputDevice.setActiveCameraUrl(modelData.cameraUrl)
}
}
}
}
}