def set_rect(self, rect: Rect) -> None: """Set the slider's rectangle and update the useful area.""" Component.set_rect(self, rect) self._fill_rect = rect.inflate(-2 * self._style.border_width, -2 * self._style.border_width) if (self._show_handle): self._handle_radius = self._fill_rect.height // 2 self._fill_rect.inflate_ip(-2 * self._handle_radius, -self._handle_radius)
def set_rect(self, child_rect: Rect): """Set the component's rectangle.""" Component.set_rect(self, child_rect) self._layout_children()
def set_rect(self, rect: Rect): """Set the animated image's rectangle and generate the animation's frames. """ Component.set_rect(self, rect) self._generate_animation_frames()