~unity-team/unity8/trunk

« back to all changes in this revision

Viewing changes to qml/Launcher/LauncherPanel.qml

  • Committer: CI Train Bot
  • Author(s): Lukáš Tinkl
  • Date: 2016-01-11 17:38:13 UTC
  • mfrom: (2103.2.7 fixLauncherDismiss)
  • Revision ID: ci-train-bot@canonical.com-20160111173813-5oshvy9x49axuwfr
Fix dismissing the launcher when clicking/tapping outside Fixes: #1530940, #1531339
Approved by: Michael Terry

Show diffs side-by-side

added added

removed removed

Lines of Context:
392
392
                        }
393
393
 
394
394
                        onClicked: {
395
 
                            Haptics.play();
396
395
                            var index = Math.floor((mouseY + launcherListView.realContentY) / launcherListView.realItemHeight);
397
396
                            var clickedItem = launcherListView.itemAt(mouseX, mouseY + launcherListView.realContentY)
398
397
 
407
406
                                quickList.model = launcherListView.model.get(index).quickList;
408
407
                                quickList.appId = launcherListView.model.get(index).appId;
409
408
                                quickList.state = "open";
410
 
                                return
 
409
                                return;
411
410
                            }
412
411
 
 
412
                            Haptics.play();
 
413
 
413
414
                            // First/last item do the scrolling at more than 12 degrees
414
415
                            if (index == 0 || index == launcherListView.count - 1) {
415
416
                                if (clickedItem.angle > 12) {
636
637
            rotation: 90
637
638
        }
638
639
    }
 
640
 
639
641
    InverseMouseArea {
640
642
        anchors.fill: quickListShape
641
643
        enabled: quickList.state == "open" || pressed