@@ -34,6 +34,7 @@ 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
3738
3839 signal applicationSelected(string appId)
3940 signal showDashHome()
@@ -44,6 +45,38 @@ Rectangle {
4445 }
4546 }
4647
48+ onAlertIndexChanged: {
49+ if (alertIndex !== -1) {
50+ //unfold
51+
52+ panel.visible = true
53+ fakeAlertingItem.index = alertIndex
54+ fakeAlertingItem.iconName = launcherListView.model.get(alertIndex).icon
55+ fakeAlertingItem.y = alertIndex * fakeAlertingItem.itemHeight + launcherListView.anchors.topMargin + launcherListView.topMargin
56+ fakeAlertingItem.count = LauncherModel.get(alertIndex).count
57+ fakeAlertingItem.progress = LauncherModel.get(alertIndex).progress
58+ fakeAlertingItem.alerting = true
59+ fakeAlertingItem.visible = true
60+ if (launcher.state !== "visible") {
61+ fakeAlertingItem.reveal()
62+ }
63+ print("y = ", fakeAlertingItem.y)
64+ print("index = ", fakeAlertingItem.index)
65+ } else {
66+ // set real icon back to visible
67+
68+ // fold
69+
70+ // hide fake-alerting-icon
71+ fakeAlertingItem.alerting = false
72+
73+ if (launcher.state !== "visible") {
74+ fakeAlertingItem.hide()
75+ }
76+ //fakeAlertingItem.visible = false
77+ }
78+ }
79+
4780 Column {
4881 id: mainColumn
4982 anchors {
@@ -501,6 +534,65 @@ Rectangle {
501534 to: 0
502535 }
503536 }
537+
538+ LauncherDelegate {
539+ id: fakeAlertingItem
540+
541+ property int index
542+
543+ objectName: "fakeAlertingItem"
544+ visible: false
545+ itemWidth: launcherListView.itemWidth
546+ itemHeight: launcherListView.itemHeight
547+ height: itemHeight
548+ width: itemWidth
549+ rotation: root.rotation
550+ alerting: false
551+
552+ function reveal() {
553+ fakeAlertingItemReveal.start();
554+ }
555+
556+ function hide() {
557+ fakeAlertingItemHide.start();
558+ }
559+
560+ ParallelAnimation {
561+ id: fakeAlertingItemReveal
562+
563+ UbuntuNumberAnimation {
564+ target: fakeAlertingItem;
565+ properties: "angle, offset";
566+ to: 0
567+ }
568+
569+ UbuntuNumberAnimation {
570+ target: fakeAlertingItem;
571+ properties: "x";
572+ from: 0
573+ to: units.gu(1) + launcherListView.width * .5
574+ duration: UbuntuAnimation.BriskDuration
575+ }
576+ }
577+
578+ SequentialAnimation {
579+ id: fakeAlertingItemHide
580+
581+ UbuntuNumberAnimation {
582+ target: fakeAlertingItem;
583+ properties: "x";
584+ from: units.gu(1) + launcherListView.width * .5
585+ to: 0
586+ duration: UbuntuAnimation.BriskDuration
587+ }
588+
589+ PropertyAction {
590+ target: fakeAlertingItem
591+ properties: "visible"
592+ value: false
593+ }
594+ }
595+ }
504596 }
505597 }
506598