move desc window ~to the middle

This commit is contained in:
faroukbmiled 2023-09-23 14:10:58 +01:00
parent 75f793ec60
commit 016ac80ec7
2 changed files with 4 additions and 4 deletions

View File

@ -588,8 +588,8 @@ class LibraryTab(ctk.CTkScrollableFrame):
description_window.attributes('-topmost', 'true') description_window.attributes('-topmost', 'true')
description_window.title("Description") description_window.title("Description")
y_pos = event.y_root x_pos = event.x_root - 300
x_pos = event.x_root y_pos = event.y_root - 200
calc_req_width = len(description) * 6 + 5 calc_req_width = len(description) * 6 + 5
win_width = calc_req_width if calc_req_width < 500 else 500 win_width = calc_req_width if calc_req_width < 500 else 500
description_window.geometry(f"{win_width + 5}x300+{x_pos}+{y_pos}") description_window.geometry(f"{win_width + 5}x300+{x_pos}+{y_pos}")

View File

@ -667,8 +667,8 @@ class BOIIIWD(ctk.CTk):
description_window.attributes('-topmost', 'true') description_window.attributes('-topmost', 'true')
description_window.title("Description") description_window.title("Description")
y_pos = event.y_root x_pos = event.x_root - 300
x_pos = event.x_root y_pos = event.y_root - 200
calc_req_width = len(description) * 6 + 5 calc_req_width = len(description) * 6 + 5
win_width = calc_req_width if calc_req_width < 500 else 500 win_width = calc_req_width if calc_req_width < 500 else 500
description_window.geometry(f"{win_width + 5}x300+{x_pos}+{y_pos}") description_window.geometry(f"{win_width + 5}x300+{x_pos}+{y_pos}")