added better Linux Support. With Font Manager

This commit is contained in:
Falko Victor Habel 2024-05-10 22:07:54 +02:00
parent 4042497ae4
commit 4254925594
18 changed files with 437 additions and 68 deletions

BIN
MPENNconfigs/icon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

16
MPENNconfigs/program.json Normal file
View File

@ -0,0 +1,16 @@
{
"window_width": 800,
"window_height": 1000,
"window_state": "zoomed",
"btn_img_size": [
75,
75
],
"skipable_frames": 30,
"img_format": ".jpg",
"used_threads": 4,
"thread_detection_method": "manual",
"data_mode": "Resize",
"color": "#5f00c7",
"thickness": 4
}

359
MPENNconfigs/theme.json Normal file
View File

@ -0,0 +1,359 @@
{
"CTk": {
"fg_color": [
"#ebebeb",
"#1d1d1d"
]
},
"CTkToplevel": {
"fg_color": [
"gray92",
"#1d1d1d"
]
},
"CTkFrame": {
"corner_radius": 6,
"border_width": 0,
"fg_color": [
"gray86",
"#292929"
],
"top_fg_color": [
"gray81",
"gray20"
],
"border_color": [
"gray65",
"gray28"
]
},
"CTkButton": {
"corner_radius": 6,
"border_width": 0,
"fg_color": [
"#5f00c7",
"#5f00c7"
],
"hover_color": [
"#7d03ff",
"#7d03ff"
],
"border_color": [
"#3E454A",
"#949A9F"
],
"text_color": [
"#f7f7f7",
"#f7f7f7"
],
"text_color_disabled": [
"gray74",
"gray60"
]
},
"CTkLabel": {
"corner_radius": 0,
"fg_color": "transparent",
"text_color": [
"#313131",
"#f7f7f7"
]
},
"CTkEntry": {
"corner_radius": 6,
"border_width": 2,
"fg_color": [
"#cfcfcf",
"#323232"
],
"border_color": [
"#cfcfcf",
"#323232"
],
"text_color": [
"#2a2a2a",
"#f7f7f7"
],
"placeholder_text_color": [
"gray52",
"gray62"
]
},
"CTkCheckBox": {
"corner_radius": 6,
"border_width": 3,
"fg_color": [
"#5f00c7",
"#5f00c7"
],
"border_color": [
"#313131",
"#949A9F"
],
"hover_color": [
"#7d03ff",
"#7d03ff"
],
"checkmark_color": [
"#DCE4EE",
"gray90"
],
"text_color": [
"gray10",
"#DCE4EE"
],
"text_color_disabled": [
"gray60",
"gray45"
]
},
"CTkSwitch": {
"corner_radius": 1000,
"border_width": 3,
"button_length": 0,
"fg_color": [
"#939BA2",
"#4A4D50"
],
"progress_color": [
"#ab5cff",
"#35006f"
],
"button_color": [
"#5f00c7",
"#5f00c7"
],
"button_hover_color": [
"#7d03ff",
"#7d03ff"
],
"text_color": [
"gray10",
"#DCE4EE"
],
"text_color_disabled": [
"gray60",
"gray45"
]
},
"CTkRadioButton": {
"corner_radius": 1000,
"border_width_checked": 6,
"border_width_unchecked": 3,
"fg_color": [
"#5f00c7",
"#5f00c7"
],
"border_color": [
"#313131",
"#3f3f3f"
],
"hover_color": [
"#7d03ff",
"#7d03ff"
],
"text_color": [
"gray10",
"#DCE4EE"
],
"text_color_disabled": [
"gray60",
"gray45"
]
},
"CTkProgressBar": {
"corner_radius": 1000,
"border_width": 0,
"fg_color": [
"#ab5cff",
"#35006f"
],
"progress_color": [
"#5f00c7",
"#5f00c7"
],
"border_color": [
"gray",
"gray"
]
},
"CTkSlider": {
"corner_radius": 1000,
"button_corner_radius": 1000,
"border_width": 6,
"button_length": 0,
"fg_color": [
"#ab5cff",
"#35006f"
],
"progress_color": [
"#5f00c7",
"#5f00c7"
],
"button_color": [
"#5f00c7",
"#5f00c7"
],
"button_hover_color": [
"#7d03ff",
"#7d03ff"
]
},
"CTkOptionMenu": {
"corner_radius": 6,
"fg_color": [
"#ab5cff",
"#35006f"
],
"button_color": [
"#5f00c7",
"#5f00c7"
],
"button_hover_color": [
"#7d03ff",
"#7d03ff"
],
"text_color": [
"#DCE4EE",
"#DCE4EE"
],
"text_color_disabled": [
"gray74",
"gray60"
]
},
"CTkComboBox": {
"corner_radius": 6,
"border_width": 2,
"fg_color": [
"#ab5cff",
"#35006f"
],
"border_color": [
"#5f00c7",
"#5f00c7"
],
"button_color": [
"#5f00c7",
"#5f00c7"
],
"button_hover_color": [
"#7d03ff",
"#7d03ff"
],
"text_color": [
"#f7f7f7",
"#DCE4EE"
],
"text_color_disabled": [
"gray50",
"gray45"
]
},
"CTkScrollbar": {
"corner_radius": 1000,
"border_spacing": 4,
"fg_color": "transparent",
"button_color": [
"#cecece",
"#636363"
],
"button_hover_color": [
"gray40",
"gray53"
]
},
"CTkSegmentedButton": {
"corner_radius": 6,
"border_width": 2,
"fg_color": [
"#ab5cff",
"#35006f"
],
"selected_color": [
"#5f00c7",
"#5f00c7"
],
"selected_hover_color": [
"#7d03ff",
"#7d03ff"
],
"unselected_color": [
"#ab5cff",
"#35006f"
],
"unselected_hover_color": [
"#7d03ff",
"#7d03ff"
],
"text_color": [
"#DCE4EE",
"#DCE4EE"
],
"text_color_disabled": [
"gray74",
"gray60"
]
},
"CTkTextbox": {
"corner_radius": 6,
"border_width": 0,
"fg_color": [
"#dbdbdb",
"#2a2a2a"
],
"border_color": [
"#979DA2",
"#565B5E"
],
"text_color": [
"gray10",
"#DCE4EE"
],
"scrollbar_button_color": [
"gray55",
"gray41"
],
"scrollbar_button_hover_color": [
"gray40",
"gray53"
]
},
"CTkScrollableFrame": {
"label_fg_color": [
"gray78",
"gray23"
]
},
"DropdownMenu": {
"fg_color": [
"gray90",
"gray20"
],
"hover_color": [
"gray75",
"gray28"
],
"text_color": [
"gray10",
"gray90"
]
},
"CTksystem_code.FONT": {
"macOS": {
"family": "SF Display",
"size": 13,
"weight": "normal"
},
"Windows": {
"family": "Roboto",
"size": 13,
"weight": "normal"
},
"Linux": {
"family": "Roboto",
"size": 13,
"weight": "normal"
}
}
}

View File

@ -2,6 +2,11 @@
MPENN is a simple software solution designed to transform the way we process and edit large volumes of images, particularly in applications involving neural networks. This versatile tool combines video-to-picture conversion capabilities with an advanced image editor, enabling users to manage and manipulate images efficiently at scale. Whether you are working on machine learning datasets, enhancing digital media assets, or require a robust tool for bulk image editing, MPENN is the ideal solution for your needs.
## --Support--
Currently only working on Windows!
Linux Support is WIP!
## Features
MPENN provides a comprehensive set of features designed to streamline the process of converting, editing, and managing large sets of images. Here's what you can expect:

View File

@ -339,7 +339,7 @@
"gray90"
]
},
"CTkFont": {
"CTksystem_code.FONT": {
"macOS": {
"family": "SF Display",
"size": 13,

BIN
data/mpenn_font.TTF Normal file

Binary file not shown.

File diff suppressed because one or more lines are too long

16
main.py
View File

@ -13,17 +13,15 @@ from scripts.folder_mangement.OpenFolder import OpenFolder
from scripts.folder_mangement.CreateFolder import CreateFolder
from scripts.folder_mangement.SwitchFolder import SwitchFolder
SELECTION_TEXT = "Select your Directory and your Export Directory"
class App(Ctk.CTk):
def __init__(self):
super().__init__()
system_code.load_json_file()
Ctk.FontManager.load_font("/mpenn_font.TTF")
self.icons = Icons(path=system_code.data_path)
system_code.set_theme()
self.my_font = Ctk.CTkFont(family="Berlin Sans FB", size=22)
self.font_entry = Ctk.CTkFont(family="Berlin Sans FB", size=18)
self.minsize(1000, 750)
self.geometry(f"{system_code.window_width}x{system_code.window_height}")
if platform.system() == "Windows":
@ -47,10 +45,10 @@ class App(Ctk.CTk):
self.window_informaton_save = ()
# Top Menu
# Widgets
self.settings_btn = Ctk.CTkButton(self, text="Settings", width=100, command=self.open_settings, font=self.my_font)
image = Ctk.CTkImage(self.back_btn_image, size=(50, 50))
self.back_btn = Ctk.CTkButton(self, text="", image=image,width=50, command=self.go_back, font=self.my_font)
self.window_information = Ctk.CTkLabel(self, text="Choose if you want to convert or label DATA", width=100, font=self.my_font)
self.settings_btn = Ctk.CTkButton(self, text="Settings", width=100, command=self.open_settings, font=(system_code.MPENN_FONT, 22))
image = Ctk.CTkImage(self.back_btn_image, size=(40, 40))
self.back_btn = Ctk.CTkButton(self, text="", font=(system_code.MPENN_FONT, 22), image=image,width=50, command=self.go_back)
self.window_information = Ctk.CTkLabel(self, text="Choose if you want to convert or label DATA", width=100, font=(system_code.MPENN_FONT, 26))
# Alignment
self.place_top_menu()
@ -63,8 +61,8 @@ class App(Ctk.CTk):
self.buttons_frame = Ctk.CTkFrame(self)
self.active_frame = self.buttons_frame
# Main Menu
self.convert_btn = Ctk.CTkButton(self.buttons_frame, text="Convert Videos\ninto IMG-Sequences", command=self.open_converter, width=64, font=self.my_font)
self.label_btn = Ctk.CTkButton(self.buttons_frame, text="Label and\n manage Images", command=self.open_current_labeling_ui, width=64,font=self.my_font)
self.convert_btn = Ctk.CTkButton(self.buttons_frame, text="Convert Videos\ninto IMG-Sequences", command=self.open_converter, width=64, font=(system_code.MPENN_FONT, 22))
self.label_btn = Ctk.CTkButton(self.buttons_frame, text="Label and\n manage Images", command=self.open_current_labeling_ui, width=64,font=(system_code.MPENN_FONT, 22))
# Main Menu
self.active_frame.place(
relx=0.5, rely=0.52,relwidth=0.95, relheight=0.85, anchor="center"

View File

@ -9,7 +9,6 @@ class ClosePopup(Ctk.CTkToplevel):
super().__init__(master, **kwargs)
system_code.load_json_file()
self.icons = Icons(path=system_code.data_path)
self.my_font = Ctk.CTkFont(family="Berlin Sans FB", size=22)
self.geometry("400x300")
self.resizable(False, False)
if platform.system() == "Windows":
@ -17,11 +16,11 @@ class ClosePopup(Ctk.CTkToplevel):
self.iconbitmap(icon_path)
self.after(201, lambda: self.iconbitmap(icon_path))
self.callback = callback
self.label = Ctk.CTkLabel(self, text="Do you want to leave?\n You might lose some Data", font=self.my_font)
self.label = Ctk.CTkLabel(self, text="Do you want to leave?\n You might lose some Data", font=(system_code.MPENN_FONT, 22))
# Add exit button
self.exit_button = Ctk.CTkButton(self, text="Exit",fg_color="#bd202d",hover_color="#f24150", command=self.confirm_exit, font=self.my_font)
self.exit_button = Ctk.CTkButton(self, text="Exit",fg_color="#bd202d",hover_color="#f24150", command=self.confirm_exit, font=(system_code.MPENN_FONT, 22))
# Add leave button
self.leave_button = Ctk.CTkButton(self, text="Stay", command=self.destroy, font=self.my_font)
self.leave_button = Ctk.CTkButton(self, text="Stay", command=self.destroy, font=(system_code.MPENN_FONT, 22))
self.grab_set()
#aligning
self.align()

View File

@ -72,8 +72,6 @@ class Converter(Ctk.CTkFrame):
#system_code.load_json_file()
self.thread_count = system_code.used_threads
self.continue_offset = 0
self.my_font = Ctk.CTkFont(family="Berlin Sans FB", size=22)
self.font_entry = Ctk.CTkFont(family="Berlin Sans FB", size=18)
stop_btn_txt = ("Stop Convert", "Continue")
self.test_var = 0
self.input_path = None
@ -83,19 +81,19 @@ class Converter(Ctk.CTkFrame):
self.step_size = None
# the layout
# input layout
self.input_entry = Ctk.CTkEntry(self, placeholder_text="input path", width=350, font=self.my_font)
self.input_btn = Ctk.CTkButton(self, text="Browse Input", width=100, command=self.get_video_path, font=self.my_font)
self.input_entry = Ctk.CTkEntry(self, placeholder_text="input path", width=350, font=(system_code.MPENN_FONT, 22))
self.input_btn = Ctk.CTkButton(self, text="Browse Input", width=100, command=self.get_video_path, font=(system_code.MPENN_FONT, 22))
# output layout
self.output_entry = Ctk.CTkEntry(self, placeholder_text="output path", width=350, font=self.my_font)
self.output_btn = Ctk.CTkButton(self, text="Browse Output", width=100, command=self.get_folder_path, font=self.my_font)
self.output_entry = Ctk.CTkEntry(self, placeholder_text="output path", width=350, font=(system_code.MPENN_FONT, 22))
self.output_btn = Ctk.CTkButton(self, text="Browse Output", width=100, command=self.get_folder_path, font=(system_code.MPENN_FONT, 22))
# button row + img name selection
self.img_naming = Ctk.CTkEntry(self, placeholder_text="Img_seq", width=150, font=self.my_font)
self.img_naming = Ctk.CTkEntry(self, placeholder_text="Img_seq", width=150, font=(system_code.MPENN_FONT, 22))
# start Button
self.start_btn = Ctk.CTkButton(self, text="Start Convert", width=100, command=self.start_threads, font=self.my_font)
self.start_btn = Ctk.CTkButton(self, text="Start Convert", width=100, command=self.start_threads, font=(system_code.MPENN_FONT, 22))
# stop Button
self.stop_btn = Ctk.CTkButton(self, text=stop_btn_txt[0], width=50, command=self.stop_continue_threads, font=self.my_font)
self.stop_btn = Ctk.CTkButton(self, text=stop_btn_txt[0], width=50, command=self.stop_continue_threads, font=(system_code.MPENN_FONT, 22))
self.stop_btn.configure(text='Stop', state=Ctk.DISABLED)
self.show_progress()
self.progress_bar.set(0)
@ -153,7 +151,7 @@ class Converter(Ctk.CTkFrame):
# progressbar
self.progress_bar = Ctk.CTkProgressBar(self,orientation="horizontal", width=500, height=30)
# progressinfo
self.progress_info = Ctk.CTkLabel(self, text="", width=1, font=self.my_font)
self.progress_info = Ctk.CTkLabel(self, text="", width=1, font=(system_code.MPENN_FONT, 22))
# button row
self.progress_bar.place(
relx=0.5,

View File

@ -13,7 +13,6 @@ class Labeling(Ctk.CTkFrame):
system_code.load_json_file()
self.icons = Icons(path=system_code.data_path)
self.data_saver = SaveData()
self.my_font = Ctk.CTkFont(family="Berlin Sans FB", size=22)
self.image_btn_size = system_code.btn_img_size
#callback
self.callback = callback
@ -133,18 +132,18 @@ class Labeling(Ctk.CTkFrame):
def create_labeling(self):
"""adapt button size to window_size"""
self.big_canvas = Ctk.CTkCanvas(self,background="#5f00c7", bd=0, highlightthickness=0)
self.reset_btn = Ctk.CTkButton(self, text="reset Image", width=100, command=self.reset_image, font=self.my_font)
self.create_folder_btn = Ctk.CTkButton(self,image=self.create_folder_image, text="", width=100, command=self.create_new_folder, font=self.my_font)
self.open_folder_btn = Ctk.CTkButton(self, image=self.open_folder_image,text="", width=100, command=self.open_new_folder, font=self.my_font)
self.save_img_btn = Ctk.CTkButton(self, text="Save Image", width=100, command=self.save_and_load, font=self.my_font)
self.delete_img_btn = Ctk.CTkButton(self, text="Delete Image", width=100, command=self.delete_img, font=self.my_font)
self.skip_time_btn = Ctk.CTkButton(self, text="Jump", width=100, command=self.skip_time, font=self.my_font)
self.new_source_btn = Ctk.CTkButton(self,image=self.source_folder_image, text="", width=100, command=self.source_folder_dialog, font=self.my_font)
self.reset_btn = Ctk.CTkButton(self, text="reset Image", width=100, command=self.reset_image, font=(system_code.MPENN_FONT, 22))
self.create_folder_btn = Ctk.CTkButton(self,image=self.create_folder_image, text="", width=100, command=self.create_new_folder, font=(system_code.MPENN_FONT, 22))
self.open_folder_btn = Ctk.CTkButton(self, image=self.open_folder_image,text="", width=100, command=self.open_new_folder, font=(system_code.MPENN_FONT, 22))
self.save_img_btn = Ctk.CTkButton(self, text="Save Image", width=100, command=self.save_and_load, font=(system_code.MPENN_FONT, 22))
self.delete_img_btn = Ctk.CTkButton(self, text="Delete Image", width=100, command=self.delete_img, font=(system_code.MPENN_FONT, 22))
self.skip_time_btn = Ctk.CTkButton(self, text="Jump", width=100, command=self.skip_time, font=(system_code.MPENN_FONT, 22))
self.new_source_btn = Ctk.CTkButton(self,image=self.source_folder_image, text="", width=100, command=self.source_folder_dialog, font=(system_code.MPENN_FONT, 22))
self.preview_canvas = Ctk.CTkCanvas(self,background="#5f00c7", bd=0, highlightthickness=0)
self.start_mode = Ctk.StringVar(value=system_code.data_mode)
self.choose_mode = Ctk.CTkSegmentedButton(self, values= system_code.data_modes,
variable=self.start_mode,
command=self.set_data_mode,width=64,font=self.my_font)
command=self.set_data_mode,width=64,font=(system_code.MPENN_FONT, 22))
# big_canvas
self.big_canvas.bind("<ButtonPress-1>", self.on_press)

View File

@ -3,14 +3,13 @@ import os
import scripts.get_sys_info as system_code
from ..SaveData import SaveData
FONT = "Berlin Sans FB"
FONT = system_code.MPENN_FONT
class CreateFolder(Ctk.CTkFrame):
def __init__(self,master, output_path,callback, **kwargs):
super().__init__(master, **kwargs)
system_code.load_json_file()
self.data_saver = SaveData()
self.my_font = Ctk.CTkFont(family=FONT, size=22)
self.output_path = output_path
self.callback = callback
self.error_txt = ""
@ -29,10 +28,10 @@ class CreateFolder(Ctk.CTkFrame):
self.create_new_data_folder()
def create_folder(self):
self.create_folder_label = Ctk.CTkLabel(self, text="Type name for new Object:", width=100, font=self.my_font)
self.create_folder_entry = Ctk.CTkEntry(self, placeholder_text="New Data Object", width=100, font=self.my_font)
self.create_folder_name_btn = Ctk.CTkButton(self, text="Create", width=100, command=self.create_new_data_folder, font=self.my_font)
self.create_folder_error = Ctk.CTkLabel(self, text=self.error_txt, width=100, font=self.my_font)
self.create_folder_label = Ctk.CTkLabel(self, text="Type name for new Object:", width=100, font=(system_code.MPENN_FONT, 22))
self.create_folder_entry = Ctk.CTkEntry(self, placeholder_text="New Data Object", width=100, font=(system_code.MPENN_FONT, 22))
self.create_folder_name_btn = Ctk.CTkButton(self, text="Create", width=100, command=self.create_new_data_folder, font=(system_code.MPENN_FONT, 22))
self.create_folder_error = Ctk.CTkLabel(self, text=self.error_txt, width=100, font=(system_code.MPENN_FONT, 22))
self.place_create_folder()
def create_new_data_folder(self):

View File

@ -5,13 +5,10 @@ from ..SaveData import SaveData
import scripts.get_sys_info as system_code
FONT = "Berlin Sans FB"
class OpenFolder(Ctk.CTkScrollableFrame):
def __init__(self,master,output_path, callback, **kwargs, ):
super().__init__(master, **kwargs)
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
system_code.load_json_file()
self.icons = Icons(path=system_code.data_path)
@ -91,7 +88,7 @@ class OpenFolder(Ctk.CTkScrollableFrame):
image=self.button_image, # Corrected: Use self.button_image for the image parameter
compound="top", # Position text below the image
command=lambda val=value: self.new_folder_chosen(val),
font=self.my_font
font=(system_code.MPENN_FONT, 22)
)
folder_btn.grid_remove()
self.buttons.append(folder_btn)

View File

@ -5,14 +5,13 @@ from ..SaveData import SaveData
from tkinter import filedialog
FONT = "Berlin Sans FB"
class SwitchFolder(Ctk.CTkFrame):
def __init__(self,master, callback, **kwargs):
super().__init__(master, **kwargs)
system_code.load_json_file()
self.data_saver = SaveData()
self.my_font = Ctk.CTkFont(family=FONT, size=22)
self.callback = callback
self.error_txt = ""
self.input_path = None
@ -31,14 +30,14 @@ class SwitchFolder(Ctk.CTkFrame):
# the selection part
def create_selection(self):
# input
self.input_entry = Ctk.CTkEntry(self, placeholder_text="Input folder path", width=100, font=self.my_font)
self.input_btn = Ctk.CTkButton(self, text="Browse", width=100, command=self.get_folder_path, font=self.my_font)
self.input_entry = Ctk.CTkEntry(self, placeholder_text="Input folder path", width=100, font=(system_code.MPENN_FONT, 22))
self.input_btn = Ctk.CTkButton(self, text="Browse", width=100, command=self.get_folder_path, font=(system_code.MPENN_FONT, 22))
# output
self.output_entry = Ctk.CTkEntry(self, placeholder_text="Output folder path", width=100, font=self.my_font)
self.output_btn = Ctk.CTkButton(self, text="Browse", width=100, command=self.get_project_path, font=self.my_font)
self.output_entry = Ctk.CTkEntry(self, placeholder_text="Output folder path", width=100, font=(system_code.MPENN_FONT, 22))
self.output_btn = Ctk.CTkButton(self, text="Browse", width=100, command=self.get_project_path, font=(system_code.MPENN_FONT, 22))
# start
self.start_btn = Ctk.CTkButton(self, text="Start", width=100, command=self.open_labeling, font=self.my_font)
self.error_label = Ctk.CTkLabel(self, text=self.error_txt, width=100, font=self.my_font)
self.start_btn = Ctk.CTkButton(self, text="Start", width=100, command=self.open_labeling, font=(system_code.MPENN_FONT, 22))
self.error_label = Ctk.CTkLabel(self, text=self.error_txt, width=100, font=(system_code.MPENN_FONT, 22))
self.place_label_selection()
def open_labeling(self, value = None):

View File

@ -153,7 +153,7 @@ def set_theme():
customtkinter.set_appearance_mode("System") # Modes: system (default), light, dark
customtkinter.set_default_color_theme(theme.get_theme())
MPENN_FONT = "Berlin Sans FB"
data_path = create_folder("MPENNconfigs")
json_file_path = data_path + "/program.json"

View File

@ -6,41 +6,40 @@ class Settings(Ctk.CTkFrame):
def __init__(self,master, **kwargs):
super().__init__(master, **kwargs)
system_code.load_json_file()
self.my_font = Ctk.CTkFont(family="Berlin Sans FB", size=22)
self.color_information = Ctk.CTkLabel(self, text="Bounding Box Color: ", width=100, font=self.my_font)
self.color_btn = Ctk.CTkButton(self, text="Set Color",fg_color=system_code.color, width=100, command=self.ask_color, font=self.my_font)
self.color_information = Ctk.CTkLabel(self, text="Bounding Box Color: ", width=100, font=(system_code.MPENN_FONT, 22))
self.color_btn = Ctk.CTkButton(self, text="Set Color",fg_color=system_code.color, width=100, command=self.ask_color, font=(system_code.MPENN_FONT, 22))
# set the time for skiping frames
self.thickness_label = Ctk.CTkLabel(self, text="Bounding Box Thickness:", width=100, font=self.my_font)
self.thickness_label = Ctk.CTkLabel(self, text="Bounding Box Thickness:", width=100, font=(system_code.MPENN_FONT, 22))
self.thickness_slider = Ctk.CTkSlider(self, from_=1, to=100, command=self.change_thickness)
self.thickness_slider_value = Ctk.CTkLabel(self, text=system_code.thickness, width=100, font=self.my_font)
self.thickness_slider_value = Ctk.CTkLabel(self, text=system_code.thickness, width=100, font=(system_code.MPENN_FONT, 22))
self.thickness_slider.set(system_code.thickness)
# set the time for skiping frames
self.skip_label = Ctk.CTkLabel(self, text="Skipable Frames:", width=100, font=self.my_font)
self.skip_label = Ctk.CTkLabel(self, text="Skipable Frames:", width=100, font=(system_code.MPENN_FONT, 22))
self.skip_slider = Ctk.CTkSlider(self, from_=2, to=100, command=self.change_skipped_frame)
self.skip_slider_value = Ctk.CTkLabel(self, text=system_code.skipable_frames, width=100, font=self.my_font)
self.skip_slider_value = Ctk.CTkLabel(self, text=system_code.skipable_frames, width=100, font=(system_code.MPENN_FONT, 22))
self.skip_slider.set(system_code.skipable_frames)
# set the outputs
self.label_output_formats = Ctk.CTkLabel(self, text="Output formats:", width=256, font=self.my_font)
self.label_output_formats = Ctk.CTkLabel(self, text="Output formats:", width=256, font=(system_code.MPENN_FONT, 22))
self.change_output_format = Ctk.StringVar(value=system_code.img_format)
self.output_formats = Ctk.CTkSegmentedButton(self, values= system_code.img_format_options,
command=self.set_img_format,
variable=self.change_output_format,width=64,font=self.my_font)
variable=self.change_output_format,width=64,font=(system_code.MPENN_FONT, 22))
# set the threads
self.label_threads = Ctk.CTkLabel(self, text="Threads: ", width=196, font=self.my_font)
self.label_threads = Ctk.CTkLabel(self, text="Threads: ", width=196, font=(system_code.MPENN_FONT, 22))
self.thread_switcher = Ctk.StringVar(value=system_code.thread_detection_mode)
self.thread_switch = Ctk.CTkSegmentedButton(self, values=system_code.thread_switcher,
command=self.change_thread_type,
variable=self.thread_switcher,
width=64,font=self.my_font)
width=64,font=(system_code.MPENN_FONT, 22))
self.used_threads = Ctk.StringVar(value=system_code.used_threads)
self.thread_count_switch = Ctk.CTkSegmentedButton(self, values=system_code.thread_options,
command=self.change_manual_threads,
width=256,font=self.my_font)
width=256,font=(system_code.MPENN_FONT, 22))
if system_code.thread_detection_mode == "manual":
self.show_thread_selection()
@ -69,7 +68,7 @@ class Settings(Ctk.CTkFrame):
self.thickness_slider_value.configure(text=value)
def ask_color(self):
self.pick_color = AskColor(master=self.master, font=self.my_font)
self.pick_color = AskColor(master=self.master, font=(system_code.MPENN_FONT, 22))
self.wait_window(self.pick_color)
self.color = self.pick_color.get() # get the color string

View File

@ -345,7 +345,7 @@ class Theme:
"gray90"
]
},
"CTkFont": {
"CTksystem_code.FONT": {
"macOS": {
"family": "SF Display",
"size": 13,

1
tempCodeRunnerFile.py Normal file
View File

@ -0,0 +1 @@
BackButton