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.3
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
35 anchors.topMargin: panelHeight
36 visible: !indicators.fullyClosed
38 onClicked: if (indicators.fullyOpened) indicators.hide();
39 hoverEnabled: true // should also eat hover events, otherwise they will pass through
44 property: "panelHeight"
45 value: indicators.minimizedPanelHeight
50 objectName: "indicatorArea"
54 transform: Translate {
55 y: indicators.state === "initial"
56 ? (1.0 - indicatorAreaShowProgress) * -d.indicatorHeight
61 id: indicatorsDropShadow
64 leftMargin: -units.gu(1)
65 bottomMargin: -units.gu(1)
67 visible: !indicators.fullyClosed
68 source: "graphics/rectangular_dropshadow.sci"
74 fill: indicatorAreaBackground
75 bottomMargin: -units.gu(1)
77 visible: PanelState.dropShadow && !callHint.visible
78 source: "graphics/rectangular_dropshadow.sci"
82 id: indicatorAreaBackground
83 color: callHint.visible ? UbuntuColors.green : theme.palette.normal.background
89 height: indicators.minimizedPanelHeight
91 Behavior on color { ColorAnimation { duration: UbuntuAnimation.FastDuration } }
98 right: indicators.left
100 height: indicators.minimizedPanelHeight
102 onClicked: callHint.visible ? callHint.showLiveCall() : PanelState.focusMaximizedApp()
103 onDoubleClicked: PanelState.maximize()
105 // WindowControlButtons inside the mouse area, otherwise QML doesn't grok nested hover events :/
106 // cf. https://bugreports.qt.io/browse/QTBUG-32909
107 WindowControlButtons {
108 id: windowControlButtons
109 objectName: "panelWindowControlButtons"
113 leftMargin: units.gu(1)
114 topMargin: units.gu(0.5)
115 bottomMargin: units.gu(0.5)
117 height: indicators.minimizedPanelHeight - anchors.topMargin - anchors.bottomMargin
118 visible: PanelState.buttonsVisible && parent.containsMouse && !root.locked && !callHint.visible
119 active: PanelState.buttonsVisible
120 onClose: PanelState.close()
121 onMinimize: PanelState.minimize()
122 onMaximize: PanelState.maximize()
128 objectName: "indicators"
136 width: root.width - (windowControlButtons.visible ? windowControlButtons.width + titleLabel.width : 0)
137 minimizedPanelHeight: units.gu(3)
138 expandedPanelHeight: units.gu(7)
139 openedHeight: root.height
142 if (callHint.visible) {
143 return Math.max(root.width - (callHint.width + units.gu(2)), 0)
147 enableHint: !callHint.active && !fullscreenMode
148 showOnClick: !callHint.visible
149 panelColor: indicatorAreaBackground.color
152 if (callHint.active) {
153 callHint.showLiveCall();
160 objectName: "windowDecorationTitle"
163 right: __indicators.left
165 leftMargin: units.gu(1)
166 rightMargin: units.gu(1)
167 topMargin: units.gu(0.5)
168 bottomMargin: units.gu(0.5)
170 color: PanelState.buttonsVisible ? "#ffffff" : "#5d5d5d"
171 height: indicators.minimizedPanelHeight - anchors.topMargin - anchors.bottomMargin
172 visible: !windowControlButtons.visible && !root.locked && !callHint.visible
173 verticalAlignment: Text.AlignVCenter
175 font.weight: Font.Normal
176 text: PanelState.title
177 elide: Text.ElideRight
181 // TODO here would the Locally integrated menus come
189 height: indicators.minimizedPanelHeight
190 visible: active && indicators.state == "initial"
196 objectName: "panelPriv"
197 readonly property real indicatorHeight: indicators.minimizedPanelHeight
202 name: "onscreen" //fully opaque and visible at top edge of screen
203 when: !fullscreenMode
205 target: indicatorArea;
211 name: "offscreen" //pushed off screen
214 target: indicatorArea;
215 anchors.topMargin: indicators.state === "initial" ? -d.indicatorHeight : 0
216 opacity: indicators.fullyClosed ? 0.0 : 1.0
219 target: indicators.showDragHandle;
220 anchors.bottomMargin: -units.gu(1)
228 UbuntuNumberAnimation { target: indicatorArea; properties: "anchors.topMargin,opacity" }
232 UbuntuNumberAnimation { target: indicatorArea; properties: "anchors.topMargin,opacity" }
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