added description line in details

This commit is contained in:
faroukbmiled 2023-09-23 13:04:43 +01:00
parent 3d5ec2f8f4
commit b968b3e2b3
2 changed files with 8 additions and 6 deletions

View File

@ -648,9 +648,10 @@ class LibraryTab(ctk.CTkScrollableFrame):
shortened_description = f"{description[:30]}... (View)" if len(description) > 30 else description shortened_description = f"{description[:30]}... (View)" if len(description) > 30 else description
description_lab = ctk.CTkLabel(info_frame, text=f"Description: {shortened_description.strip()}") description_lab = ctk.CTkLabel(info_frame, text=f"Description: {shortened_description.strip()}")
description_lab.grid(row=1, column=0, columnspan=2, sticky="w", padx=20, pady=5) description_lab.grid(row=1, column=0, columnspan=2, sticky="w", padx=20, pady=5)
description_lab_tooltip = CTkToolTip(description_lab, message="View description", topmost=True) if len(description) > 30:
description_lab.configure(cursor="hand2") description_lab_tooltip = CTkToolTip(description_lab, message="View description", topmost=True)
description_lab.bind("<Button-1>", lambda e: show_description(e)) description_lab.configure(cursor="hand2")
description_lab.bind("<Button-1>", lambda e: show_description(e))
id_label = ctk.CTkLabel(info_frame, text=f"ID: {workshop_id} | Folder: {os.path.basename(folder)}") id_label = ctk.CTkLabel(info_frame, text=f"ID: {workshop_id} | Folder: {os.path.basename(folder)}")
id_label.grid(row=2, column=0, columnspan=2, sticky="w", padx=20, pady=5) id_label.grid(row=2, column=0, columnspan=2, sticky="w", padx=20, pady=5)

View File

@ -708,9 +708,10 @@ class BOIIIWD(ctk.CTk):
shortened_description = f"{description[:30]}... (View)" if len(description) > 30 else description shortened_description = f"{description[:30]}... (View)" if len(description) > 30 else description
description_lab = ctk.CTkLabel(info_frame, text=f"Description: {shortened_description.strip()}") description_lab = ctk.CTkLabel(info_frame, text=f"Description: {shortened_description.strip()}")
description_lab.grid(row=1, column=0, columnspan=2, sticky="w", padx=20, pady=5) description_lab.grid(row=1, column=0, columnspan=2, sticky="w", padx=20, pady=5)
description_lab_tooltip = CTkToolTip(description_lab, message="View description", topmost=True) if len(description) > 30:
description_lab.configure(cursor="hand2") description_lab_tooltip = CTkToolTip(description_lab, message="View description", topmost=True)
description_lab.bind("<Button-1>", lambda e: show_description(e)) description_lab.configure(cursor="hand2")
description_lab.bind("<Button-1>", lambda e: show_description(e))
type_label = ctk.CTkLabel(info_frame, text=f"Type: {map_mod_type}") type_label = ctk.CTkLabel(info_frame, text=f"Type: {map_mod_type}")
type_label.grid(row=2, column=0, columnspan=2, sticky="w", padx=20, pady=5) type_label.grid(row=2, column=0, columnspan=2, sticky="w", padx=20, pady=5)