2 * Copyright (C) 2013 Canonical, Ltd.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18import Ubuntu.Components 0.1
19import Unity.Application 0.1
21import "../Components/ListItems"
25 readonly property real panelHeight: nonIndicatorArea.y + nonIndicatorArea.height
26 property alias indicators: __indicators
27 property alias callHint: __callHint
28 property bool fullscreenMode: false
29 property bool searchVisible: true
33 function hideIndicatorMenu(delay) {
34 if (delay !== undefined) {
35 hideTimer.interval = delay;
52 onShownChanged: hideTimer.stop()
57 property real darkenedOpacity: 0.6
61 top: nonIndicatorArea.bottom
65 opacity: indicators.unitProgress * darkenedOpacity
69 enabled: indicators.shown
70 onClicked: if (indicators.fullyOpened) indicators.hide();
75 anchors.fill: nonIndicatorArea
80 objectName: "indicatorArea"
87 height: d.indicatorHeight
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()
120 objectName: "indicatorArea"
125 bottom: parent.bottom
127 width: indicators.width
129 Behavior on anchors.topMargin { StandardAnimation {} }
135 leftMargin: -units.gu(1)
136 bottomMargin: -units.gu(1)
138 visible: indicators.height > indicators.panelHeight
139 source: "graphics/rectangular_dropshadow.sci"
142 VerticalThinDivider {
146 bottom: indicators.bottom
147 right: indicators.left
149 topMargin: nonIndicatorArea.anchors.topMargin + indicators.panelHeight
153 source: "graphics/VerticalDivider.png"
157 anchors.fill: indicators
162 objectName: "indicators"
169 width: (root.width > units.gu(60)) ? units.gu(40) : root.width
171 panelHeight: units.gu(3)
172 openedHeight: root.height - (callHint.y + callHint.height)
173 overFlowWidth: search.state=="hidden" ? root.width : root.width - search.width
175 enableHint: !callHint.active && !fullscreenMode
176 showHintBottomMargin: fullscreenMode ? -panelHeight : 0
177 showHintHeightOffset: callHint.active ? callHint.height : 0
180 if (callHint.active) {
181 var callHintScenePosition = callHint.mapToItem(null, callHint.x, callHint.y);
182 var indicatorScenePosition = mapToItem(null, x, y);
184 // tapped on callHint
185 if (position.y > callHintScenePosition.y && position.y <= callHintScenePosition.y + callHint.height) {
187 // tapped on top half of indicator
188 } else if (!fullscreenMode && position.y > indicatorScenePosition.y && position.y < indicatorScenePosition.y + panelHeight/2) {
196 id: indicatorsSeparatorLine
199 top: indicators.bottom
200 left: indicatorDividor.left
201 right: indicators.right
209 enabled: root.searchVisible
212 if (parent.width < indicators.width + width) {
213 if (indicators.state != "initial") {
217 if (root.searchVisible && !indicators.showAll) {
224 top: nonIndicatorArea.top
225 bottom: nonIndicatorArea.bottom
226 left: nonIndicatorArea.left
230 onClicked: root.searchClicked()
246 when: callHint.active
247 PropertyChanges { target: callHint; y: 0 }
248 PropertyChanges { target: search.mouseArea; anchors.topMargin: -callHint.height/3 }
251 Behavior on y { StandardAnimation {} }
256 readonly property real indicatorHeight: indicators.panelHeight + leftSeparatorLine.height
261 name: "onscreen" //fully opaque and visible at top edge of screen
262 when: !fullscreenMode
265 name: "offscreen" //pushed off screen
267 PropertyChanges { target: nonIndicatorArea; anchors.topMargin: -d.indicatorHeight }
268 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" }
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list