Esempio n. 1
0
 def on_mouse_motion(self):
     mouse_pos = fsui.get_mouse_position()
     window_pos = (
         self.window_pos[0] + mouse_pos[0] - self.mouse_pos[0],
         self.window_pos[1] + mouse_pos[1] - self.mouse_pos[1],
     )
     self.parent().set_position(window_pos)
Esempio n. 2
0
 def on_mouse_motion(self):
     if self.start_position is not None:
         position = get_mouse_position()
         dx = position[0] - self.start_position[0]
         dy = position[1] - self.start_position[1]
         w = max(self.minimum_window_size[0], self.start_size[0] + dx)
         h = max(self.minimum_window_size[1], self.start_size[1] + dy)
         get_window(self).set_size((w, h))
Esempio n. 3
0
 def on_mouse_motion(self):
     if self.pressed:
         mouse_pos = fsui.get_mouse_position()
         window_pos = (self.window_pos[0] + mouse_pos[0] -
                       self.mouse_pos[0], self.window_pos[1] +
                       mouse_pos[1] - self.mouse_pos[1])
         window = self.parent().parent()
         window.set_position(window_pos)
Esempio n. 4
0
 def on_mouse_motion(self):
     if self.pressed:
         mouse_pos = fsui.get_mouse_position()
         window_pos = (
             self.window_pos[0] + mouse_pos[0] - self.mouse_pos[0],
             self.window_pos[1] + mouse_pos[1] - self.mouse_pos[1])
         window = self.parent().parent()
         window.set_position(window_pos)
Esempio n. 5
0
 def on_left_down(self):
     window = get_window(self)
     self.start_position = get_mouse_position()
     if hasattr(window, "layout"):
         self.minimum_window_size = window.layout.get_min_size()
     else:
         print("Fake minimum size")
         self.minimum_window_size = (200, 200)
     self.start_size = window.size()
Esempio n. 6
0
 def on_left_down(self):
     self.window_pos = self.parent().get_position()
     self.mouse_pos = fsui.get_mouse_position()
Esempio n. 7
0
 def on_left_down(self):
     self.pressed = True
     window = self.parent().parent()
     self.window_pos = window.position()
     self.mouse_pos = fsui.get_mouse_position()
Esempio n. 8
0
 def on_left_down(self):
     self.pressed = True
     window = self.parent().parent()
     self.window_pos = window.position()
     self.mouse_pos = fsui.get_mouse_position()