@@ -16,11 +16,12 @@
1616
1717import QtQuick 2.0
1818import Ubuntu.Components 0.1
19+import Unity.Application 0.1
1920import "../Components"
2021
2122Item {
2223 id: root
23− readonly property real panelHeight: callHint.active ? callHint.height + indicatorArea.indicatorHeight : indicatorArea.indicatorHeight
24+ readonly property real panelHeight: indicatorArea.y + indicatorArea.indicatorHeight
2425 property alias indicators: indicatorsMenu
2526 property bool fullscreenMode: false
2627 property bool searchVisible: true
@@ -62,16 +63,30 @@ Item {
6263 right: parent.right
6364 }
6465 height: units.gu(3)
66+ y: -height
6567
66− y: active ? 0 : -height
67− z: 1
68+ states: [
69+ State {
70+ name: "active"
71+ when: callHint.active
72+ PropertyChanges { target: callHint; y: 0 }
73+ PropertyChanges { target: search.mouseArea; anchors.topMargin: -callHint.height/3 }
74+ }
75+ ]
76+ Behavior on y { StandardAnimation { id: callHintYAnimation } }
6877
69− Behavior on y { StandardAnimation {} }
78+ mouseArea.onClicked: callHint.activate();
79+
80+ Rectangle {
81+ anchors.fill: callHint.mouseArea
82+ color: Qt.rgba(0,1,0,0.5)
83+ }
7084 }
7185
7286 Item {
7387 id: indicatorArea
7488 objectName: "indicatorArea"
89+ z: 1
7590
7691 readonly property real indicatorHeight: indicatorsMenu.panelHeight + leftSeparatorLine.height
7792
@@ -80,7 +95,11 @@ Item {
8095 right: parent.right
8196 }
8297 height: root.height - indicatorArea.y
83− z: 0
98+
99+ Behavior on y {
100+ enabled: !callHintYAnimation.running
101+ StandardAnimation {}
102+ }
84103
85104 PanelBackground {
86105 id: panelBackground
@@ -113,6 +132,7 @@ Item {
113132 }
114133 color: "black"
115134 opacity: indicatorsMenu.unitProgress * darkenedOpacity
135+
116136 MouseArea {
117137 anchors.fill: parent
118138 enabled: indicatorsMenu.shown
@@ -120,6 +140,23 @@ Item {
120140 }
121141 }
122142
143+ MouseArea {
144+ id: indicatorAreaClick
145+ enabled: callHint.active
146+ anchors {
147+ top: parent.top
148+ left: search.right
149+ right: indicatorsMenu.right
150+ }
151+ height: indicatorsMenu.panelHeight/2
152+ onClicked: callHint.activate();
153+
154+ Rectangle {
155+ anchors.fill: indicatorAreaClick
156+ color: Qt.rgba(0,1,0,0.5)
157+ }
158+ }
159+
123160 Indicators {
124161 id: indicatorsMenu
125162 objectName: "indicators"
@@ -134,7 +171,20 @@ Item {
134171 panelHeight: units.gu(3)
135172 openedHeight: parent.height
136173 pinnedMode: !fullscreenMode
174+ enableHint: !callHint.active
137175 overFlowWidth: search.state=="hidden" ? parent.width : parent.width - search.width
176+ hintAreaHeightOffset: callHint.active ? callHint.height : 0
177+
178+ onShowTapped: {
179+ if (callHint.active && position.y < y + indicatorsMenu.panelHeight/2) {
180+ callHint.activate();
181+ }
182+ }
183+
184+ Rectangle {
185+ anchors.fill: indicatorsMenu
186+ color: Qt.rgba(1,1,0,0.5)
187+ }
138188 }
139189
140190 PanelSeparatorLine {
@@ -174,7 +224,6 @@ Item {
174224 if (root.searchVisible && !indicatorsMenu.showAll) {
175225 return "visible";
176226 }
177−
178227 return "hidden";
179228 }
180229
@@ -184,7 +233,13 @@ Item {
184233 }
185234 height: panelBackground.height
186235
187− onClicked: root.searchClicked()
236+ mouseArea {
237+ onClicked: root.searchClicked()
238+ }
239+ Rectangle {
240+ anchors.fill: search.mouseArea
241+ color: Qt.rgba(1,0,0,0.5)
242+ }
188243 }
189244 }
190245
@@ -193,11 +248,13 @@ Item {
193248 name: "in" //fully opaque and visible at top edge of screen
194249 when: !fullscreenMode
195250 PropertyChanges { target: indicatorArea; y: callHint.y + callHint.height }
251+ PropertyChanges { target: callHint; z: 0 }
196252 },
197253 State {
198254 name: "out" //pushed off screen
199255 when: fullscreenMode
200256 PropertyChanges { target: indicatorArea; y: callHint.y + callHint.height - indicatorHeight }
257+ PropertyChanges { target: callHint; z: 2 }
201258 }
202259 ]
203260}