Skip to content

Commit

Permalink
Merge pull request #50 from shaunhwq/dev_shaun_shift_prefix_search
Browse files Browse the repository at this point in the history
Replace idx button with search button
  • Loading branch information
shaunhwq authored Oct 31, 2023
2 parents e367152 + 5bee11d commit 9045eee
Show file tree
Hide file tree
Showing 6 changed files with 183 additions and 166 deletions.
Binary file added visual_comparison/assets/icons/filter_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added visual_comparison/assets/icons/search_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 11 additions & 8 deletions visual_comparison/managers/icon_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,17 @@
class IconManager:
def __init__(self, icon_assets_path):
self.icon_assets_path = icon_assets_path
assert os.path.isdir(self.icon_assets_path), "Unable to find icon assets"

self.copy_icon = self.load_ctk_image(os.path.join(icon_assets_path, "copy_icon.png"))
self.export_icon = self.load_ctk_image(os.path.join(icon_assets_path, "export_icon.png"))
self.folder_icon = self.load_ctk_image(os.path.join(icon_assets_path, "folder_icon.png"))
self.restore_icon = self.load_ctk_image(os.path.join(icon_assets_path, "restore_icon.png"))
self.settings_icon = self.load_ctk_image(os.path.join(icon_assets_path, "settings_icon.png"))
self.copy_icon = self.load_ctk_image("copy_icon.png")
self.export_icon = self.load_ctk_image("export_icon.png")
self.folder_icon = self.load_ctk_image("folder_icon.png")
self.restore_icon = self.load_ctk_image("restore_icon.png")
self.settings_icon = self.load_ctk_image("settings_icon.png")
self.filter_icon = self.load_ctk_image("filter_icon.png")
self.search_icon = self.load_ctk_image("search_icon.png")

def load_ctk_image(self, image_name: str) -> customtkinter.CTkImage:
image_path = os.path.join(self.icon_assets_path, image_name)
assert os.path.isfile(image_path), "Unable to find icon assets"

@staticmethod
def load_ctk_image(image_path: str) -> customtkinter.CTkImage:
return customtkinter.CTkImage(PIL.Image.open(image_path))
Loading

0 comments on commit 9045eee

Please sign in to comment.