@@ -22,7 +22,7 @@ import "../Components/ListItems"
25− readonly property real panelHeight: nonIndicatorArea.y + nonIndicatorArea.height
25+ readonly property real panelHeight: indicatorArea.y + d.indicatorHeight
26 property alias indicators: __indicators
26 property alias indicators: __indicators
27 property alias callHint: __callHint
27 property alias callHint: __callHint
28 property bool fullscreenMode: false
28 property bool fullscreenMode: false
@@ -56,9 +56,10 @@ Item {
56 id: darkenedArea
56 id: darkenedArea
57 property real darkenedOpacity: 0.6
57 property real darkenedOpacity: 0.6
60+ topMargin: panelHeight
59 left: parent.left
61 left: parent.left
60 right: parent.right
62 right: parent.right
61− top: nonIndicatorArea.bottom
62 bottom: parent.bottom
63 bottom: parent.bottom
64 color: "black"
65 color: "black"
@@ -71,60 +72,11 @@ Item {
75− anchors.fill: nonIndicatorArea
80− objectName: "indicatorArea"
87− height: d.indicatorHeight
90− id: leftSeparatorLine
92− bottom: parent.bottom
96− saturation: 1 - indicators.unitProgress
100− id: nonIndicatorMouseArea
101− enabled: callHint.active
107− height: indicators.panelHeight/2
108− onClicked: callHint.activate();
114− anchors.fill: callHint
115− onClicked: callHint.activate()
119 id: indicatorArea
76 id: indicatorArea
120 objectName: "indicatorArea"
77 objectName: "indicatorArea"
122− anchors {
79+ anchors.fill: parent
123− top: callHint.bottom
125− bottom: parent.bottom
127− width: indicators.width
129 Behavior on anchors.topMargin { StandardAnimation {} }
81 Behavior on anchors.topMargin { StandardAnimation {} }
@@ -146,15 +98,34 @@ Item {
146 bottom: indicators.bottom
98 bottom: indicators.bottom
147 right: indicators.left
99 right: indicators.left
149− topMargin: nonIndicatorArea.anchors.topMargin + indicators.panelHeight
101+ topMargin: indicatorArea.anchors.topMargin + indicators.panelHeight
152 width: units.dp(2)
104 width: units.dp(2)
153 source: "graphics/VerticalDivider.png"
105 source: "graphics/VerticalDivider.png"
156− PanelBackground {
108+ Rectangle {
109+ id: indicatorAreaBackground
110+ color: callHint.visible ? "green" : "black"
116+ height: indicators.panelHeight
118+ Behavior on color { ColorAnimation { duration: UbuntuAnimation.FastDuration } }
121+ PanelSeparatorLine {
122+ id: nonIndicatorAreaSeparatorLine
157− anchors.fill: indicators
123+ anchors {
124+ top: indicatorAreaBackground.bottom
126+ right: indicators.left
128+ saturation: 1 - indicators.unitProgress
160 Indicators {
131 Indicators {
@@ -169,91 +140,80 @@ Item {
169 width: (root.width > units.gu(60)) ? units.gu(40) : root.width
140 width: (root.width > units.gu(60)) ? units.gu(40) : root.width
170 shown: false
141 shown: false
171 panelHeight: units.gu(3)
142 panelHeight: units.gu(3)
172− openedHeight: root.height - (callHint.y + callHint.height)
143+ openedHeight: root.height
145+ if (callHint.visible) {
146+ return Math.max(root.width - (callHint.width + units.gu(2)), 0)
173− overFlowWidth: search.state=="hidden" ? root.width : root.width - search.width
148+ return search.state=="hidden" ? root.width : root.width - search.width
175 enableHint: !callHint.active && !fullscreenMode
151 enableHint: !callHint.active && !fullscreenMode
176 showHintBottomMargin: fullscreenMode ? -panelHeight : 0
152 showHintBottomMargin: fullscreenMode ? -panelHeight : 0
177− showHintHeightOffset: callHint.active ? callHint.height : 0
179 onShowTapped: {
154 onShowTapped: {
180 if (callHint.active) {
155 if (callHint.active) {
181− var callHintScenePosition = callHint.mapToItem(null, callHint.x, callHint.y);
182− var indicatorScenePosition = mapToItem(null, x, y);
184− // tapped on callHint
156+ callHint.activate();
185− if (position.y > callHintScenePosition.y && position.y <= callHintScenePosition.y + callHint.height) {
186− callHint.activate();
187− // tapped on top half of indicator
188− } else if (!fullscreenMode && position.y > indicatorScenePosition.y && position.y < indicatorScenePosition.y + panelHeight/2) {
189− callHint.activate();
195− PanelSeparatorLine {
196− id: indicatorsSeparatorLine
199− top: indicators.bottom
200− left: indicatorDividor.left
201− right: indicators.right
206− SearchIndicator {
161+ SearchIndicator {
207− id: search
162+ id: search
208− objectName: "search"
163+ objectName: "search"
209− enabled: root.searchVisible
164+ enabled: root.searchVisible
211− state: {
166+ state: {
167+ if (callHint.visible) {
212− if (parent.width < indicators.width + width) {
170+ if (parent.width < indicators.width + width) {
213− if (indicators.state != "initial") {
171+ if (indicators.state != "initial") {
175+ if (root.searchVisible && !indicators.showAll) {
214− return "hidden";
176+ return "visible";
217− if (root.searchVisible && !indicators.showAll) {
180+ anchors {
218− return "visible";
181+ top: parent.top
220− return "hidden";
184+ height: indicators.panelHeight
223− anchors {
186+ mouseArea {
224− top: nonIndicatorArea.top
187+ onClicked: root.searchClicked()
225− bottom: nonIndicatorArea.bottom
188+ }
226− left: nonIndicatorArea.left
229− mouseArea {
191+ ActiveCallHint {
230− onClicked: root.searchClicked()
192+ id: __callHint
232− }
197+ height: indicators.panelHeight
198+ visible: active && indicators.state == "initial"
234− ActiveCallHint {
200+ Component.onCompleted: console.log("callHint " + width)
243− states: [
203+ PanelSeparatorLine {
244− State {
204+ id: indicatorsSeparatorLine
245− name: "active"
205+ visible: true
246− when: callHint.active
206+ anchors {
247− PropertyChanges { target: callHint; y: 0 }
207+ top: indicators.bottom
248− PropertyChanges { target: search.mouseArea; anchors.topMargin: -callHint.height/3 }
208+ left: indicatorDividor.left
209+ right: indicators.right
251− Behavior on y { StandardAnimation {} }
254 QtObject {
214 QtObject {
256− readonly property real indicatorHeight: indicators.panelHeight + leftSeparatorLine.height
216+ readonly property real indicatorHeight: indicators.panelHeight + indicatorsSeparatorLine.height
259 states: [
219 states: [
@@ -264,33 +224,7 @@ Item {
265 name: "offscreen" //pushed off screen
225 name: "offscreen" //pushed off screen
266 when: fullscreenMode
226 when: fullscreenMode
267− PropertyChanges { target: nonIndicatorArea; anchors.topMargin: -d.indicatorHeight }
268 PropertyChanges { target: indicatorArea; anchors.topMargin: indicators.state === "initial" ? -d.indicatorHeight : 0 }
227 PropertyChanges { target: indicatorArea; anchors.topMargin: indicators.state === "initial" ? -d.indicatorHeight : 0 }
275− SequentialAnimation {
277− StandardAnimation { target: nonIndicatorArea; property: "anchors.topMargin" }
278− StandardAnimation { target: indicatorArea; property: "anchors.topMargin" }
280− PropertyAction { target: search; property: "z"; value: 2 }
281− PropertyAction { target: indicatorArea; property: "z"; value: 2 }
286− SequentialAnimation {
287− PropertyAction { target: search; property: "z"; value: 0 }
288− PropertyAction { target: indicatorArea; property: "z"; value: 0 }
290− StandardAnimation { target: nonIndicatorArea; property: "anchors.topMargin" }
291− StandardAnimation { target: indicatorArea; property: "anchors.topMargin" }