toplevels imp, get rid of topmosts in steam to boiii and details windows

This commit is contained in:
faroukbmiled 2023-09-25 22:06:11 +01:00
parent fdf4308852
commit fea0d4f590
4 changed files with 14 additions and 4 deletions

View File

@ -614,7 +614,9 @@ class LibraryTab(ctk.CTkScrollableFrame):
if os.path.exists(os.path.join(RESOURCES_DIR, "ryuk.ico")):
top.after(210, lambda: top.iconbitmap(os.path.join(RESOURCES_DIR, "ryuk.ico")))
top.title("Map/Mod Information")
top.attributes('-topmost', 'true')
_, _, x, y = get_window_size_from_registry()
top.geometry(f"+{x+50}+{y-50}")
# top.attributes('-topmost', 'true')
size_text = "Size (Workshop):"
if offline_date:
@ -792,6 +794,7 @@ class LibraryTab(ctk.CTkScrollableFrame):
buttons_frame.grid_columnconfigure(2, weight=1)
finally:
top.after(10, top.focus_force)
for button_view in self.button_view_list:
button_view.configure(state="normal")
self.after(0, main_thread)

View File

@ -657,7 +657,9 @@ class BOIIIWD(ctk.CTk):
top = ctk.CTkToplevel(self)
top.after(210, lambda: top.iconbitmap(os.path.join(RESOURCES_DIR, "ryuk.ico")))
top.title("Map/Mod Information")
top.attributes('-topmost', 'true')
_, _, x, y = get_window_size_from_registry()
top.geometry(f"+{x+50}+{y-50}")
# top.attributes('-topmost', 'true')
def close_window():
top.destroy()
@ -772,6 +774,7 @@ class BOIIIWD(ctk.CTk):
top.grid_rowconfigure(2, weight=1)
top.grid_columnconfigure(0, weight=1)
top.grid_columnconfigure(1, weight=1)
top.after(10, top.focus_force)
self.after(0, main_thread)

View File

@ -510,7 +510,9 @@ class SettingsTab(ctk.CTkFrame):
if os.path.exists(os.path.join(RESOURCES_DIR, "ryuk.ico")):
top.after(210, lambda: top.iconbitmap(os.path.join(RESOURCES_DIR, "ryuk.ico")))
top.title("Steam to boiii -> Workshop items")
top.attributes('-topmost', 'true')
_, _, x, y = get_window_size_from_registry()
top.geometry(f"+{x}+{y}")
# top.attributes('-topmost', 'true')
top.resizable(False, False)
# Create input boxes
center_frame = ctk.CTkFrame(top)
@ -716,6 +718,7 @@ class SettingsTab(ctk.CTkFrame):
main_app.app.create_context_menu(boiii_folder_entry)
copy_var.set(True)
progress_bar.set(0)
main_app.app.after(100, top.focus_force)
except Exception as e:
show_message("Error", f"{e}", icon="cancel")

View File

@ -46,7 +46,8 @@ class UpdateWindow(ctk.CTkToplevel):
def __init__(self, master, update_url):
super().__init__(master)
self.title("BOIIIWD Self-Updater")
self.geometry("400x150")
_, _, x, y = get_window_size_from_registry()
self.geometry(f"400x150+{x}+{y}")
if os.path.exists(os.path.join(RESOURCES_DIR, "ryuk.ico")):
self.after(250, lambda: self.iconbitmap(os.path.join(RESOURCES_DIR, "ryuk.ico")))
self.protocol("WM_DELETE_WINDOW", self.cancel_update)