@@ -434,7 +434,8 @@ Rectangle {
434434
435435 if (mouse.button & Qt.RightButton) { // context menu
436436 // Opening QuickList
437− quickList.open(index);
437+ //quickList.open(index);
438+ tooltip.open(index);
438439 return;
439440 }
440441
@@ -634,7 +635,7 @@ Rectangle {
634635
635636 UbuntuShape {
636637 id: quickListShape
637− objectName: "quickListShape"
638+ //objectName: "quickListShape"
638639 anchors.fill: quickList
639640 opacity: quickList.state === "open" ? 0.95 : 0
640641 visible: opacity > 0
@@ -828,4 +829,106 @@ Rectangle {
828829 }
829830 }
830831 }
832+
833+ UbuntuShape {
834+ id: tooltipShape
835+ anchors.fill: tooltip
836+ opacity: tooltip.state === "open" ? 0.95 : 0
837+ visible: opacity > 0
838+ rotation: root.rotation
839+ aspect: UbuntuShape.Flat
840+
841+ Behavior on opacity {
842+ UbuntuNumberAnimation {}
843+ }
844+
845+ source: ShaderEffectSource {
846+ sourceItem: tooltip
847+ hideSource: true
848+ }
849+
850+ Image {
851+ anchors {
852+ right: parent.left
853+ rightMargin: -units.dp(4)
854+ verticalCenter: parent.verticalCenter
855+ verticalCenterOffset: -tooltip.offset * (root.inverted ? -1 : 1)
856+ }
857+ height: units.gu(1)
858+ width: units.gu(2)
859+ source: "graphics/quicklist_tooltip.png"
860+ rotation: 90
861+ }
862+ }
863+
864+ Rectangle {
865+ id: tooltip
866+
867+ color: theme.palette.normal.background
868+ visible: tooltipShape.visible
869+
870+ width: tooltipLabel.width
871+ height: units.gu(5)
872+
873+ y: itemCenter - (height / 2) + offset
874+ rotation: root.rotation
875+
876+ anchors {
877+ left: root.inverted ? undefined : parent.right
878+ right: root.inverted ? parent.left : undefined
879+ margins: units.gu(1)
880+ }
881+
882+ property string text
883+ property var item
884+
885+ property int itemCenter: item ? root.mapFromItem(tooltip.item, 0, 0).y + (item.height / 2) + tooltip.item.offset : units.gu(1)
886+ property int offset: itemCenter + (height/2) + units.gu(1) > parent.height ? -itemCenter - (height/2) - units.gu(1) + parent.height :
887+ itemCenter - (height/2) < units.gu(1) ? (height/2) - itemCenter + units.gu(1) : 0
888+ /*
889+ // Because we're setting left/right anchors depending on orientation, it will break the
890+ // width setting after rotating twice. This makes sure we also re-apply width on rotation
891+ // width: root.inverted ? units.gu(30) : units.gu(30)
892+ height: tooltipLabel.height
893+ visible: tooltipShape.visible
894+ anchors {
895+ left: root.inverted ? undefined : parent.right
896+ right: root.inverted ? parent.left : undefined
897+ margins: units.gu(1)
898+ }
899+ y: itemCenter - (height / 2) + offset
900+ rotation: root.rotation
901+
902+ property string name
903+ property var item
904+
905+ // internal
906+ property int itemCenter: item ? root.mapFromItem(tooltip.item, 0, 0).y + (item.height / 2) + tooltip.item.offset : units.gu(1)
907+ property int offset: itemCenter + (height/2) + units.gu(1) > parent.height ? -itemCenter - (height/2) - units.gu(1) + parent.height :
908+ itemCenter - (height/2) < units.gu(1) ? (height/2) - itemCenter + units.gu(1) : 0*/
909+
910+ function open(index) {
911+ console.log("ciao")
912+ var itemPosition = index * launcherListView.itemHeight;
913+ var height = launcherListView.height - launcherListView.topMargin - launcherListView.bottomMargin
914+ item = launcherListView.itemAt(launcherListView.width / 2, itemPosition + launcherListView.itemHeight / 2);
915+ tooltip.text = launcherListView.model.get(index).name;
916+ tooltip.state = "open";
917+ }
918+
919+ Label {
920+ id: tooltipLabel
921+ //width: parent.width
922+ //anchors.fill: parent
923+ anchors.leftMargin: units.gu(2)
924+ anchors.rightMargin: units.gu(2)
925+ anchors.topMargin: units.gu(2)
926+ anchors.bottomMargin: units.gu(2)
927+ verticalAlignment: Label.AlignVCenter
928+ text: tooltip.text
929+ fontSize: "medium"
930+ font.weight: Font.Medium
931+ color: theme.palette.normal.backgroundText
932+ }
933+ }
831934}