diff --git a/requirements.txt b/requirements.txt index 9cdc9080..d20e1d85 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -customtkinter==4.5.10 +customtkinter==5.1.3 Deprecated==1.2.13 flake8==6.0.0 matplotlib==3.6.2 diff --git a/src/OSBC.py b/src/OSBC.py index 2e04e833..b650a6d7 100644 --- a/src/OSBC.py +++ b/src/OSBC.py @@ -69,7 +69,7 @@ def build_ui(self): # sourcery skip: merge-list-append, move-assign-in-block self.frame_left.grid_rowconfigure(19, minsize=20) # empty row with minsize as spacing (adds a top padding to settings btn) self.frame_left.grid_rowconfigure(21, minsize=10) # empty row with minsize as spacing (bottom padding below settings btn) - self.label_1 = customtkinter.CTkLabel(master=self.frame_left, text="Scripts", text_font=("Roboto Medium", 14)) + self.label_1 = customtkinter.CTkLabel(master=self.frame_left, text="Scripts") self.label_1.grid(row=1, column=0, pady=10, padx=10) # ============ View/Controller Configuration ============ @@ -279,7 +279,7 @@ def __toggle_bot_by_key(self, bot_key, btn: customtkinter.CTkButton): pady=0, ) self.current_btn = btn - self.current_btn.configure(fg_color=btn.hover_color) + self.current_btn.configure(fg_color=btn._hover_color) # If we are switching to a new script else: self.controller.model.progress = 0 @@ -287,7 +287,7 @@ def __toggle_bot_by_key(self, bot_key, btn: customtkinter.CTkButton): self.controller.change_model(self.models[bot_key]) self.current_btn.configure(fg_color=self.DEFAULT_GRAY) self.current_btn = btn - self.current_btn.configure(fg_color=btn.hover_color) + self.current_btn.configure(fg_color=btn._hover_color) # ============ Misc Handlers ============ def change_mode(self): diff --git a/src/utilities/options_builder.py b/src/utilities/options_builder.py index 4b1f01db..7706bcb7 100644 --- a/src/utilities/options_builder.py +++ b/src/utilities/options_builder.py @@ -112,7 +112,7 @@ def __init__(self, parent, title: str, option_info: dict, controller): self.columnconfigure(1, weight=1) # Title - self.lbl_example_bot_options = customtkinter.CTkLabel(master=self, text=f"{title} Options", text_font=("Roboto Medium", 14)) + self.lbl_example_bot_options = customtkinter.CTkLabel(master=self, text=f"{title} Options") self.lbl_example_bot_options.grid(row=0, column=0, padx=10, pady=20) # Dynamically place widgets diff --git a/src/view/home_view_runelite.py b/src/view/home_view_runelite.py index 9438e2cb..f823ec17 100644 --- a/src/view/home_view_runelite.py +++ b/src/view/home_view_runelite.py @@ -34,7 +34,7 @@ def __init__(self, parent, main, game_title: str): # self.label_logo.grid(row=1, column=0, columnspan=3, sticky="nsew", padx=15, pady=15) # Title - self.label_title = customtkinter.CTkLabel(self, text=f"{game_title}", text_font=("Roboto", 24)) + self.label_title = customtkinter.CTkLabel(self, text=f"{game_title}") self.label_title.grid(row=1, column=0, columnspan=3, sticky="nsew", padx=15, pady=15) # Description label @@ -44,7 +44,7 @@ def __init__(self, parent, main, game_title: str): + "step if you know your client is already configured. If a script has a rocket icon next to its name, RuneLite should instead be launched using" " the dedicated button provided by the script." ) - self.label_note = customtkinter.CTkLabel(master=self, text=self.note, text_font=("Roboto", 12)) + self.label_note = customtkinter.CTkLabel(master=self, text=self.note) self.label_note.bind( "", lambda e: self.label_note.configure(wraplength=self.label_note.winfo_width() - 20), @@ -56,7 +56,6 @@ def __init__(self, parent, main, game_title: str): self.label_warning = customtkinter.CTkLabel( master=self, text=self.warning, - text_font=("Roboto", 10), text_color="orange", ) self.label_warning.bind( diff --git a/src/view/info_frame.py b/src/view/info_frame.py index 1bd590db..0cfe4e75 100644 --- a/src/view/info_frame.py +++ b/src/view/info_frame.py @@ -39,7 +39,6 @@ def __init__(self, parent, title, info): # sourcery skip: merge-nested-ifs master=self, text=title, justify=tkinter.LEFT, - text_font=("default_theme", 12), ) self.lbl_script_title.grid(column=0, row=0, sticky="wns", padx=15, pady=15) @@ -83,12 +82,11 @@ def __init__(self, parent, title, info): # sourcery skip: merge-nested-ifs master=self, text="Controls", justify=tkinter.LEFT, - text_font=("default_theme", 12), ) self.lbl_controls_title.grid(row=0, column=1, sticky="wns") # Button frame - self.btn_frame = customtkinter.CTkFrame(master=self, fg_color=self.fg_color) + self.btn_frame = customtkinter.CTkFrame(master=self, fg_color=self._fg_color) self.btn_frame.rowconfigure((1, 2, 3), weight=0) self.btn_frame.rowconfigure((0, 4), weight=1) self.btn_frame.grid(row=1, rowspan=4, column=1, padx=15, sticky="wns") @@ -100,8 +98,8 @@ def __init__(self, parent, title, info): # sourcery skip: merge-nested-ifs image=self.img_play, command=self.play_btn_clicked, ) - self.btn_play.bind("", lambda event: event.widget.configure(text=f"{settings.keybind_to_text(self.combination_keys)}")) - self.btn_play.bind("", lambda event: event.widget.configure(text="Play")) + self.btn_play.bind("", lambda event: self.btn_play.configure(text=f"{settings.keybind_to_text(self.combination_keys)}")) + self.btn_play.bind("", lambda event: self.btn_play.configure(text="Play")) self.btn_play.grid(row=1, column=0, pady=(0, 15), sticky="nsew") self.btn_stop = customtkinter.CTkButton( @@ -113,8 +111,8 @@ def __init__(self, parent, title, info): # sourcery skip: merge-nested-ifs image=self.img_stop, command=self.stop_btn_clicked, ) - self.btn_stop.bind("", lambda event: event.widget.configure(text=f"{settings.keybind_to_text(self.combination_keys)}")) - self.btn_stop.bind("", lambda event: event.widget.configure(text="Stop")) + self.btn_stop.bind("", lambda event: self.btn_stop.configure(text=f"{settings.keybind_to_text(self.combination_keys)}")) + self.btn_stop.bind("", lambda event: self.btn_stop.configure(text="Stop")) self.btn_options = customtkinter.CTkButton( master=self.btn_frame, diff --git a/src/view/output_log_frame.py b/src/view/output_log_frame.py index 48455890..1b7903c7 100644 --- a/src/view/output_log_frame.py +++ b/src/view/output_log_frame.py @@ -20,7 +20,6 @@ def __init__(self, parent): master=self, text="Script Log", justify=tkinter.LEFT, - text_font=("default_theme", 12), ) self.lbl_title.grid(row=0, column=0, sticky="wns", padx=15, pady=15) diff --git a/src/view/title_view.py b/src/view/title_view.py index 2498cdc9..94a464bc 100644 --- a/src/view/title_view.py +++ b/src/view/title_view.py @@ -35,7 +35,7 @@ def __init__(self, parent, main): # Description label self.note = "The universal OSRS color bot.\n Select a game in the left-side menu to begin." - self.label_note = customtkinter.CTkLabel(master=self, text=self.note, text_font=("Roboto", 14)) + self.label_note = customtkinter.CTkLabel(master=self, text=self.note) self.label_note.bind( "", lambda e: self.label_note.configure(wraplength=self.label_note.winfo_width() - 20),