Merge pull request 'removed all Img path dependencies' (#26) from zeroIMGs into main
Reviewed-on: Fabelous/mpenn#26
This commit is contained in:
commit
a706e6d103
|
@ -2,6 +2,7 @@ import customtkinter as Ctk
|
|||
import os
|
||||
from PIL import Image, ImageTk, ImageDraw
|
||||
from scripts.SaveData import SaveData
|
||||
from icons.icons import Icons
|
||||
import scripts.get_sys_info as system_code
|
||||
|
||||
|
||||
|
@ -9,6 +10,7 @@ import scripts.get_sys_info as system_code
|
|||
class Labeling(Ctk.CTkFrame):
|
||||
def __init__(self,master,img_paths, output_path, callback, window_information, **kwargs):
|
||||
super().__init__(master, **kwargs)
|
||||
self.icons = Icons()
|
||||
system_code.load_json_file()
|
||||
self.data_saver = SaveData()
|
||||
self.my_font = Ctk.CTkFont(family="Berlin Sans FB", size=22)
|
||||
|
@ -16,14 +18,11 @@ class Labeling(Ctk.CTkFrame):
|
|||
#callback
|
||||
self.callback = callback
|
||||
self.window_information = window_information
|
||||
# Image resources
|
||||
self.create_folder_image_path = r"./icons/create_folder.png"
|
||||
self.open_folder_image_path = r"./icons/open_folder.png"
|
||||
self.source_folder_image_path = r"./icons/source_folder.png"
|
||||
|
||||
# Load and resize image as before
|
||||
self.create_folder_raw_image = Image.open(self.create_folder_image_path)
|
||||
self.open_folder_raw_image = Image.open(self.open_folder_image_path)
|
||||
self.source_folder_raw_image = Image.open(self.source_folder_image_path)
|
||||
self.create_folder_raw_image = self.icons.get_image("CreateFolder")
|
||||
self.open_folder_raw_image = self.icons.get_image("OpenFolder")
|
||||
self.source_folder_raw_image = self.icons.get_image("SourceFolder")
|
||||
self.load_button_images()
|
||||
# for the image show_process
|
||||
self.image_scale_init()
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import customtkinter as Ctk
|
||||
import os
|
||||
from PIL import Image
|
||||
from icons.icons import Icons
|
||||
from ..SaveData import SaveData
|
||||
import scripts.get_sys_info as system_code
|
||||
|
||||
|
@ -10,10 +10,12 @@ FONT = "Berlin Sans FB"
|
|||
class OpenFolder(Ctk.CTkScrollableFrame):
|
||||
def __init__(self,master,output_path, callback, **kwargs, ):
|
||||
super().__init__(master, **kwargs)
|
||||
self.icons = Icons()
|
||||
self.my_font = Ctk.CTkFont(family=FONT, size=16)
|
||||
self.warning_font = Ctk.CTkFont(family=FONT, size=20)
|
||||
# the variables needed to get from the upper class
|
||||
self.button_image = Ctk.CTkImage(Image.open(r"./icons/folder.png"), size=(63, 63))
|
||||
|
||||
self.button_image = Ctk.CTkImage(self.icons.get_image("Folder"), size=(63, 63))
|
||||
self.output_path = output_path
|
||||
self.callback = callback # Store the callback function
|
||||
system_code.load_json_file()
|
||||
|
|
Loading…
Reference in New Issue