Add sample qml application
[staging/HomeScreen.git] / sample-qml / imports / components / Box.qml
1 /* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved.
2  *
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/. */
6
7 import QtQuick 2.0
8 import utils 1.0
9
10 Item {
11     id: root
12
13     opacity: 0.8
14     property color color: Style.grey
15     property color border: color
16     property string shadow: ""
17
18     OutShadow {
19         color: root.color
20         visible: root.shadow === "out"
21     }
22
23     Rectangle {
24         id: rect
25         anchors.fill: parent
26         color: Style.black
27         border.width: 1
28         border.color: root.border
29     }
30
31     InsetShadow {
32         color: root.color
33         visible: root.shadow === "fill"
34     }
35
36     InShadow {
37         color: root.color
38         visible: root.shadow === "in"
39     }
40
41     Rectangle {
42         visible: root.shadow === "fill"
43         anchors.fill: parent
44         color: "transparent"
45         border.width: 1
46         border.color: root.border
47     }
48
49 }