Skip to content

Commit

Permalink
Fix: Use tuple for padding in Tkinter grid (#283)
Browse files Browse the repository at this point in the history
In the 'WindowCMDRs' class, corrected padding values for labels by converting lists
into tuples. This resolves the issue where the 'pady' parameter was passed as a list
instead of a tuple, ensuring compatibility with Tkinter's grid system.

Changes made:
- Fixed 'pady' usage in 'CMDR Details' and 'Interaction' labels.
  • Loading branch information
GLWine authored Nov 28, 2024
1 parent b7e2549 commit 662e570
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bgstally/windows/cmdrs.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def show(self):
treeview.pack(fill=tk.BOTH, expand=1)

current_row = 0
ttk.Label(frm_details, text=_("CMDR Details"), font=FONT_HEADING_1, foreground=COLOUR_HEADING_1).grid(row=current_row, column=0, sticky=tk.W, columnspan=4, padx=5, pady=[5, 0]); current_row += 1 # LANG: Label on CMDR window
ttk.Label(frm_details, text=_("CMDR Details"), font=FONT_HEADING_1, foreground=COLOUR_HEADING_1).grid(row=current_row, column=0, sticky=tk.W, columnspan=4, padx=5, pady=(5, 0)); current_row += 1 # LANG: Label on CMDR window
ttk.Label(frm_details, text=_("Name: "), font=FONT_HEADING_2).grid(row=current_row, column=0, sticky=tk.W, padx=5) # LANG: Label on CMDR window
self.lbl_cmdr_details_name: ttk.Label = ttk.Label(frm_details, text="", width=50)
self.lbl_cmdr_details_name.grid(row=current_row, column=1, sticky=tk.W, padx=5)
Expand All @@ -87,7 +87,7 @@ def show(self):
self.lbl_cmdr_details_squadron_inara.grid(row=current_row, column=3, sticky=tk.W, padx=5); current_row += 1
ttk.Label(frm_details, text=_("Interaction: "), font=FONT_HEADING_2).grid(row=current_row, column=0, sticky=tk.W, padx=5) # LANG: Label on CMDR window
self.lbl_cmdr_details_interaction: ttk.Label = ttk.Label(frm_details, text="")
self.lbl_cmdr_details_interaction.grid(row=current_row, column=1, sticky=tk.W, padx=5, pady=[0, 5]); current_row += 1
self.lbl_cmdr_details_interaction.grid(row=current_row, column=1, sticky=tk.W, padx=5, pady=(0, 5)); current_row += 1

for column in column_info:
treeview.heading(column['title'], text=column['title'].title(), sort_by=column['type'])
Expand Down

0 comments on commit 662e570

Please sign in to comment.