|
|
|
|
@ -61,11 +61,11 @@ def create_root(start: Callable[[], None], destroy: Callable[[], None]) -> ctk.C
|
|
|
|
|
target_label = ctk.CTkLabel(root, text=None)
|
|
|
|
|
target_label.place(relx=0.6, rely=0.1, relwidth=0.3, relheight=0.25)
|
|
|
|
|
|
|
|
|
|
source_button = ctk.CTkButton(root, text='Select a face', cursor='hand2', command=lambda: select_source_path())
|
|
|
|
|
source_button.place(relx=0.1, rely=0.4, relwidth=0.3, relheight=0.1)
|
|
|
|
|
select_face_button = ctk.CTkButton(root, text='Select a face', cursor='hand2', command=lambda: select_source_path())
|
|
|
|
|
select_face_button.place(relx=0.1, rely=0.4, relwidth=0.3, relheight=0.1)
|
|
|
|
|
|
|
|
|
|
target_button = ctk.CTkButton(root, text='Select a target', cursor='hand2', command=lambda: select_target_path())
|
|
|
|
|
target_button.place(relx=0.6, rely=0.4, relwidth=0.3, relheight=0.1)
|
|
|
|
|
select_target_button = ctk.CTkButton(root, text='Select a target', cursor='hand2', command=lambda: select_target_path())
|
|
|
|
|
select_target_button.place(relx=0.6, rely=0.4, relwidth=0.3, relheight=0.1)
|
|
|
|
|
|
|
|
|
|
keep_fps_value = ctk.BooleanVar(value=modules.globals.keep_fps)
|
|
|
|
|
keep_fps_checkbox = ctk.CTkSwitch(root, text='Keep fps', variable=keep_fps_value, cursor='hand2', command=lambda: setattr(modules.globals, 'keep_fps', not modules.globals.keep_fps))
|
|
|
|
|
@ -292,5 +292,8 @@ def webcam_preview():
|
|
|
|
|
preview_label.configure(image=image)
|
|
|
|
|
ROOT.update()
|
|
|
|
|
|
|
|
|
|
if PREVIEW.state() == 'withdrawn':
|
|
|
|
|
break
|
|
|
|
|
|
|
|
|
|
cap.release()
|
|
|
|
|
PREVIEW.withdraw() # Close preview window when loop is finished
|