def mouseReleased(self, event): # Resize/move done self.real_widget.setMovable(self._movable) if self._resize: ResizableBase.mouseReleased(self, event) elif self._movable: mouseX = self.x + event.getX() mouseY = self.y + event.getY() dockArea = self._editor.getToolbarAreaAt(mouseX, mouseY) if dockArea is not None: self._editor.dockWidgetTo(self, dockArea, mouseX, mouseY)
def mouseReleased(self, event): # Resize/move done self.real_widget.setMovable(self._movable) if self._resize: ResizableBase.mouseReleased(self, event) elif self._movable: mouseX = self.x+event.getX() mouseY = self.y+event.getY() dockArea = self._editor.getToolbarAreaAt(mouseX, mouseY) if dockArea is not None: self._editor.dockWidgetTo(self, dockArea, mouseX, mouseY)
def mouseReleased(self, event): didMove = False if (self.x, self.y) != self._panel_startPos: didMove = True # Resize/move done self.real_widget.setMovable(self._movable) if self._resize: ResizableBase.mouseReleased(self, event) elif self._movable and didMove: mouseX = self.x + event.getX() mouseY = self.y + event.getY() dockArea = self._editor.getDockAreaAt(mouseX, mouseY) if dockArea is not None: self._editor.dockWidgetTo(self, dockArea, mouseX, mouseY)
def mouseReleased(self, event): didMove = False if (self.x, self.y) != self._panel_startPos: didMove = True # Resize/move done self.real_widget.setMovable(self._movable) if self._resize: ResizableBase.mouseReleased(self, event) elif self._movable and didMove: mouseX = self.x+event.getX() mouseY = self.y+event.getY() dockArea = self._editor.getDockAreaAt(mouseX, mouseY) if dockArea is not None: self._editor.dockWidgetTo(self, dockArea, mouseX, mouseY)
def mouseReleased(self, event): if self._resize: if self._rLeft or self._rRight: # Resize children for child in self.gui.findChildren(parent=self.gui): child.min_size = (self.width, child.min_size[1]) child.max_size = (self.width, child.max_size[1]) if self._rTop or self._rBottom: # Resize children for child in self.gui.findChildren(parent=self.gui): child.min_size = (child.min_size[0], self.height) child.max_size = (child.max_size[0], self.height) self.gui.max_size = (self.width, self.height) ResizableBase.mouseReleased(self, event) self.min_size = (0,0) # Override changes done in ResizableBase
def mouseReleased(self, event): if self._resize: if self._rLeft or self._rRight: # Resize children for child in self.gui.findChildren(parent=self.gui): child.min_size = (self.width, child.min_size[1]) child.max_size = (self.width, child.max_size[1]) if self._rTop or self._rBottom: # Resize children for child in self.gui.findChildren(parent=self.gui): child.min_size = (child.min_size[0], self.height) child.max_size = (child.max_size[0], self.height) self.gui.max_size = (self.width, self.height) ResizableBase.mouseReleased(self, event) self.min_size = (0,0) # Override changes done in ResizableBase #FIXME: This is a little bit of a hack to fix Ticket #444 self.adaptLayout()