18 import Ubuntu.Components 0.1
19 import
"../Components"
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
25 property alias indicators: indicatorsMenu
26 property bool fullscreenMode:
false
27 property bool searchVisible:
true
29 readonly
property real separatorLineHeight: leftSeparatorLine.height
30 readonly
property real __panelMinusSeparatorLineHeight: panelHeight - separatorLineHeight
34 function hideIndicatorMenu(delay) {
35 if (delay !== undefined) {
36 hideTimer.interval = delay;
39 indicatorsMenu.hide();
47 indicatorsMenu.hide();
52 target: indicatorsMenu
53 onShownChanged: hideTimer.stop()
62 height: __panelMinusSeparatorLineHeight
65 Behavior on y { StandardAnimation { duration: UbuntuAnimation.FastDuration } }
71 top: panelBackground.bottom
73 right: indicatorsMenu.left
75 saturation: 1 - indicatorsMenu.unitProgress
80 property real darkenedOpacity: 0.6
84 top: panelBackground.bottom
88 opacity: indicatorsMenu.unitProgress * darkenedOpacity
91 enabled: indicatorsMenu.shown
92 onClicked:
if (indicatorsMenu.fullyOpened) indicatorsMenu.hide();
98 objectName:
"indicators"
100 anchors.right: parent.right
102 width: root.indicatorsMenuWidth
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
111 id: indicatorsSeparatorLine
114 left: indicatorsMenu.left
115 right: indicatorsMenu.right
117 y: indicatorsMenu.visualBottom
124 bottom: indicatorsSeparatorLine.bottom
125 left: indicators.left
126 right: indicators.right
127 margins: -units.gu(1)
129 visible: indicatorsMenu.height > indicatorsMenu.panelHeight
130 source:
"graphics/rectangular_dropshadow.sci"
136 enabled: root.searchVisible
139 if (parent.width < indicatorsMenu.width + width) {
140 if (indicatorsMenu.state !=
"initial") {
144 if (root.searchVisible && !indicatorsMenu.showAll) {
151 height: __panelMinusSeparatorLineHeight
153 top: panelBackground.top
154 left: panelBackground.left
157 onClicked: root.searchClicked()
163 when: !fullscreenMode
164 PropertyChanges { target: panelBackground; y: 0 }
169 PropertyChanges { target: panelBackground; y: -panelHeight }