@@ -34,38 +34,18 @@ Rectangle {
34 property bool moving: launcherListView.moving || launcherListView.flicking
34 property bool moving: launcherListView.moving || launcherListView.flicking
35 property bool preventHiding: moving || dndArea.draggedIndex >= 0 || quickList.state === "open" || dndArea.pressed
35 property bool preventHiding: moving || dndArea.draggedIndex >= 0 || quickList.state === "open" || dndArea.pressed
36 property int highlightIndex: -1
36 property int highlightIndex: -1
37− property int alertIndex: -1
39 signal applicationSelected(string appId)
38 signal applicationSelected(string appId)
40 signal showDashHome()
39 signal showDashHome()
42 onXChanged: {
42 onXChanged: {
43 if (quickList.state == "open") {
43 if (quickList.state == "open") {
44 quickList.state = ""
44 quickList.state = ""
47− if (fakeAlertingItem.visible && fakeAlertingItem.x > units.gu(.5)) {
47+ if (launcherListView.peekingIndex !== -1) {
48− fakeAlertingItem.x = Math.max(units.gu(4.5) - parent.visibleWidth, units.gu(.5))
48+ panelMoved()
52− onAlertIndexChanged: {
53− if (alertIndex !== -1) {
57− fakeAlertingItem.index = alertIndex
58− fakeAlertingItem.iconName = launcherListView.model.get(alertIndex).icon
59− fakeAlertingItem.y = alertIndex * fakeAlertingItem.itemHeight + launcherListView.anchors.topMargin + launcherListView.topMargin
60− fakeAlertingItem.progress = launcherListView.model.get(alertIndex).progress
61− fakeAlertingItem.alerting = true
62− fakeAlertingItem.countVisible = launcherListView.model.get(alertIndex).countVisible
63− fakeAlertingItem.visible = true
67− // hide fake-alerting-icon
68− fakeAlertingItem.alerting = false
@@ -111,6 +91,7 @@ Rectangle {
111 height: parent.height - dashItem.height - parent.spacing*2
91 height: parent.height - dashItem.height - parent.spacing*2
94+ id: launcherListViewItem
114 anchors.fill: parent
95 anchors.fill: parent
115 clip: true
96 clip: true
@@ -134,6 +115,9 @@ Rectangle {
134 preferredHighlightBegin: (height - itemHeight) / 2
115 preferredHighlightBegin: (height - itemHeight) / 2
135 preferredHighlightEnd: (height + itemHeight) / 2
116 preferredHighlightEnd: (height + itemHeight) / 2
118+ // for the single peeking icon, when alert-state is set on delegate
119+ property int peekingIndex: -1
137 // The size of the area the ListView is extended to make sure items are not
121 // The size of the area the ListView is extended to make sure items are not
138 // destroyed when dragging them outside the list. This needs to be at least
122 // destroyed when dragging them outside the list. This needs to be at least
139 // itemHeight to prevent folded items from disappearing and DragArea limits
123 // itemHeight to prevent folded items from disappearing and DragArea limits
@@ -153,6 +137,28 @@ Rectangle {
153 flick(0, clickFlickSpeed)
137 flick(0, clickFlickSpeed)
140+ function peeking(peek) {
141+ if (peekingIndex === -1) {
146+ function unpeeking(peek) {
147+ if (peekingIndex === peek) {
152+ onPeekingIndexChanged: {
153+ if (peekingIndex !== -1) {
154+ panel.visible = true
155+ launcherListViewItem.clip = false
156+ positionViewAtIndex(peekingIndex, ListView.Center)
158+ launcherListViewItem.clip = true
156 // The height of the area where icons start getting folded
162 // The height of the area where icons start getting folded
157 property int foldingStartHeight: units.gu(6.5)
163 property int foldingStartHeight: units.gu(6.5)
158 // The height of the area where the items reach the final folding angle
164 // The height of the area where the items reach the final folding angle
@@ -209,7 +215,6 @@ Rectangle {
209 z: -Math.abs(offset)
215 z: -Math.abs(offset)
210 maxAngle: 55
216 maxAngle: 55
211 property bool dragging: false
217 property bool dragging: false
212− itemOpacity: index === alertIndex ? 0 : 1
214 ThinDivider {
219 ThinDivider {
215 id: dropIndicator
220 id: dropIndicator
@@ -528,66 +533,6 @@ Rectangle {
533− id: fakeAlertingItem
537− objectName: "fakeAlertingItem"
539− itemWidth: launcherListView.itemWidth
540− itemHeight: launcherListView.itemHeight
543− rotation: root.rotation1G
546− onAlertingChanged: {
548− if (launcher.state !== "visible") {
549− fakeAlertingItemReveal.start();
552− fakeAlertingItemHide.start();
557− id: fakeAlertingItemReveal
559− /*UbuntuNumberAnimation {
560− target: fakeAlertingItem;
561− properties: "angle, offset";
565− UbuntuNumberAnimation {
566− target: fakeAlertingItem;
569− to: units.gu(1) + launcherListView.width * .5
570− duration: UbuntuAnimation.BriskDuration
574− SequentialAnimation {
575− id: fakeAlertingItemHide
577− UbuntuNumberAnimation {
578− target: fakeAlertingItem;
581− duration: UbuntuAnimation.BriskDuration
585− target: fakeAlertingItem
586− properties: "visible"