# Path: omnitool/shared.py



import os
from pathlib import Path
from pgu.gui import Desktop, basic, container, surface, Theme, Button
from pgu.gui.const import *
from pygame.locals import *
from .shared import datadir
                del (os.environ["SDL_VIDEO_WINDOW_POS"])
            except KeyError:
                pass
            self.on_resize(self, ev)
            self.repaint()
    #override
    def run(self, widget=None, screen=None, delay=10):
        """Run an application.

        Automatically calls App.init and then forever loops while
        calling App.event and App.update

        Keyword arguments:
            widget -- the top-level widget to use
            screen -- the pygame surface to render to
            delay -- the delay between updates (in milliseconds)
        """
        self.init(widget, screen)
        while not self._quit:
            todo = self.queue[:]
            [self.queue.remove(t) for t in todo]
            for row in todo:
                row[0](*row[1:])
            self.loop()
            pygame.time.wait(delay)

def change_image(self, value):
    self.value = value
    self.style.width, self.style.height = value.get_width(), value.get_height()


# Path: omnitool/shared.py



# Path: omnitool/pgu_override.py
import os
from pathlib import Path
from pgu.gui import Desktop, basic, container, surface, Theme, Button
from pgu.gui.const import *
from pygame.locals import *
from .shared import datadir

                del (os.environ["SDL_VIDEO_WINDOW_POS"])
            except KeyError:
                pass
            self.on_resize(self, ev)
            self.repaint()
    #override
    def run(self, widget=None, screen=None, delay=10):
        """Run an application.

        Automatically calls App.init and then forever loops while
        calling App.event and App.update

        Keyword arguments:
            widget -- the top-level widget to use
            screen -- the pygame surface to render to
            delay -- the delay between updates (in milliseconds)
        """
        self.init(widget, screen)
        while not self._quit:
            todo = self.queue[:]
            [self.queue.remove(t) for t in todo]
            for row in todo:
                row[0](*row[1:])
            self.loop()
            pygame.time.wait(delay)

def change_image(self, value):
    self.value = value
    self.style.width, self.style.height = value.get_width(), value.get_height()


theme_path = datadir / 'themes'