def pick_color_at_pointer(self, widget, size=3): """Set the brush colour from the current pointer position on screen. This is a wrapper for `gui.colors.get_color_at_pointer()`, and additionally sets the current brush colour. """ color = colors.get_color_at_pointer(widget.get_display(), size) self.brush_color_manager.set_color(color)
def delayed_color_pick(): del self.delayed_color_pick_id color = colors.get_color_at_pointer(widget.get_display(), size) self.brush_color_manager.set_color(color)