@@ -20,14 +20,12 @@ import "../Components"
2020
2121Item {
2222 id: root
23− readonly property real panelHeight: units.gu(3) + units.dp(2)
24− property real indicatorsMenuWidth: (shell.width > units.gu(60)) ? units.gu(40) : shell.width
23+ readonly property real panelHeight: callHint.active ? callHint.height + lowerPanelHeight : lowerPanelHeight
24+ property real indicatorsMenuWidth: (width > units.gu(60)) ? units.gu(40) : width
2525 property alias indicators: indicatorsMenu
2626 property bool fullscreenMode: false
2727 property bool searchVisible: true
28−
29− readonly property real separatorLineHeight: leftSeparatorLine.height
30− readonly property real __panelMinusSeparatorLineHeight: panelHeight - separatorLineHeight
28+ readonly property real lowerPanelHeight: indicatorsMenu.panelHeight + leftSeparatorLine.height
3129
3230 signal searchClicked
3331
@@ -53,120 +51,147 @@ Item {
5351 onShownChanged: hideTimer.stop()
5452 }
5553
56− PanelBackground {
57− id: panelBackground
54+ ActiveCallHint {
55+ id: callHint
56+
5857 anchors {
5958 left: parent.left
6059 right: parent.right
6160 }
62− height: __panelMinusSeparatorLineHeight
63− y: 0
61+ height: units.gu(3)
6462
65− Behavior on y { StandardAnimation { duration: UbuntuAnimation.FastDuration } }
66− }
63+ y: active ? 0 : -height
64+ z: 1
6765
68− PanelSeparatorLine {
69− id: leftSeparatorLine
70− anchors {
71− top: panelBackground.bottom
72− left: parent.left
73− right: indicatorsMenu.left
74− }
75− saturation: 1 - indicatorsMenu.unitProgress
66+ Behavior on y { StandardAnimation {} }
7667 }
7768
78− Rectangle {
79− id: darkenedArea
80− property real darkenedOpacity: 0.6
69+ Item {
70+ id: lowerPanel
71+
8172 anchors {
8273 left: parent.left
8374 right: parent.right
84− top: panelBackground.bottom
85− bottom: parent.bottom
8675 }
87− color: "black"
88− opacity: indicatorsMenu.unitProgress * darkenedOpacity
89− MouseArea {
90− anchors.fill: parent
91− enabled: indicatorsMenu.shown
92− onClicked: if (indicatorsMenu.fullyOpened) indicatorsMenu.hide();
76+ height: root.height - lowerPanel.y
77+ z: 0
78+
79+ PanelBackground {
80+ id: panelBackground
81+ anchors {
82+ top: parent.top
83+ left: parent.left
84+ right: parent.right
85+ }
86+ height: indicatorsMenu.panelHeight
9387 }
94− }
9588
96− Indicators {
97− id: indicatorsMenu
98− objectName: "indicators"
99−
100− anchors.right: parent.right
101− y: panelBackground.y
102− width: root.indicatorsMenuWidth
103− shown: false
104− panelHeight: __panelMinusSeparatorLineHeight
105− openedHeight: parent.height + (pinnedMode ? 0 : root.panelHeight)
106− pinnedMode: !fullscreenMode
107− overFlowWidth: search.state=="hidden" ? parent.width : parent.width - search.width
108− }
109−
110− PanelSeparatorLine {
111− id: indicatorsSeparatorLine
112− visible: true
113− anchors {
114− left: indicatorsMenu.left
115− right: indicatorsMenu.right
89+ PanelSeparatorLine {
90+ id: leftSeparatorLine
91+ anchors {
92+ top: panelBackground.bottom
93+ left: parent.left
94+ right: indicatorsMenu.left
95+ }
96+ saturation: 1 - indicatorsMenu.unitProgress
11697 }
117− y: indicatorsMenu.visualBottom
118− }
11998
120− BorderImage {
121− id: dropShadow
122− anchors {
123− top: indicators.top
124− bottom: indicatorsSeparatorLine.bottom
125− left: indicators.left
126− right: indicators.right
127− margins: -units.gu(1)
99+ Rectangle {
100+ id: darkenedArea
101+ property real darkenedOpacity: 0.6
102+ anchors {
103+ left: parent.left
104+ right: parent.right
105+ top: panelBackground.bottom
106+ bottom: parent.bottom
107+ }
108+ color: "black"
109+ opacity: indicatorsMenu.unitProgress * darkenedOpacity
110+ MouseArea {
111+ anchors.fill: parent
112+ enabled: indicatorsMenu.shown
113+ onClicked: if (indicatorsMenu.fullyOpened) indicatorsMenu.hide();
114+ }
128115 }
129− visible: indicatorsMenu.height > indicatorsMenu.panelHeight
130− source: "graphics/rectangular_dropshadow.sci"
131− }
132116
133− SearchIndicator {
134− id: search
135− objectName: "search"
136− enabled: root.searchVisible
117+ Indicators {
118+ id: indicatorsMenu
119+ objectName: "indicators"
137120
138− state: {
139− if (parent.width < indicatorsMenu.width + width) {
140− if (indicatorsMenu.state != "initial") {
141− return "hidden";
142− }
143− }
144− if (root.searchVisible && !indicatorsMenu.showAll) {
145− return "visible";
121+ anchors {
122+ top: parent.top
123+ right: parent.right
146124 }
147125
148− return "hidden";
126+ width: root.indicatorsMenuWidth
127+ shown: false
128+ panelHeight: units.gu(3)
129+ openedHeight: parent.height
130+ pinnedMode: !fullscreenMode
131+ overFlowWidth: search.state=="hidden" ? parent.width : parent.width - search.width
149132 }
150133
151− height: __panelMinusSeparatorLineHeight
152− anchors {
153− top: panelBackground.top
154− left: panelBackground.left
134+ PanelSeparatorLine {
135+ id: indicatorsSeparatorLine
136+ visible: true
137+ anchors {
138+ left: indicatorsMenu.left
139+ right: indicatorsMenu.right
140+ }
141+ y: indicatorsMenu.visualBottom
155142 }
156143
157− onClicked: root.searchClicked()
144+ BorderImage {
145+ id: dropShadow
146+ anchors {
147+ top: indicators.top
148+ bottom: indicatorsSeparatorLine.bottom
149+ left: indicators.left
150+ right: indicators.right
151+ margins: -units.gu(1)
152+ }
153+ visible: indicatorsMenu.height > indicatorsMenu.panelHeight
154+ source: "graphics/rectangular_dropshadow.sci"
155+ }
156+
157+ SearchIndicator {
158+ id: search
159+ objectName: "search"
160+ enabled: root.searchVisible
161+
162+ state: {
163+ if (parent.width < indicatorsMenu.width + width) {
164+ if (indicatorsMenu.state != "initial") {
165+ return "hidden";
166+ }
167+ }
168+ if (root.searchVisible && !indicatorsMenu.showAll) {
169+ return "visible";
170+ }
171+
172+ return "hidden";
173+ }
174+
175+ anchors {
176+ top: panelBackground.top
177+ left: panelBackground.left
178+ }
179+ height: panelBackground.height
180+
181+ onClicked: root.searchClicked()
182+ }
158183 }
159184
160185 states: [
161186 State {
162187 name: "in" //fully opaque and visible at top edge of screen
163188 when: !fullscreenMode
164− PropertyChanges { target: panelBackground; y: 0 }
189+ PropertyChanges { target: lowerPanel; y: callHint.y + callHint.height }
165190 },
166191 State {
167192 name: "out" //pushed off screen
168193 when: fullscreenMode
169− PropertyChanges { target: panelBackground; y: -panelHeight }
194+ PropertyChanges { target: lowerPanel; y: callHint.y + callHint.height - lowerPanelHeight }
170195 }
171196 ]
172197}