Bump version to 0.9.7; update localization files, fix settings window, Linux build, fix LoRA parsing, remove uncessary default tag
All checks were successful
Gitea/kapitanbooru-uploader/pipeline/head This commit looks good
All checks were successful
Gitea/kapitanbooru-uploader/pipeline/head This commit looks good
This commit is contained in:
@@ -157,6 +157,7 @@ class ImageBrowser(tk.Tk):
|
||||
# Rebuild UI
|
||||
self.create_menu()
|
||||
self.create_widgets()
|
||||
self.update_idletasks()
|
||||
|
||||
def adjust_text_widget_height(self, widget):
|
||||
"""
|
||||
@@ -313,7 +314,6 @@ class ImageBrowser(tk.Tk):
|
||||
def open_settings(self):
|
||||
settings_window = tk.Toplevel(self)
|
||||
settings_window.title(_("Ustawienia"))
|
||||
settings_window.geometry("300x430") # Enlarged vertically
|
||||
settings_window.resizable(False, False) # Disable resizing
|
||||
settings_window.grab_set()
|
||||
|
||||
@@ -394,6 +394,17 @@ class ImageBrowser(tk.Tk):
|
||||
btn_save = tk.Button(settings_window, text=_("Zapisz"), command=save_and_close)
|
||||
btn_save.pack(pady=10)
|
||||
|
||||
# Let Tkinter calculate the required size for all widgets
|
||||
settings_window.update_idletasks()
|
||||
width = 300
|
||||
height = settings_window.winfo_reqheight()
|
||||
settings_window.geometry(f"{width}x{height}")
|
||||
|
||||
# Center the window on the screen
|
||||
x = self.winfo_rootx() + (self.winfo_width() // 2) - (width // 2)
|
||||
y = self.winfo_rooty() + (self.winfo_height() // 2) - (height // 2)
|
||||
settings_window.geometry(f"+{x}+{y}")
|
||||
|
||||
def create_widgets(self):
|
||||
# Główna ramka – trzy kolumny
|
||||
main_frame = tk.Frame(self)
|
||||
|
Reference in New Issue
Block a user