2 * Copyright (C) 2013-2015 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 1.1
19import Unity.Application 0.1
21import "../Components/PanelState"
26 readonly property real panelHeight: indicatorArea.y + d.indicatorHeight
27 property alias indicators: __indicators
28 property alias callHint: __callHint
29 property bool fullscreenMode: false
30 property real indicatorAreaShowProgress: 1.0
31 property bool locked: false
33 opacity: fullscreenMode && indicators.fullyClosed ? 0.0 : 1.0
37 property: "panelHeight"
38 value: root.panelHeight
43 property real darkenedOpacity: 0.6
46 topMargin: panelHeight
52 opacity: indicators.unitProgress * darkenedOpacity
53 visible: !indicators.fullyClosed
57 onClicked: if (indicators.fullyOpened) indicators.hide();
58 hoverEnabled: true // should also eat hover events, otherwise they will pass through
64 objectName: "indicatorArea"
68 Behavior on anchors.topMargin {
69 NumberAnimation { duration: UbuntuAnimation.FastDuration; easing: UbuntuAnimation.StandardEasing }
72 transform: Translate {
73 y: indicators.state === "initial"
74 ? (1.0 - indicatorAreaShowProgress) * -d.indicatorHeight
82 leftMargin: -units.gu(1)
83 bottomMargin: -units.gu(1)
85 visible: !indicators.fullyClosed
86 source: "graphics/rectangular_dropshadow.sci"
90 id: indicatorAreaBackground
91 color: callHint.visible ? "green" : "black"
97 height: indicators.minimizedPanelHeight
99 Behavior on color { ColorAnimation { duration: UbuntuAnimation.FastDuration } }
105 top: indicatorAreaBackground.bottom
107 right: indicators.left
109 saturation: 1 - indicators.unitProgress
111 // Don't let input event pass trough
112 MouseArea { anchors.fill: parent }
118 bottom: indicators.bottom
119 right: indicators.left
120 topMargin: indicatorArea.anchors.topMargin + indicators.minimizedPanelHeight
123 source: "graphics/VerticalDivider.png"
130 right: indicators.left
132 height: indicators.minimizedPanelHeight
133 onClicked: { if (callHint.visible) { callHint.showLiveCall(); } }
138 objectName: "indicators"
146 width: root.width - (windowControlButtons.visible ? windowControlButtons.width + titleLabel.width : 0)
147 minimizedPanelHeight: units.gu(3)
148 expandedPanelHeight: units.gu(7)
149 openedHeight: root.height - indicatorOrangeLine.height
152 if (callHint.visible) {
153 return Math.max(root.width - (callHint.width + units.gu(2)), 0)
157 enableHint: !callHint.active && !fullscreenMode
158 showOnClick: !callHint.visible
159 panelColor: indicatorAreaBackground.color
162 if (callHint.active) {
163 callHint.showLiveCall();
168 anchors.bottomMargin: -indicatorOrangeLine.height
172 WindowControlButtons {
173 id: windowControlButtons
174 objectName: "panelWindowControlButtons"
178 margins: units.gu(0.7)
180 height: indicators.minimizedPanelHeight - anchors.margins * 2
181 visible: PanelState.buttonsVisible && !root.locked
182 onClose: PanelState.close()
183 onMinimize: PanelState.minimize()
184 onMaximize: PanelState.maximize()
189 objectName: "windowDecorationTitle"
191 left: windowControlButtons.right
193 margins: units.gu(0.7)
196 height: windowControlButtons.height
197 visible: windowControlButtons.visible
198 verticalAlignment: Text.AlignVCenter
201 text: PanelState.title
205 id: indicatorOrangeLine
207 top: indicators.bottom
208 left: indicators.left
209 right: indicators.right
217 left: windowControlButtons.visible ? windowControlButtons.right : parent.left
219 height: indicators.minimizedPanelHeight
220 visible: active && indicators.state == "initial"
226 objectName: "panelPriv"
227 readonly property real indicatorHeight: indicators.minimizedPanelHeight + indicatorOrangeLine.height
232 name: "onscreen" //fully opaque and visible at top edge of screen
233 when: !fullscreenMode
235 target: indicatorArea;
240 name: "offscreen" //pushed off screen
243 target: indicatorArea;
244 anchors.topMargin: indicators.state === "initial" ? -d.indicatorHeight : 0
247 target: indicators.showDragHandle;
248 anchors.bottomMargin: -units.gu(1)
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