~lukas-kde/unity8/dashboard

« back to all changes in this revision

Viewing changes to qml/Launcher/Launcher.qml

  • Committer: Lukáš Tinkl
  • Date: 2017-01-26 12:13:17 UTC
  • mfrom: (2749.1.49 unity8)
  • Revision ID: lukas.tinkl@canonical.com-20170126121317-qms39s9pikclidbe
merge trunk, fix conflicts

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
        } else {
75
75
            superPressTimer.stop();
76
76
            superLongPressTimer.stop();
77
 
            launcher.switchToNextState("");
 
77
            switchToNextState("");
78
78
            panel.shortcutHintsShown = false;
79
79
        }
80
80
    }
87
87
            superPressTimer.stop();
88
88
            superLongPressTimer.stop();
89
89
        } else {
 
90
            switchToNextState("");
 
91
            root.focus = false;
90
92
            if (panel.highlightIndex == -1) {
91
 
                showDashHome();
 
93
                root.showDashHome();
92
94
            } else if (panel.highlightIndex >= 0){
93
95
                launcherApplicationSelected(LauncherModel.get(panel.highlightIndex).appId);
94
96
            }
95
97
            panel.highlightIndex = -2;
96
 
            switchToNextState("");
97
 
            root.focus = false;
98
98
        }
99
99
    }
100
100
 
108
108
        }
109
109
    }
110
110
 
 
111
    onPanelWidthChanged: {
 
112
        hint();
 
113
    }
 
114
 
111
115
    function hide(flags) {
112
116
        if ((flags & ignoreHideIfMouseOverLauncher) && Utils.Functions.itemUnderMouse(panel)) {
113
117
            return;
206
210
        case Qt.Key_Return:
207
211
        case Qt.Key_Space:
208
212
            if (panel.highlightIndex == -1) {
209
 
                showDashHome();
 
213
                root.showDashHome();
210
214
            } else if (panel.highlightIndex >= 0) {
211
215
                launcherApplicationSelected(LauncherModel.get(panel.highlightIndex).appId);
212
216
            }
469
473
        }
470
474
        onPassed: {
471
475
            if (root.drawerEnabled) {
472
 
                root.switchToNextState("drawer");
 
476
                root.openDrawer()
473
477
            }
474
478
        }
475
479
 
545
549
            if (!dragging) {
546
550
                if (distance > panel.width / 2) {
547
551
                    if (root.drawerEnabled && distance > panel.width * 3 && dragDirection() !== "left") {
548
 
                        root.switchToNextState("drawer");
549
 
                        root.focus = true;
 
552
                        root.openDrawer(false)
550
553
                    } else {
551
554
                        root.switchToNextState("visible");
552
555
                    }