9b57f7f3adcb804553a9b71e6fbe33e80d7cae3b
[ubi] / qml / ubi / TopBar.qml
1 import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
2 import "components"
3 import "UIConstants.js" as Const
4
5 Item {
6     id: root
7
8     height: Const.TOP_BAR_HEIGHT
9     anchors { left: parent.left; right: parent.right; top: top.bottom }
10
11     function hide() {
12         visible = false;
13     }
14
15     function show() {
16         visible = true;
17     }
18
19     Item {
20         width: 50
21         height: width
22         //color: mouseArea1.pressed ? "white" : "black"
23         //opacity: 0.2
24         anchors.left: root.left
25
26         MouseArea {
27             id: mouseArea1
28             anchors.fill: parent
29             onClicked: Utils.minimizeWindow()
30         }
31     }
32
33     Item {
34         width: 50
35         height: width
36         //color: mouseArea2.pressed ? "white" : "black"
37         //opacity: 0.2
38         anchors.right: root.right
39
40         MouseArea {
41             id: mouseArea2
42             anchors.fill: parent
43             onClicked: Qt.quit()
44         }
45     }
46
47
48     /*Rectangle {
49         width: box.width/2-16
50         height: 2
51         color: "white"
52         x: 8
53         y: (box.width/4)-1
54     }*/
55
56     /*Rectangle {
57         width: parent.width
58         height: root.height
59         color: Const.TRANSPARENT
60         //color: "black"
61     }
62
63     Item {
64         id: minimizeButton
65         width: 80;
66         height: 60
67         anchors { verticalCenter: parent.verticalCenter; left: parent.left; margins: 5 }
68
69         Rectangle {
70             id: background
71             anchors { fill: parent; margins: 6 }
72             color: "black"
73             opacity: 0.2
74             radius: 10
75         }
76
77         Rectangle {
78             anchors { fill: parent; margins: 6 }
79             color: "white"
80             opacity: 0.5
81             radius: 10
82             visible: mouseArea.pressed
83         }
84
85         Image {
86             id: icon
87             anchors.centerIn: parent
88             source: "images/minimize.png"
89             sourceSize.width: width
90             sourceSize.height: height
91         }
92
93         MouseArea {
94             id: mouseArea
95             anchors.fill: parent
96             onClicked: Utils.minimizeWindow()
97         }
98     }*/
99
100     /*ToolIcon {
101         id: backButton
102         width: 80
103         anchors { verticalCenter: parent.verticalCenter; right: parent.right; margins: 5 }
104         iconSource: "images/close.png"
105         onClicked: Qt.quit()
106     }*/
107
108 }
109
110
111
112