2 * Copyright (C) 2013-2016 Canonical Ltd.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18import QtQml.StateMachine 1.0 as DSM
19import Lomiri.Components 1.3
20import Lomiri.Launcher 0.1
21import Lomiri.Components.Popups 1.3
29 property bool lightMode : false
30 color: lightMode ? "#F2FEFEFE" : "#F2111111"
32 rotation: inverted ? 180 : 0
35 property bool inverted: false
36 property bool privateMode: false
37 property bool moving: launcherListView.moving || launcherListView.flicking
38 property bool preventHiding: moving || dndArea.draggedIndex >= 0 || quickList.state === "open" || dndArea.pressed
39 || dndArea.containsMouse || dashItem.hovered
40 property int highlightIndex: -2
41 property bool shortcutHintsShown: false
42 readonly property bool quickListOpen: quickList.state === "open"
43 readonly property bool dragging: launcherListView.dragging || dndArea.dragging
45 signal applicationSelected(string appId)
47 signal kbdNavigationCancelled()
50 if (quickList.state === "open") {
55 function highlightNext() {
57 if (highlightIndex >= launcherListView.count) {
60 launcherListView.moveToIndex(Math.max(highlightIndex, 0));
62 function highlightPrevious() {
64 if (highlightIndex <= -2) {
65 highlightIndex = launcherListView.count - 1;
67 launcherListView.moveToIndex(Math.max(highlightIndex, 0));
69 function openQuicklist(index) {
70 quickList.open(index);
71 quickList.selectedIndex = 0;
72 quickList.focus = true;
78 acceptedButtons: Qt.AllButtons
79 onWheel: wheel.accepted = true;
90 objectName: "buttonShowDashHome"
94 if (Functions.isValidColor(launcherSettings.homeButtonBackgroundColor)) {
95 return launcherSettings.homeButtonBackgroundColor;
97 if (launcherSettings.homeButtonBackgroundColor != '')
98 console.warn(`Invalid color name '${launcherSettings.homeButtonBackgroundColor}'`);
100 return LomiriColors.orange;
103 readonly property bool highlighted: root.highlightIndex == -1;
107 schema.id: "com.lomiri.Shell.Launcher"
111 objectName: "dashItem"
112 width: parent.width * .75
114 anchors.centerIn: parent
115 source: homeLogoResolver.resolvedImage
116 rotation: root.rotation
121 objectName: "homeLogoResolver"
123 readonly property url defaultLogo: "file://" + Constants.defaultLogo
126 launcherSettings.logoPictureUri,
134 activeFocusOnPress: false
135 onClicked: root.showDashHome()
139 styleName: "FocusShape"
141 anchors.margins: units.gu(.5)
143 visible: bfb.highlighted
150 anchors.left: parent.left
151 anchors.right: parent.right
152 height: parent.height - dashItem.height - parent.spacing*2
155 id: launcherListViewItem
161 objectName: "launcherListView"
164 topMargin: -extensionSize + width * .15
165 bottomMargin: -extensionSize + width * .15
167 topMargin: extensionSize
168 bottomMargin: extensionSize
169 height: parent.height - dashItem.height - parent.spacing*2
171 cacheBuffer: itemHeight * 3
172 snapMode: interactive ? ListView.SnapToItem : ListView.NoSnap
173 highlightRangeMode: ListView.ApplyRange
174 preferredHighlightBegin: (height - itemHeight) / 2
175 preferredHighlightEnd: (height + itemHeight) / 2
177 // for the single peeking icon, when alert-state is set on delegate
178 property int peekingIndex: -1
180 // The size of the area the ListView is extended to make sure items are not
181 // destroyed when dragging them outside the list. This needs to be at least
182 // itemHeight to prevent folded items from disappearing and DragArea limits
183 // need to be smaller than this size to avoid breakage.
184 property int extensionSize: itemHeight * 3
186 // Workaround: The snap settings in the launcher, will always try to
187 // snap to what we told it to do. However, we want the initial position
188 // of the launcher to not be centered, but instead start with the topmost
189 // item unfolded completely. Lets wait for the ListView to settle after
190 // creation and then reposition it to 0.
191 // https://bugreports.qt-project.org/browse/QTBUG-32251
192 Component.onCompleted: {
199 launcherListView.moveToIndex(0)
203 // The height of the area where icons start getting folded
204 property int foldingStartHeight: itemHeight
205 // The height of the area where the items reach the final folding angle
206 property int foldingStopHeight: foldingStartHeight - itemHeight - spacing
207 property int itemWidth: width * .75
208 property int itemHeight: itemWidth * 15 / 16 + units.gu(1)
209 property int clickFlickSpeed: units.gu(60)
210 property int draggedIndex: dndArea.draggedIndex
211 property real realContentY: contentY - originY + topMargin
212 property int realItemHeight: itemHeight + spacing
214 // In case the start dragging transition is running, we need to delay the
215 // move because the displaced transition would clash with it and cause items
216 // to be moved to wrong places
217 property bool draggingTransitionRunning: false
218 property int scheduledMoveTo: -1
220 LomiriNumberAnimation {
221 id: snapToBottomAnimation
222 target: launcherListView
224 to: launcherListView.originY + launcherListView.topMargin
227 LomiriNumberAnimation {
228 id: snapToTopAnimation
229 target: launcherListView
231 to: launcherListView.contentHeight - launcherListView.height + launcherListView.originY - launcherListView.topMargin
234 LomiriNumberAnimation {
236 objectName: "moveAnimation"
237 target: launcherListView
239 function moveTo(contentY) {
240 from = launcherListView.contentY;
245 function moveToIndex(index) {
246 var totalItemHeight = launcherListView.itemHeight + launcherListView.spacing
247 var itemPosition = index * totalItemHeight;
248 var height = launcherListView.height - launcherListView.topMargin - launcherListView.bottomMargin
249 var distanceToEnd = index == 0 || index == launcherListView.count - 1 ? 0 : totalItemHeight
250 if (itemPosition + totalItemHeight + distanceToEnd > launcherListView.contentY + launcherListView.originY + launcherListView.topMargin + height) {
251 moveAnimation.moveTo(itemPosition + launcherListView.itemHeight - launcherListView.topMargin - height + distanceToEnd - launcherListView.originY);
252 } else if (itemPosition - distanceToEnd < launcherListView.contentY - launcherListView.originY + launcherListView.topMargin) {
253 moveAnimation.moveTo(itemPosition - distanceToEnd - launcherListView.topMargin + launcherListView.originY);
257 displaced: Transition {
258 NumberAnimation { properties: "x,y"; duration: LomiriAnimation.FastDuration; easing: LomiriAnimation.StandardEasing }
261 delegate: FoldingLauncherDelegate {
263 objectName: "launcherDelegate" + index
264 // We need the appId in the delegate in order to find
265 // the right app when running autopilot tests for
267 readonly property string appId: model.appId
270 itemHeight: launcherListView.itemHeight
271 itemWidth: launcherListView.itemWidth
276 countVisible: model.countVisible
277 progress: model.progress
278 itemRunning: model.running
279 itemFocused: model.focused
280 inverted: root.inverted
281 alerting: model.alerting
282 highlighted: root.highlightIndex == index
283 shortcutHintShown: root.shortcutHintsShown && index <= 9
284 surfaceCount: model.surfaceCount
287 property bool dragging: false
289 SequentialAnimation {
291 objectName: "peekingAnimation" + index
294 PropertyAction { target: root; property: "visible"; value: (launcher.visibleWidth === 0) ? 1 : 0 }
295 PropertyAction { target: launcherListViewItem; property: "clip"; value: 0 }
297 LomiriNumberAnimation {
298 target: launcherDelegate
302 to: (units.gu(.5) + launcherListView.width * .5) * (root.inverted ? -1 : 1)
303 duration: LomiriAnimation.BriskDuration
307 LomiriNumberAnimation {
308 target: launcherDelegate
313 duration: LomiriAnimation.BriskDuration
316 PropertyAction { target: launcherListViewItem; property: "clip"; value: 1 }
317 PropertyAction { target: root; property: "visible"; value: (launcher.visibleWidth === 0) ? 1 : 0 }
318 PropertyAction { target: launcherListView; property: "peekingIndex"; value: -1 }
323 if (!dragging && (launcherListView.peekingIndex === -1 || launcher.visibleWidth > 0)) {
324 launcherListView.moveToIndex(index)
325 if (!dragging && launcher.state !== "visible" && launcher.state !== "drawer") {
326 peekingAnimation.start()
330 if (launcherListView.peekingIndex === -1) {
331 launcherListView.peekingIndex = index
334 if (launcherListView.peekingIndex === index) {
335 launcherListView.peekingIndex = -1
342 objectName: "dropIndicator"
343 anchors.centerIn: parent
344 height: visible ? units.dp(2) : 0
345 width: parent.width + mainColumn.anchors.leftMargin + mainColumn.anchors.rightMargin
347 source: "graphics/divider-line.png"
353 when: dndArea.selectedItem === launcherDelegate && fakeDragItem.visible && !dragging
355 target: launcherDelegate
363 target: launcherDelegate
368 target: dropIndicator
374 when: dndArea.draggedIndex >= 0 && (dndArea.preDragging || dndArea.dragging || dndArea.postDragging) && dndArea.draggedIndex != index
376 target: launcherDelegate
388 NumberAnimation { properties: "itemOpacity"; duration: LomiriAnimation.FastDuration }
393 NumberAnimation { properties: "itemOpacity"; duration: LomiriAnimation.FastDuration }
394 LomiriNumberAnimation { properties: "angle,offset" }
399 NumberAnimation { properties: "itemOpacity"; duration: LomiriAnimation.BriskDuration }
400 LomiriNumberAnimation { properties: "angle,offset" }
403 id: draggingTransition
406 SequentialAnimation {
407 PropertyAction { target: launcherListView; property: "draggingTransitionRunning"; value: true }
409 LomiriNumberAnimation { properties: "height" }
410 NumberAnimation { target: dropIndicator; properties: "opacity"; duration: LomiriAnimation.FastDuration }
414 if (launcherListView.scheduledMoveTo > -1) {
415 launcherListView.model.move(dndArea.draggedIndex, launcherListView.scheduledMoveTo)
416 dndArea.draggedIndex = launcherListView.scheduledMoveTo
417 launcherListView.scheduledMoveTo = -1
421 PropertyAction { target: launcherListView; property: "draggingTransitionRunning"; value: false }
427 NumberAnimation { target: dropIndicator; properties: "opacity"; duration: LomiriAnimation.SnapDuration }
428 NumberAnimation { properties: "itemOpacity"; duration: LomiriAnimation.BriskDuration }
429 SequentialAnimation {
430 ScriptAction { script: if (index == launcherListView.count-1) launcherListView.flick(0, -launcherListView.clickFlickSpeed); }
431 LomiriNumberAnimation { properties: "height" }
432 ScriptAction { script: if (index == launcherListView.count-1) launcherListView.flick(0, -launcherListView.clickFlickSpeed); }
433 PropertyAction { target: dndArea; property: "postDragging"; value: false }
434 PropertyAction { target: dndArea; property: "draggedIndex"; value: -1 }
442 objectName: "dndArea"
443 acceptedButtons: Qt.LeftButton | Qt.RightButton
447 topMargin: launcherListView.topMargin
448 bottomMargin: launcherListView.bottomMargin
450 drag.minimumY: -launcherListView.topMargin
451 drag.maximumY: height + launcherListView.bottomMargin
453 property int draggedIndex: -1
454 property var selectedItem
455 property bool preDragging: false
456 property bool dragging: !!selectedItem && selectedItem.dragging
457 property bool postDragging: false
461 // This is a workaround for some issue in the QML ListView:
462 // When calling moveToItem(0), the listview visually positions itself
463 // correctly to display the first item expanded. However, some internal
464 // state seems to not be valid, and the next time the user clicks on it,
465 // it snaps back to the snap boundries before executing the onClicked handler.
466 // This can cause the listview getting stuck in a snapped position where you can't
467 // launch things without first dragging the launcher manually. So lets read the item
468 // angle before that happens and use that angle instead of the one we get in onClicked.
469 property real pressedStartAngle: 0
471 var clickedItem = launcherListView.itemAt(mouseX, mouseY + launcherListView.realContentY)
472 pressedStartAngle = clickedItem.angle;
476 function processPress(mouse) {
477 selectedItem = launcherListView.itemAt(mouse.x, mouse.y + launcherListView.realContentY)
481 var index = Math.floor((mouseY + launcherListView.realContentY) / launcherListView.realItemHeight);
482 var clickedItem = launcherListView.itemAt(mouseX, mouseY + launcherListView.realContentY)
484 // Check if we actually clicked an item or only at the spacing in between
485 if (clickedItem === null) {
489 if (mouse.button & Qt.RightButton) { // context menu
491 quickList.open(index);
497 // First/last item do the scrolling at more than 12 degrees
498 if (index == 0 || index == launcherListView.count - 1) {
499 launcherListView.moveToIndex(index);
500 if (pressedStartAngle <= 12 && pressedStartAngle >= -12) {
501 root.applicationSelected(LauncherModel.get(index).appId);
506 // the rest launches apps up to an angle of 30 degrees
507 if (clickedItem.angle > 30 || clickedItem.angle < -30) {
508 launcherListView.moveToIndex(index);
510 root.applicationSelected(LauncherModel.get(index).appId);
522 function endDrag(dragItem) {
523 var droppedIndex = draggedIndex;
534 selectedItem.dragging = false;
535 selectedItem = undefined;
538 dragItem.target = undefined
540 progressiveScrollingTimer.stop();
541 launcherListView.interactive = true;
542 if (droppedIndex >= launcherListView.count - 2 && postDragging) {
543 snapToBottomAnimation.start();
544 } else if (droppedIndex < 2 && postDragging) {
545 snapToTopAnimation.start();
550 processPressAndHold(mouse, drag);
553 function processPressAndHold(mouse, dragItem) {
554 if (Math.abs(selectedItem.angle) > 30) {
560 draggedIndex = Math.floor((mouse.y + launcherListView.realContentY) / launcherListView.realItemHeight);
562 quickList.open(draggedIndex)
564 launcherListView.interactive = false
566 var yOffset = draggedIndex > 0 ? (mouse.y + launcherListView.realContentY) % (draggedIndex * launcherListView.realItemHeight) : mouse.y + launcherListView.realContentY
568 fakeDragItem.iconName = launcherListView.model.get(draggedIndex).icon
569 fakeDragItem.x = units.gu(0.5)
570 fakeDragItem.y = mouse.y - yOffset + launcherListView.anchors.topMargin + launcherListView.topMargin
571 fakeDragItem.angle = selectedItem.angle * (root.inverted ? -1 : 1)
572 fakeDragItem.offset = selectedItem.offset * (root.inverted ? -1 : 1)
573 fakeDragItem.count = LauncherModel.get(draggedIndex).count
574 fakeDragItem.progress = LauncherModel.get(draggedIndex).progress
575 fakeDragItem.flatten()
576 dragItem.target = fakeDragItem
583 processPositionChanged(mouse)
586 function processPositionChanged(mouse) {
587 if (draggedIndex >= 0) {
588 if (selectedItem && !selectedItem.dragging) {
589 var distance = Math.max(Math.abs(mouse.x - startX), Math.abs(mouse.y - startY))
590 if (!preDragging && distance > units.gu(1.5)) {
592 quickList.state = "";
594 if (distance > launcherListView.itemHeight) {
595 selectedItem.dragging = true
601 var itemCenterY = fakeDragItem.y + fakeDragItem.height / 2
603 // Move it down by the the missing size to compensate index calculation with only expanded items
604 itemCenterY += (launcherListView.itemHeight - selectedItem.height) / 2
606 if (mouseY > launcherListView.height - launcherListView.topMargin - launcherListView.bottomMargin - launcherListView.realItemHeight) {
607 progressiveScrollingTimer.downwards = false
608 progressiveScrollingTimer.start()
609 } else if (mouseY < launcherListView.realItemHeight) {
610 progressiveScrollingTimer.downwards = true
611 progressiveScrollingTimer.start()
613 progressiveScrollingTimer.stop()
616 var newIndex = (itemCenterY + launcherListView.realContentY) / launcherListView.realItemHeight
618 if (newIndex > draggedIndex + 1) {
619 newIndex = draggedIndex + 1
620 } else if (newIndex < draggedIndex) {
621 newIndex = draggedIndex -1
626 if (newIndex >= 0 && newIndex < launcherListView.count) {
627 if (launcherListView.draggingTransitionRunning) {
628 launcherListView.scheduledMoveTo = newIndex
630 launcherListView.model.move(draggedIndex, newIndex)
631 draggedIndex = newIndex
638 id: progressiveScrollingTimer
642 property bool downwards: true
645 var minY = -launcherListView.topMargin
646 if (launcherListView.contentY > minY) {
647 launcherListView.contentY = Math.max(launcherListView.contentY - units.dp(2), minY)
650 var maxY = launcherListView.contentHeight - launcherListView.height + launcherListView.topMargin + launcherListView.originY
651 if (launcherListView.contentY < maxY) {
652 launcherListView.contentY = Math.min(launcherListView.contentY + units.dp(2), maxY)
662 objectName: "fakeDragItem"
663 visible: dndArea.draggedIndex >= 0 && !dndArea.postDragging
664 itemWidth: launcherListView.itemWidth
665 itemHeight: launcherListView.itemHeight
668 rotation: root.rotation
670 onVisibleChanged: if (!visible) iconName = "";
673 fakeDragItemAnimation.start();
676 LomiriNumberAnimation {
677 id: fakeDragItemAnimation
678 target: fakeDragItem;
679 properties: "angle,offset";
688 objectName: "quickListShape"
689 anchors.fill: quickList
690 opacity: quickList.state === "open" ? 0.95 : 0
692 rotation: root.rotation
693 aspect: LomiriShape.Flat
695 // Denotes that the shape is not animating, to prevent race conditions during testing
696 readonly property bool ready: (visible && (!quickListShapeOpacityFade.running))
698 Behavior on opacity {
699 LomiriNumberAnimation {
700 id: quickListShapeOpacityFade
704 source: ShaderEffectSource {
705 sourceItem: quickList
712 rightMargin: -units.dp(4)
713 verticalCenter: parent.verticalCenter
714 verticalCenterOffset: -quickList.offset * (root.inverted ? -1 : 1)
718 source: "graphics/quicklist_tooltip.png"
724 anchors.fill: quickListShape
725 enabled: quickList.state == "open" || pressed
726 hoverEnabled: enabled
730 quickList.state = "";
731 quickList.focus = false;
732 root.kbdNavigationCancelled();
735 // Forward for dragging to work when quickList is open
738 var m = mapToItem(dndArea, mouseX, mouseY)
739 dndArea.processPress(m)
743 var m = mapToItem(dndArea, mouseX, mouseY)
744 dndArea.processPressAndHold(m, drag)
748 var m = mapToItem(dndArea, mouseX, mouseY)
749 dndArea.processPositionChanged(m)
753 dndArea.endDrag(drag);
757 dndArea.endDrag(drag);
763 objectName: "quickList"
764 color: theme.palette.normal.background
765 // Because we're setting left/right anchors depending on orientation, it will break the
766 // width setting after rotating twice. This makes sure we also re-apply width on rotation
767 width: root.inverted ? units.gu(30) : units.gu(30)
768 height: quickListColumn.height
769 visible: quickListShape.visible
771 left: root.inverted ? undefined : parent.right
772 right: root.inverted ? parent.left : undefined
775 y: itemCenter - (height / 2) + offset
776 rotation: root.rotation
779 property string appId
781 property int selectedIndex: -1
786 var prevIndex = selectedIndex;
787 selectedIndex = (selectedIndex + 1 < popoverRepeater.count) ? selectedIndex + 1 : 0;
788 while (!popoverRepeater.itemAt(selectedIndex).clickable && selectedIndex != prevIndex) {
789 selectedIndex = (selectedIndex + 1 < popoverRepeater.count) ? selectedIndex + 1 : 0;
791 event.accepted = true;
794 var prevIndex = selectedIndex;
795 selectedIndex = (selectedIndex > 0) ? selectedIndex - 1 : popoverRepeater.count - 1;
796 while (!popoverRepeater.itemAt(selectedIndex).clickable && selectedIndex != prevIndex) {
797 selectedIndex = (selectedIndex > 0) ? selectedIndex - 1 : popoverRepeater.count - 1;
799 event.accepted = true;
803 quickList.selectedIndex = -1;
804 quickList.focus = false;
806 event.accepted = true;
811 if (quickList.selectedIndex >= 0) {
812 LauncherModel.quickListActionInvoked(quickList.appId, quickList.selectedIndex)
814 quickList.selectedIndex = -1;
815 quickList.focus = false;
817 root.kbdNavigationCancelled();
818 event.accepted = true;
824 property int itemCenter: item ? root.mapFromItem(quickList.item, 0, 0).y + (item.height / 2) + quickList.item.offset : units.gu(1)
825 property int offset: itemCenter + (height/2) + units.gu(1) > parent.height ? -itemCenter - (height/2) - units.gu(1) + parent.height :
826 itemCenter - (height/2) < units.gu(1) ? (height/2) - itemCenter + units.gu(1) : 0
828 function open(index) {
829 var itemPosition = index * launcherListView.itemHeight;
830 var height = launcherListView.height - launcherListView.topMargin - launcherListView.bottomMargin
831 item = launcherListView.itemAt(launcherListView.width / 2, itemPosition + launcherListView.itemHeight / 2);
832 quickList.model = launcherListView.model.get(index).quickList;
833 quickList.appId = launcherListView.model.get(index).appId;
834 quickList.state = "open";
835 root.highlightIndex = index;
836 quickList.forceActiveFocus();
841 height: quickListColumn.height
847 var item = quickListColumn.childAt(mouseX, mouseY);
848 if (item.clickable) {
849 quickList.selectedIndex = item.index;
851 quickList.selectedIndex = -1;
859 height: childrenRect.height
863 objectName: "popoverRepeater"
864 model: QuickListProxyModel {
865 source: quickList.model ? quickList.model : null
866 privateMode: root.privateMode
870 readonly property bool clickable: model.clickable
871 readonly property int index: model.index
873 objectName: "quickListEntry" + index
874 selected: index === quickList.selectedIndex
875 height: label.implicitHeight + label.anchors.topMargin + label.anchors.bottomMargin
876 color: model.clickable ? (selected ? theme.palette.highlighted.background : "transparent") : theme.palette.disabled.background
877 highlightColor: !model.clickable ? quickList.color : undefined // make disabled items visually unclickable
878 divider.colorFrom: LomiriColors.inkstone
879 divider.colorTo: LomiriColors.inkstone
880 divider.visible: model.hasSeparator
885 anchors.leftMargin: units.gu(3) // 2 GU for checkmark, 3 GU total
886 anchors.rightMargin: units.gu(2)
887 anchors.topMargin: units.gu(2)
888 anchors.bottomMargin: units.gu(2)
889 verticalAlignment: Label.AlignVCenter
891 fontSize: index == 0 ? "medium" : "small"
892 font.weight: index == 0 ? Font.Medium : Font.Light
893 color: model.clickable ? theme.palette.normal.backgroundText : theme.palette.disabled.backgroundText
894 elide: Text.ElideRight
898 if (!model.clickable) {
902 quickList.state = "";
903 // Unsetting model to prevent showing changing entries during fading out
904 // that may happen because of triggering an action.
905 LauncherModel.quickListActionInvoked(quickList.appId, index);
906 quickList.focus = false;
907 root.kbdNavigationCancelled();
908 quickList.model = undefined;
918 objectName: "tooltipShape"
920 visible: tooltipShownState.active
921 rotation: root.rotation
922 y: itemCenter - (height / 2)
925 left: root.inverted ? undefined : parent.right
926 right: root.inverted ? parent.left : undefined
930 readonly property var hoveredItem: dndArea.containsMouse ? launcherListView.itemAt(dndArea.mouseX, dndArea.mouseY + launcherListView.realContentY) : null
931 readonly property int itemCenter: !hoveredItem ? 0 : root.mapFromItem(hoveredItem, 0, 0).y + (hoveredItem.height / 2) + hoveredItem.offset
933 text: !hoveredItem ? "" : hoveredItem.name
937 id: tooltipStateMachine
938 initialState: tooltipHiddenState
942 id: tooltipHiddenState
944 DSM.SignalTransition {
945 targetState: tooltipShownState
946 signal: tooltipShape.hoveredItemChanged
947 // !dndArea.pressed allows us to filter out touch input events
948 guard: tooltipShape.hoveredItem !== null && !dndArea.pressed && !root.moving
953 id: tooltipShownState
955 DSM.SignalTransition {
956 targetState: tooltipHiddenState
957 signal: tooltipShape.hoveredItemChanged
958 guard: tooltipShape.hoveredItem === null
961 DSM.SignalTransition {
962 targetState: tooltipDismissedState
963 signal: dndArea.onPressed
966 DSM.SignalTransition {
967 targetState: tooltipDismissedState
968 signal: quickList.stateChanged
969 guard: quickList.state === "open"
974 id: tooltipDismissedState
976 DSM.SignalTransition {
977 targetState: tooltipHiddenState
978 signal: dndArea.positionChanged
979 guard: quickList.state != "open" && !dndArea.pressed && !dndArea.moving
982 DSM.SignalTransition {
983 targetState: tooltipHiddenState
984 signal: dndArea.exited
985 guard: quickList.state != "open"