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/. */
16 property alias pressed: area.pressed
17 property alias color: background.color
18 property alias fontSize: label.font.pixelSize
19 property bool fill: false
24 color: Style.backgroundColor
25 opacity: root.fill ? 1.0: 0.2
32 border.color: Qt.darker(background.color, 1.4)
41 color: Style.backgroundColor
42 opacity: root.text ? 1.0 : 0.0
47 anchors.centerIn: parent
49 color: Style.greyDarkColor
56 onClicked: root.clicked()
57 onPressed: background.color = Qt.darker(background.color, 1.5)
58 onReleased: background.color = Qt.lighter(background.color, 1.5)