@@ -35,24 +35,17 @@ class Launcher(emulators.UnityEmulatorBase):
35 def show(self):
35 def show(self):
36 """Show the launcher swiping it to the right."""
36 """Show the launcher swiping it to the right."""
37 if not self.shown:
37 if not self.shown:
38− self._swipe_launcher('right')
38+ self._swipe_to_show_launcher()
39 self.shown.wait_for(True)
39 self.shown.wait_for(True)
41 logger.debug('The launcher is already opened.')
41 logger.debug('The launcher is already opened.')
43− def _swipe_launcher(self, direction):
43+ def _swipe_to_show_launcher(self):
44 view = self.get_root_instance().select_single('QQuickView')
44 view = self.get_root_instance().select_single('QQuickView')
45 start_y = stop_y = view.y + view.height // 2
45 start_y = stop_y = view.y + view.height // 2
47− left = view.x + 1
47+ start_x = view.x + 1
48− right = left + self.panelWidth - 1
48+ stop_x = start_x + self.panelWidth - 1
50− if direction == 'right':
53− elif direction == 'left':
57 self.pointing_device.drag(start_x, start_y, stop_x, stop_y)
50 self.pointing_device.drag(start_x, start_y, stop_x, stop_y)