def response_draw(self):
        """Redraw viewer in response to user action."""
        ###
        draw_cached_screen_state()

        ###
        image = self.image
        rect = self.rect

        image_path = self.image_paths[self.thumb_index]
        ###

        image.blit(self.background, (0, 0))

        ###

        LARGE_THUMB.change_image_path(image_path)
        LARGE_THUMB.draw_relative(self)

        ###

        negative_topleft = -Vector2(rect.topleft)

        thumb_index = self.thumb_index
        hovered_index = self.hovered_index

        for (index, thumb_obj) in enumerate(self.thumb_objects):

            thumb_rect = thumb_obj.rect

            if thumb_rect.colliderect(rect):

                offset_rect = thumb_rect.move(negative_topleft)

                image.blit(thumb_obj.image, offset_rect)

                if index == hovered_index:

                    draw_border_on_area(image, (0, 0, 0), offset_rect, 5)

                if index == thumb_index:

                    draw_border_on_area(image, (145, 145, 255), offset_rect, 5)

        ###

        PATH_LABEL.set(image_path)
        PATH_LABEL.draw_relative(self)

        ###

        draw_border(
            image, color=IMAGES_PREVIEWER_BORDER, thickness=PREVIEWER_BORDER_THICKNESS
        )

        super().draw()
Redraw viewer in response to user action.
nodezator/imagesman/previewer/op.py