pygui: further refactoring around retrieving icon images
This commit is contained in:
parent
a6fadb76cc
commit
93813358b5
9 changed files with 67 additions and 81 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue