@@ -20,14 +20,12 @@ import "../Components"
23− readonly property real panelHeight: units.gu(3) + units.dp(2)
23+ readonly property real panelHeight: callHint.active ? callHint.height + lowerPanelHeight : lowerPanelHeight
24− property real indicatorsMenuWidth: (shell.width > units.gu(60)) ? units.gu(40) : shell.width
24+ property real indicatorsMenuWidth: (width > units.gu(60)) ? units.gu(40) : width
25 property alias indicators: indicatorsMenu
25 property alias indicators: indicatorsMenu
26 property bool fullscreenMode: false
26 property bool fullscreenMode: false
27 property bool searchVisible: true
27 property bool searchVisible: true
29− readonly property real separatorLineHeight: leftSeparatorLine.height
28+ readonly property real lowerPanelHeight: indicatorsMenu.panelHeight + leftSeparatorLine.height
30− readonly property real __panelMinusSeparatorLineHeight: panelHeight - separatorLineHeight
32 signal searchClicked
30 signal searchClicked
@@ -53,120 +51,147 @@ Item {
53 onShownChanged: hideTimer.stop()
51 onShownChanged: hideTimer.stop()
56− PanelBackground {
54+ ActiveCallHint {
57− id: panelBackground
55+ id: callHint
59 left: parent.left
58 left: parent.left
60 right: parent.right
59 right: parent.right
62− height: __panelMinusSeparatorLineHeight
61+ height: units.gu(3)
65− Behavior on y { StandardAnimation { duration: UbuntuAnimation.FastDuration } }
63+ y: active ? 0 : -height
68− PanelSeparatorLine {
66+ Behavior on y { StandardAnimation {} }
69− id: leftSeparatorLine
71− top: panelBackground.bottom
73− right: indicatorsMenu.left
75− saturation: 1 - indicatorsMenu.unitProgress
78− Rectangle {
69+ Item {
79− id: darkenedArea
70+ id: lowerPanel
80− property real darkenedOpacity: 0.6
71+
82 left: parent.left
73 left: parent.left
83 right: parent.right
74 right: parent.right
84− top: panelBackground.bottom
85− bottom: parent.bottom
87− color: "black"
76+ height: root.height - lowerPanel.y
88− opacity: indicatorsMenu.unitProgress * darkenedOpacity
77+ z: 0
90− anchors.fill: parent
81+ anchors {
91− enabled: indicatorsMenu.shown
82+ top: parent.top
92− onClicked: if (indicatorsMenu.fullyOpened) indicatorsMenu.hide();
83+ left: parent.left
86+ height: indicatorsMenu.panelHeight
96− Indicators {
89+ PanelSeparatorLine {
97− id: indicatorsMenu
90+ id: leftSeparatorLine
98− objectName: "indicators"
100− anchors.right: parent.right
91+ anchors {
101− y: panelBackground.y
92+ top: panelBackground.bottom
102− width: root.indicatorsMenuWidth
93+ left: parent.left
103− shown: false
94+ right: indicatorsMenu.left
104− panelHeight: __panelMinusSeparatorLineHeight
95+ }
105− openedHeight: parent.height + (pinnedMode ? 0 : root.panelHeight)
106− pinnedMode: !fullscreenMode
107− overFlowWidth: search.state=="hidden" ? parent.width : parent.width - search.width
110− PanelSeparatorLine {
111− id: indicatorsSeparatorLine
114− left: indicatorsMenu.left
96+ saturation: 1 - indicatorsMenu.unitProgress
115− right: indicatorsMenu.right
117− y: indicatorsMenu.visualBottom
120− BorderImage {
99+ Rectangle {
121− id: dropShadow
100+ id: darkenedArea
101+ property real darkenedOpacity: 0.6
122− anchors {
102+ anchors {
123− top: indicators.top
103+ left: parent.left
105+ top: panelBackground.bottom
124− bottom: indicatorsSeparatorLine.bottom
106+ bottom: parent.bottom
125− left: indicators.left
107+ }
126− right: indicators.right
108+ color: "black"
127− margins: -units.gu(1)
109+ opacity: indicatorsMenu.unitProgress * darkenedOpacity
111+ anchors.fill: parent
112+ enabled: indicatorsMenu.shown
113+ onClicked: if (indicatorsMenu.fullyOpened) indicatorsMenu.hide();
129− visible: indicatorsMenu.height > indicatorsMenu.panelHeight
130− source: "graphics/rectangular_dropshadow.sci"
133− SearchIndicator {
117+ Indicators {
134− id: search
118+ id: indicatorsMenu
135− objectName: "search"
119+ objectName: "indicators"
136− enabled: root.searchVisible
138− state: {
121+ anchors {
139− if (parent.width < indicatorsMenu.width + width) {
122+ top: parent.top
140− if (indicatorsMenu.state != "initial") {
123+ right: parent.right
144− if (root.searchVisible && !indicatorsMenu.showAll) {
148− return "hidden";
126+ width: root.indicatorsMenuWidth
128+ panelHeight: units.gu(3)
129+ openedHeight: parent.height
130+ pinnedMode: !fullscreenMode
131+ overFlowWidth: search.state=="hidden" ? parent.width : parent.width - search.width
151− height: __panelMinusSeparatorLineHeight
134+ PanelSeparatorLine {
135+ id: indicatorsSeparatorLine
152− anchors {
137+ anchors {
153− top: panelBackground.top
138+ left: indicatorsMenu.left
154− left: panelBackground.left
139+ right: indicatorsMenu.right
141+ y: indicatorsMenu.visualBottom
148+ bottom: indicatorsSeparatorLine.bottom
149+ left: indicators.left
150+ right: indicators.right
151+ margins: -units.gu(1)
153+ visible: indicatorsMenu.height > indicatorsMenu.panelHeight
154+ source: "graphics/rectangular_dropshadow.sci"
159+ objectName: "search"
160+ enabled: root.searchVisible
163+ if (parent.width < indicatorsMenu.width + width) {
164+ if (indicatorsMenu.state != "initial") {
168+ if (root.searchVisible && !indicatorsMenu.showAll) {
176+ top: panelBackground.top
177+ left: panelBackground.left
179+ height: panelBackground.height
157− onClicked: root.searchClicked()
181+ onClicked: root.searchClicked()
160 states: [
185 states: [
162 name: "in" //fully opaque and visible at top edge of screen
187 name: "in" //fully opaque and visible at top edge of screen
163 when: !fullscreenMode
188 when: !fullscreenMode
164− PropertyChanges { target: panelBackground; y: 0 }
189+ PropertyChanges { target: lowerPanel; y: callHint.y + callHint.height }
167 name: "out" //pushed off screen
192 name: "out" //pushed off screen
168 when: fullscreenMode
193 when: fullscreenMode
169− PropertyChanges { target: panelBackground; y: -panelHeight }
194+ PropertyChanges { target: lowerPanel; y: callHint.y + callHint.height - lowerPanelHeight }