pygui: further refactoring around retrieving icon images

This commit is contained in:
Blake Harnden 2021-02-18 23:07:55 -08:00
parent a6fadb76cc
commit 93813358b5
9 changed files with 67 additions and 81 deletions

View file

@ -196,10 +196,10 @@ class Application(ttk.Frame):
self.menubar.set_state(is_runtime=False)
self.toolbar.set_design()
def get_icon(self, image_enum: ImageEnum, width: int) -> PhotoImage:
def get_icon(self, image_enum: ImageEnum, *, width: int) -> PhotoImage:
return images.from_enum(image_enum, width=width, scale=self.app_scale)
def get_custom_icon(self, image_file: str, width: int) -> PhotoImage:
def get_custom_icon(self, image_file: str, *, width: int) -> PhotoImage:
return images.from_name(image_file, width=width, scale=self.app_scale)
def close(self) -> None: