@@ -835,11 +835,12 @@ Rectangle {
835 UbuntuShape {
835 UbuntuShape {
836 id: tooltipShape
836 id: tooltipShape
837 objectName: "tooltipShape"
837 objectName: "tooltipShape"
838− anchors.fill: tooltip
838+
839− opacity: tooltipShownState.active ? 0.95 : 0
840− visible: opacity > 0
841 rotation: root.rotation
839 rotation: root.rotation
842 aspect: UbuntuShape.Flat
840 aspect: UbuntuShape.Flat
841+ color: theme.palette.normal.background
842+ opacity: tooltipShownState.active ? 0.95 : 0
843+ visible: opacity > 0
844 Behavior on opacity {
845 Behavior on opacity {
845 UbuntuNumberAnimation {
846 UbuntuNumberAnimation {
@@ -847,9 +848,14 @@ Rectangle {
850− source: ShaderEffectSource {
851+ width: tooltipLabel.implicitWidth + units.gu(4)
851− sourceItem: tooltip
852+ height: tooltipLabel.implicitHeight + units.gu(2)
852− hideSource: true
853+ y: itemCenter - (height / 2)
856+ left: root.inverted ? undefined : parent.right
857+ right: root.inverted ? parent.left : undefined
858+ margins: units.gu(1)
@@ -857,56 +863,32 @@ Rectangle {
857 right: parent.left
863 right: parent.left
858 rightMargin: -units.dp(4)
864 rightMargin: -units.dp(4)
859 verticalCenter: parent.verticalCenter
865 verticalCenter: parent.verticalCenter
860− verticalCenterOffset: -tooltip.offset * (root.inverted ? -1 : 1)
862 height: units.gu(1)
867 height: units.gu(1)
863 width: units.gu(2)
868 width: units.gu(2)
864 source: "graphics/quicklist_tooltip.png"
869 source: "graphics/quicklist_tooltip.png"
865 rotation: 90
870 rotation: 90
871− objectName: "tooltip"
875+ anchors.centerIn: parent
876+ verticalAlignment: Label.AlignVCenter
873− color: theme.palette.normal.background
877+ color: theme.palette.normal.backgroundText
874− visible: tooltipShape.visible
876− width: tooltipLabel.contentWidth + units.gu(4)
877− height: tooltipLabel.contentHeight + units.gu(2)
879− y: itemCenter - (height / 2) + offset
880− rotation: root.rotation
883− left: root.inverted ? undefined : parent.right
884− right: root.inverted ? parent.left : undefined
885− margins: units.gu(1)
878+ anchors.margins: units.gu(10)
888 property var hoveredItem: dndArea.containsMouse ? launcherListView.itemAt(dndArea.mouseX, dndArea.mouseY + launcherListView.realContentY) : null
881 property var hoveredItem: dndArea.containsMouse ? launcherListView.itemAt(dndArea.mouseX, dndArea.mouseY + launcherListView.realContentY) : null
890 property int itemCenter
882 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
894 // This avoids artifacts on fade-out animation
884 // This avoids artifacts on fade-out animation
895 onHoveredItemChanged : {
885 onHoveredItemChanged : {
896 if (hoveredItem != null && !root.moving) {
886 if (hoveredItem != null && !root.moving) {
897 itemCenter = root.mapFromItem(hoveredItem, 0, 0).y + (hoveredItem.height / 2) + hoveredItem.offset
887 itemCenter = root.mapFromItem(hoveredItem, 0, 0).y + (hoveredItem.height / 2) + hoveredItem.offset
898− tooltipLabel.text = tooltip.hoveredItem.name
888+ tooltipLabel.text = tooltipShape.hoveredItem.name
904− height: parent.height
905− anchors.centerIn: parent
906− verticalAlignment: Label.AlignVCenter
907− color: theme.palette.normal.backgroundText
910 DSM.StateMachine {
892 DSM.StateMachine {
911 id: tooltipStateMachine
893 id: tooltipStateMachine
912 initialState: tooltipHiddenState
894 initialState: tooltipHiddenState
@@ -917,9 +899,9 @@ Rectangle {
918 DSM.SignalTransition {
900 DSM.SignalTransition {
919 targetState: tooltipShownState
901 targetState: tooltipShownState
920− signal: tooltip.hoveredItemChanged
902+ signal: tooltipShape.hoveredItemChanged
921 // !dndArea.pressed allows us to filter out touch input events
903 // !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
@@ -928,8 +910,8 @@ Rectangle {
929 DSM.SignalTransition {
911 DSM.SignalTransition {
930 targetState: tooltipHiddenState
912 targetState: tooltipHiddenState
931− signal: tooltip.hoveredItemChanged
913+ signal: tooltipShape.hoveredItemChanged
932− guard: tooltip.hoveredItem == null
914+ guard: tooltipShape.hoveredItem == null
935 DSM.SignalTransition {
917 DSM.SignalTransition {