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
20import "../Components/ListItems"
24 readonly property real panelHeight: units.gu(3) + units.dp(2)
25 property real indicatorsMenuWidth: (shell.width > units.gu(60)) ? units.gu(40) : shell.width
26 property alias indicators: indicatorsMenu
27 property bool fullscreenMode: false
28 property bool searchVisible: true
30 readonly property real separatorLineHeight: leftSeparatorLine.height
31 readonly property real __panelMinusSeparatorLineHeight: panelHeight - separatorLineHeight
41 height: __panelMinusSeparatorLineHeight
43 onYChanged: indicatorsMenu.y = y;
46 NumberAnimation { duration: 200 }
53 top: panelBackground.bottom
55 right: indicatorsMenu.left
57 saturation: 1 - indicatorsMenu.unitProgress
62 property real darkenedOpacity: 0.6
66 top: panelBackground.bottom
70 opacity: indicatorsMenu.unitProgress * darkenedOpacity
73 enabled: indicatorsMenu.shown
74 onClicked: if (indicatorsMenu.fullyOpened) indicatorsMenu.hide();
81 top: indicatorsMenu.top
82 bottom: indicatorsSeparatorLine.bottom
83 left: indicatorsMenu.left
84 right: indicatorsMenu.right
87 visible: indicatorsMenu.progress != indicatorRevealer.closedValue
88 source: "graphics/rectangular_dropshadow.sci"
93 top: leftSeparatorLine.top
94 bottom: indicatorsSeparatorLine.top
95 right: indicatorsMenu.left
98 source: "graphics/VerticalDivider.png"
104 anchors.right: parent.right
106 width: root.indicatorsMenuWidth
108 revealer: indicatorRevealer
109 hintValue: indicatorRevealer.hintDisplacement
110 panelHeight: __panelMinusSeparatorLineHeight
111 showAnimation: StandardAnimation { property: "progress"; duration: 350; to: indicatorRevealer.openedValue; easing.type: Easing.OutCubic }
112 hideAnimation: StandardAnimation { property: "progress"; duration: 350; to: indicatorRevealer.closedValue; easing.type: Easing.OutCubic }
113 openedHeight: parent.height
115 pinnedMode: !fullscreenMode
117 property real unitProgress: (indicatorRevealer.closedValue - progress) / (indicatorRevealer.closedValue - indicatorRevealer.openedValue)
121 id: indicatorsSeparatorLine
123 top: indicatorsMenu.bottom
124 left: indicatorsMenu.left
130 id: indicatorRevealer
131 objectName: "indicatorRevealer"
133 width: root.indicatorsMenuWidth
136 bottom: parent.bottom
139 target: indicatorsMenu
140 handleSize: __panelMinusSeparatorLineHeight
141 closedValue: __panelMinusSeparatorLineHeight
142 dragVelocityThreshold: units.dp(1)
143 boundProperty: "progress"
144 hintDisplacement: __panelMinusSeparatorLineHeight * 3
145 openOnPress: !fullscreenMode
146 orientation: Qt.Vertical
149 indicatorsMenu.openOverview();
150 indicatorsMenu.show();
152 onCloseClicked: indicatorsMenu.hide();
154 onOpenPressed: indicatorsMenu.handlePress()
156 function dragToValue(dragPosition) {
157 var offset = target.shown ? 0 : -hintDisplacement + handleSize;
158 return dragPosition + offset;
165 enabled: root.searchVisible
168 if (parent.width < indicatorsMenu.width + width) {
169 if (indicatorsMenu.state != "initial") {
173 if (root.searchVisible) {
181 height: __panelMinusSeparatorLineHeight
183 top: panelBackground.top
184 left: panelBackground.left
187 onClicked: root.searchClicked()
192 name: "in" //fully opaque and visible at top edge of screen
193 when: !fullscreenMode
194 PropertyChanges { target: panelBackground; y: 0 }
195 PropertyChanges { target: indicatorRevealer; openedValue: indicatorsMenu.openedHeight - panelHeight }
198 name: "out" //pushed off screen
200 PropertyChanges { target: panelBackground; y: -panelHeight }
201 PropertyChanges { target: indicatorRevealer; openedValue: indicatorsMenu.openedHeight }
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