@@ -835,11 +835,12 @@ Rectangle {
835835 UbuntuShape {
836836 id: tooltipShape
837837 objectName: "tooltipShape"
838− anchors.fill: tooltip
839− opacity: tooltipShownState.active ? 0.95 : 0
840− visible: opacity > 0
838+
841839 rotation: root.rotation
842840 aspect: UbuntuShape.Flat
841+ color: theme.palette.normal.background
842+ opacity: tooltipShownState.active ? 0.95 : 0
843+ visible: opacity > 0
843844
844845 Behavior on opacity {
845846 UbuntuNumberAnimation {
@@ -847,9 +848,14 @@ Rectangle {
847848 }
848849 }
849850
850− source: ShaderEffectSource {
851− sourceItem: tooltip
852− hideSource: true
851+ width: tooltipLabel.implicitWidth + units.gu(4)
852+ height: tooltipLabel.implicitHeight + units.gu(2)
853+ y: itemCenter - (height / 2)
854+
855+ anchors {
856+ left: root.inverted ? undefined : parent.right
857+ right: root.inverted ? parent.left : undefined
858+ margins: units.gu(1)
853859 }
854860
855861 Image {
@@ -857,56 +863,32 @@ Rectangle {
857863 right: parent.left
858864 rightMargin: -units.dp(4)
859865 verticalCenter: parent.verticalCenter
860− verticalCenterOffset: -tooltip.offset * (root.inverted ? -1 : 1)
861866 }
862867 height: units.gu(1)
863868 width: units.gu(2)
864869 source: "graphics/quicklist_tooltip.png"
865870 rotation: 90
866871 }
867− }
868−
869− Rectangle {
870− id: tooltip
871− objectName: "tooltip"
872872
873− color: theme.palette.normal.background
874− visible: tooltipShape.visible
875−
876− width: tooltipLabel.contentWidth + units.gu(4)
877− height: tooltipLabel.contentHeight + units.gu(2)
878−
879− y: itemCenter - (height / 2) + offset
880− rotation: root.rotation
881−
882− anchors {
883− left: root.inverted ? undefined : parent.right
884− right: root.inverted ? parent.left : undefined
885− margins: units.gu(1)
873+ Label {
874+ id: tooltipLabel
875+ anchors.centerIn: parent
876+ verticalAlignment: Label.AlignVCenter
877+ color: theme.palette.normal.backgroundText
878+ anchors.margins: units.gu(10)
886879 }
887880
888881 property var hoveredItem: dndArea.containsMouse ? launcherListView.itemAt(dndArea.mouseX, dndArea.mouseY + launcherListView.realContentY) : null
889−
890882 property int itemCenter
891− property int offset: itemCenter + (height/2) + units.gu(1) > parent.height ? -itemCenter - (height/2) - units.gu(1) + parent.height :
892− itemCenter - (height/2) < units.gu(1) ? (height/2) - itemCenter + units.gu(1) : 0
893883
894884 // This avoids artifacts on fade-out animation
895885 onHoveredItemChanged : {
896886 if (hoveredItem != null && !root.moving) {
897887 itemCenter = root.mapFromItem(hoveredItem, 0, 0).y + (hoveredItem.height / 2) + hoveredItem.offset
898− tooltipLabel.text = tooltip.hoveredItem.name
888+ tooltipLabel.text = tooltipShape.hoveredItem.name
899889 }
900890 }
901891
902− Label {
903− id: tooltipLabel
904− height: parent.height
905− anchors.centerIn: parent
906− verticalAlignment: Label.AlignVCenter
907− color: theme.palette.normal.backgroundText
908− }
909−
910892 DSM.StateMachine {
911893 id: tooltipStateMachine
912894 initialState: tooltipHiddenState
@@ -917,9 +899,9 @@ Rectangle {
917899
918900 DSM.SignalTransition {
919901 targetState: tooltipShownState
920− signal: tooltip.hoveredItemChanged
902+ signal: tooltipShape.hoveredItemChanged
921903 // !dndArea.pressed allows us to filter out touch input events
922− guard: tooltip.hoveredItem != null && !dndArea.pressed && !root.moving
904+ guard: tooltipShape.hoveredItem != null && !dndArea.pressed && !root.moving
923905 }
924906 }
925907
@@ -928,8 +910,8 @@ Rectangle {
928910
929911 DSM.SignalTransition {
930912 targetState: tooltipHiddenState
931− signal: tooltip.hoveredItemChanged
932− guard: tooltip.hoveredItem == null
913+ signal: tooltipShape.hoveredItemChanged
914+ guard: tooltipShape.hoveredItem == null
933915 }
934916
935917 DSM.SignalTransition {