@@ -34,38 +34,18 @@ Rectangle {
3434 property bool moving: launcherListView.moving || launcherListView.flicking
3535 property bool preventHiding: moving || dndArea.draggedIndex >= 0 || quickList.state === "open" || dndArea.pressed
3636 property int highlightIndex: -1
37− property int alertIndex: -1
3837
3938 signal applicationSelected(string appId)
4039 signal showDashHome()
40+ signal panelMoved()
4141
4242 onXChanged: {
4343 if (quickList.state == "open") {
4444 quickList.state = ""
4545 }
4646
47− if (fakeAlertingItem.visible && fakeAlertingItem.x > units.gu(.5)) {
48− fakeAlertingItem.x = Math.max(units.gu(4.5) - parent.visibleWidth, units.gu(.5))
49− }
50− }
51−
52− onAlertIndexChanged: {
53− if (alertIndex !== -1) {
54− //unfold
55−
56− panel.visible = true
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
64− } else {
65− // fold
66−
67− // hide fake-alerting-icon
68− fakeAlertingItem.alerting = false
47+ if (launcherListView.peekingIndex !== -1) {
48+ panelMoved()
6949 }
7050 }
7151
@@ -111,6 +91,7 @@ Rectangle {
11191 height: parent.height - dashItem.height - parent.spacing*2
11292
11393 Item {
94+ id: launcherListViewItem
11495 anchors.fill: parent
11596 clip: true
11697
@@ -134,6 +115,9 @@ Rectangle {
134115 preferredHighlightBegin: (height - itemHeight) / 2
135116 preferredHighlightEnd: (height + itemHeight) / 2
136117
118+ // for the single peeking icon, when alert-state is set on delegate
119+ property int peekingIndex: -1
120+
137121 // The size of the area the ListView is extended to make sure items are not
138122 // destroyed when dragging them outside the list. This needs to be at least
139123 // itemHeight to prevent folded items from disappearing and DragArea limits
@@ -153,6 +137,28 @@ Rectangle {
153137 flick(0, clickFlickSpeed)
154138 }
155139
140+ function peeking(peek) {
141+ if (peekingIndex === -1) {
142+ peekingIndex = peek
143+ }
144+ }
145+
146+ function unpeeking(peek) {
147+ if (peekingIndex === peek) {
148+ peekingIndex = -1
149+ }
150+ }
151+
152+ onPeekingIndexChanged: {
153+ if (peekingIndex !== -1) {
154+ panel.visible = true
155+ launcherListViewItem.clip = false
156+ positionViewAtIndex(peekingIndex, ListView.Center)
157+ } else {
158+ launcherListViewItem.clip = true
159+ }
160+ }
161+
156162 // The height of the area where icons start getting folded
157163 property int foldingStartHeight: units.gu(6.5)
158164 // The height of the area where the items reach the final folding angle
@@ -209,7 +215,6 @@ Rectangle {
209215 z: -Math.abs(offset)
210216 maxAngle: 55
211217 property bool dragging: false
212− itemOpacity: index === alertIndex ? 0 : 1
213218
214219 ThinDivider {
215220 id: dropIndicator
@@ -528,66 +533,6 @@ Rectangle {
528533 to: 0
529534 }
530535 }
531−
532− LauncherDelegate {
533− id: fakeAlertingItem
534−
535− property int index
536−
537− objectName: "fakeAlertingItem"
538− visible: false
539− itemWidth: launcherListView.itemWidth
540− itemHeight: launcherListView.itemHeight
541− height: itemHeight
542− width: itemWidth
543− rotation: root.rotation1G
544− alerting: false
545−
546− onAlertingChanged: {
547− if (alerting) {
548− if (launcher.state !== "visible") {
549− fakeAlertingItemReveal.start();
550− }
551− } else {
552− fakeAlertingItemHide.start();
553− }
554− }
555−
556− ParallelAnimation {
557− id: fakeAlertingItemReveal
558−
559− /*UbuntuNumberAnimation {
560− target: fakeAlertingItem;
561− properties: "angle, offset";
562− to: 0
563− }*/
564−
565− UbuntuNumberAnimation {
566− target: fakeAlertingItem;
567− properties: "x";
568− from: units.gu(.5)
569− to: units.gu(1) + launcherListView.width * .5
570− duration: UbuntuAnimation.BriskDuration
571− }
572− }
573−
574− SequentialAnimation {
575− id: fakeAlertingItemHide
576−
577− UbuntuNumberAnimation {
578− target: fakeAlertingItem;
579− properties: "x";
580− to: units.gu(.5)
581− duration: UbuntuAnimation.BriskDuration
582− }
583−
584− PropertyAction {
585− target: fakeAlertingItem
586− properties: "visible"
587− value: false
588− }
589− }
590− }
591536 }
592537 }
593538