dont parse breaks in line

This commit is contained in:
faroukbmiled 2023-09-23 13:33:00 +01:00
parent d736457106
commit 3f13a5f0b3
2 changed files with 4 additions and 2 deletions

View File

@ -647,7 +647,8 @@ class LibraryTab(ctk.CTkScrollableFrame):
desc_threshold = 30
shortened_description = f"{description[:desc_threshold]}... (View)" if len(description) > desc_threshold else description
description_lab = ctk.CTkLabel(info_frame, text=f"Description: {shortened_description.strip()}")
shortened_description = re.sub(r'\n', '', shortened_description).strip()
description_lab = ctk.CTkLabel(info_frame, text=f"Description: {shortened_description}")
description_lab.grid(row=1, column=0, columnspan=2, sticky="w", padx=20, pady=5)
if len(description) > desc_threshold:
description_lab_tooltip = CTkToolTip(description_lab, message="View description", topmost=True)

View File

@ -707,7 +707,8 @@ class BOIIIWD(ctk.CTk):
desc_threshold = 30
shortened_description = f"{description[:desc_threshold]}... (View)" if len(description) > desc_threshold else description
description_lab = ctk.CTkLabel(info_frame, text=f"Description: {shortened_description.strip()}")
shortened_description = re.sub(r'\n', '', shortened_description).strip()
description_lab = ctk.CTkLabel(info_frame, text=f"Description: {shortened_description}")
description_lab.grid(row=1, column=0, columnspan=2, sticky="w", padx=20, pady=5)
if len(description) > desc_threshold:
description_lab_tooltip = CTkToolTip(description_lab, message="View description", topmost=True)