From d5a4dbf1d5cd895c3bc2e471dde2410b821b3be9 Mon Sep 17 00:00:00 2001 From: Falko Habel Date: Mon, 11 Mar 2024 21:56:22 +0100 Subject: [PATCH] Keybinding Bug Fixed --- scripts/settings.py | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/scripts/settings.py b/scripts/settings.py index 3a4d95e..887d522 100644 --- a/scripts/settings.py +++ b/scripts/settings.py @@ -1,6 +1,6 @@ import customtkinter as Ctk import scripts.get_sys_info as system_code -from CTkColorPicker import AskColor +from Widgets.color_widget.ctk_color_picker import AskColor class Settings(Ctk.CTkFrame): def __init__(self,master, **kwargs): @@ -47,6 +47,16 @@ class Settings(Ctk.CTkFrame): self.thread_count_switch.set(system_code.used_threads) # Position of the Frame self.align() + + def enable_keybinding(self): + # this function has to be in all Functions but is only needed in + # some Classes + pass + + def disable_keybinding(self): + # this function has to be in all Functions but is only needed in + # some Classes + pass def change_skipped_frame(self,value): value = int(value) @@ -59,12 +69,11 @@ class Settings(Ctk.CTkFrame): self.thickness_slider_value.configure(text=value) def ask_color(self): - pick_color = AskColor(initial_color=system_code.color) # open the color picker - if pick_color.get() is not None: - system_code.color = pick_color.get() # get the color string - self.color_btn.configure(fg_color=system_code.color) - - # set the wanted image format + self.pick_color = AskColor(master=self.master, initial_color=system_code.color) + self.color = self.pick_color.get() # get the color string + if self.color is not None: + self.color_btn.configure(fg_color=self.color) + # set the wanted image format def set_img_format(self, value): system_code.img_format = value