1 /* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved.
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
8 import QtGraphicalEffects 1.0
11 width: 170 * height / 80
15 property bool showLabels: false
19 source: "../../images/switchplate_" + (value ? "on" : "off") + ".png"
24 x: value ? parent.width * 0.375 : -11
25 width: parent.width * 0.7
30 anchors.centerIn: parent
31 width: parent.height * 0.9
32 fillMode: Image.PreserveAspectFit
33 source: "../../images/switchcontrol.png"
38 anchors.fill: shadowTarget
40 horizontalOffset: parent.height * 0.05
41 verticalOffset: parent.height * 0.05
44 color: Qt.rgba(0, 0, 0, 0.35)
51 font.family: "Source Sans Pro"
52 anchors.right: parent.left
53 anchors.rightMargin: 30
54 anchors.verticalCenter: parent.verticalCenter
56 font.letterSpacing: -0.5
57 font.weight: value ? Font.Normal : Font.Bold
58 color: value ? "#C4C4C4" : "#FE9C00"
65 font.family: "Source Sans Pro"
66 anchors.left: parent.right
67 anchors.leftMargin: 30
69 anchors.verticalCenter: parent.verticalCenter
70 font.letterSpacing: -0.5
71 font.weight: value ? Font.Bold : Font.Normal
72 color: value ? "#59FF00" : "#C4C4C4"
78 onClicked: value = !value