add Regestriy Set for Values
This commit is contained in:
@@ -11,7 +11,18 @@ class CustomerThinkerApp(ctk.CTk):
|
||||
super().__init__()
|
||||
|
||||
self.title("CustomerThinker PDF Export Tool")
|
||||
self.geometry("500x500")
|
||||
window_width = 400
|
||||
window_height = 400
|
||||
|
||||
# Bildschirmgröße ermitteln
|
||||
screen_width = self.winfo_screenwidth()
|
||||
screen_height = self.winfo_screenheight()
|
||||
|
||||
# Position zum Zentrieren berechnen
|
||||
x = int((screen_width / 2) - (window_width / 2))
|
||||
y = int((screen_height / 2) - (window_height / 2))
|
||||
|
||||
self.geometry(f"{window_width}x{window_height}+{x}+{y}")
|
||||
self.resizable(False, False)
|
||||
ctk.set_appearance_mode("System") # "Dark", "Light", "System"
|
||||
ctk.set_default_color_theme("blue") # Andere Themes: "green", "dark-blue"
|
||||
@@ -63,8 +74,24 @@ class CustomerThinkerApp(ctk.CTk):
|
||||
self.logo_label.bind("<Leave>", self.on_logo_leave) # Wenn die Maus das Logo verlässt
|
||||
self.logo_label.place(x=0, y=0, anchor="se") # Vorläufige Position setzen
|
||||
|
||||
# Configure-Event um das Logo nach dem Rendern richtig zu platzieren
|
||||
self.bind("<Configure>", self.update_logo_position)
|
||||
# Konfigurations-Button unten links
|
||||
self.config_button = ctk.CTkButton(self, text="Konfiguration", width=100, command=self.run_reg_check)
|
||||
self.config_button.place(x=10, y=self.winfo_height() - 10, anchor="sw")
|
||||
|
||||
# Einmaliges Binden: Position von Logo UND Button aktualisieren
|
||||
self.bind("<Configure>", self.update_positions)
|
||||
|
||||
|
||||
def run_reg_check(self):
|
||||
script_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "reg_check.py")
|
||||
subprocess.Popen([sys.executable, script_path])
|
||||
|
||||
def update_positions(self, event=None):
|
||||
# Logo rechts unten
|
||||
self.logo_label.place(x=self.winfo_width() - 10, y=self.winfo_height() - 10, anchor="se")
|
||||
# Konfig-Button links unten
|
||||
self.config_button.place(x=10, y=self.winfo_height() - 10, anchor="sw")
|
||||
|
||||
|
||||
def open_link(self, event=None):
|
||||
webbrowser.open("https://www.itdata-gera.de") # Ändere dies auf die gewünschte URL
|
||||
|
||||
Reference in New Issue
Block a user