Vertical switches

pull/592/head
KRSHH 2024-09-16 18:48:05 +05:30 committed by GitHub
parent 1725ba95e9
commit 2d99e392ff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 11 additions and 15 deletions

View File

@ -281,17 +281,14 @@ def create_root(
options_frame = ctk.CTkFrame(main_frame, fg_color="#2a2d2e", corner_radius=15) options_frame = ctk.CTkFrame(main_frame, fg_color="#2a2d2e", corner_radius=15)
options_frame.grid(row=1, column=0, columnspan=3, padx=10, pady=10, sticky="nsew") options_frame.grid(row=1, column=0, columnspan=3, padx=10, pady=10, sticky="nsew")
# Create two columns for options, centered # Create a single column for options, centered
options_column_left = ctk.CTkFrame(options_frame, fg_color="#2a2d2e") options_column = ctk.CTkFrame(options_frame, fg_color="#2a2d2e")
options_column_left.pack(side="left", expand=True) options_column.pack(expand=True)
options_column_right = ctk.CTkFrame(options_frame, fg_color="#2a2d2e") # Switches
options_column_right.pack(side="right", expand=True)
# Left column switches
keep_fps_value = ctk.BooleanVar(value=modules.globals.keep_fps) keep_fps_value = ctk.BooleanVar(value=modules.globals.keep_fps)
keep_fps_checkbox = ctk.CTkSwitch( keep_fps_checkbox = ctk.CTkSwitch(
options_column_left, options_column,
text="Keep fps", text="Keep fps",
variable=keep_fps_value, variable=keep_fps_value,
cursor="hand2", cursor="hand2",
@ -305,7 +302,7 @@ def create_root(
keep_frames_value = ctk.BooleanVar(value=modules.globals.keep_frames) keep_frames_value = ctk.BooleanVar(value=modules.globals.keep_frames)
keep_frames_switch = ctk.CTkSwitch( keep_frames_switch = ctk.CTkSwitch(
options_column_left, options_column,
text="Keep frames", text="Keep frames",
variable=keep_frames_value, variable=keep_frames_value,
cursor="hand2", cursor="hand2",
@ -319,7 +316,7 @@ def create_root(
enhancer_value = ctk.BooleanVar(value=modules.globals.fp_ui["face_enhancer"]) enhancer_value = ctk.BooleanVar(value=modules.globals.fp_ui["face_enhancer"])
enhancer_switch = ctk.CTkSwitch( enhancer_switch = ctk.CTkSwitch(
options_column_left, options_column,
text="Face Enhancer", text="Face Enhancer",
variable=enhancer_value, variable=enhancer_value,
cursor="hand2", cursor="hand2",
@ -331,7 +328,7 @@ def create_root(
keep_audio_value = ctk.BooleanVar(value=modules.globals.keep_audio) keep_audio_value = ctk.BooleanVar(value=modules.globals.keep_audio)
keep_audio_switch = ctk.CTkSwitch( keep_audio_switch = ctk.CTkSwitch(
options_column_left, options_column,
text="Keep audio", text="Keep audio",
variable=keep_audio_value, variable=keep_audio_value,
cursor="hand2", cursor="hand2",
@ -341,10 +338,9 @@ def create_root(
) )
keep_audio_switch.pack(pady=5) keep_audio_switch.pack(pady=5)
# Right column switches
many_faces_value = ctk.BooleanVar(value=modules.globals.many_faces) many_faces_value = ctk.BooleanVar(value=modules.globals.many_faces)
many_faces_switch = ctk.CTkSwitch( many_faces_switch = ctk.CTkSwitch(
options_column_right, options_column,
text="Many faces", text="Many faces",
variable=many_faces_value, variable=many_faces_value,
cursor="hand2", cursor="hand2",
@ -356,7 +352,7 @@ def create_root(
color_correction_value = ctk.BooleanVar(value=modules.globals.color_correction) color_correction_value = ctk.BooleanVar(value=modules.globals.color_correction)
color_correction_switch = ctk.CTkSwitch( color_correction_switch = ctk.CTkSwitch(
options_column_right, options_column,
text="Fix Blueish Cam", text="Fix Blueish Cam",
variable=color_correction_value, variable=color_correction_value,
cursor="hand2", cursor="hand2",
@ -370,7 +366,7 @@ def create_root(
map_faces = ctk.BooleanVar(value=modules.globals.map_faces) map_faces = ctk.BooleanVar(value=modules.globals.map_faces)
map_faces_switch = ctk.CTkSwitch( map_faces_switch = ctk.CTkSwitch(
options_column_right, options_column,
text="Map faces", text="Map faces",
variable=map_faces, variable=map_faces,
cursor="hand2", cursor="hand2",