on xenial help sign in
Fix up Drawer based on code review
6b1cf97Dalton Durst
qml/Launcher/Drawer.qml+5−6
@@ -39,11 +39,11 @@ FocusScope {
39
39
40 // Request that the Drawer is opened fully, if it was partially closed then
40 // Request that the Drawer is opened fully, if it was partially closed then
41 // brought back
41 // brought back
42− signal open();
42+ signal openRequested()
43
43
44 // Request that the Drawer (and maybe its parent) is hidden, normally if
44 // Request that the Drawer (and maybe its parent) is hidden, normally if
45 // the Drawer has been dragged away.
45 // the Drawer has been dragged away.
46− signal hide();
46+ signal hideRequested()
47
47
48 property bool allowSlidingAnimation: false
48 property bool allowSlidingAnimation: false
49 property bool draggingHorizontally: false
49 property bool draggingHorizontally: false
@@ -59,7 +59,6 @@ FocusScope {
59 // See onDraggingHorizontallyChanged below
59 // See onDraggingHorizontallyChanged below
60 searchField.focus = hadFocus;
60 searchField.focus = hadFocus;
61 searchField.select(oldSelectionStart, oldSelectionEnd);
61 searchField.select(oldSelectionStart, oldSelectionEnd);
62− return;
63 } else if (fullyClosed || fullyOpen) {
62 } else if (fullyClosed || fullyOpen) {
64 searchField.text = "";
63 searchField.text = "";
65 resetOldFocus();
64 resetOldFocus();
@@ -86,15 +85,15 @@ FocusScope {
86 searchField.focus = false;
85 searchField.focus = false;
87 } else {
86 } else {
88 if (x < -units.gu(10)) {
87 if (x < -units.gu(10)) {
89− hide();
88+ hideRequested();
90 } else {
89 } else {
91− requestOpen();
90+ openRequested();
92 }
91 }
93 }
92 }
94 }
93 }
95
94
96 Keys.onEscapePressed: {
95 Keys.onEscapePressed: {
97− root.hide()
96+ root.hideRequested()
98 }
97 }
99
98
100 onDragDistanceChanged: {
99 onDragDistanceChanged: {
qml/Launcher/Launcher.qml+2−2
@@ -363,11 +363,11 @@ FocusScope {
363 root.focus = false;
363 root.focus = false;
364 }
364 }
365
365
366− onHide: {
366+ onHideRequested: {
367 root.hide();
367 root.hide();
368 }
368 }
369
369
370− onOpen: {
370+ onOpenRequested: {
371 root.toggleDrawer(false, true);
371 root.toggleDrawer(false, true);
372 }
372 }
373 }
373 }