Layout tweaks

This commit is contained in:
Rahix 2024-08-19 02:44:28 +02:00
parent e30421fab9
commit 88ffc7ab30

View file

@ -34,7 +34,7 @@ def main() -> None:
toc_tree = ttk.Treeview(frm, columns=columns, show="headings")
toc_tree.heading("title", text="Title")
toc_tree.heading("page", text="Page")
toc_tree.grid(column=0, row=1)
toc_tree.grid(column=0, row=0, rowspan=2, sticky="NS", padx=5, pady=5)
for lvl, t, p in toc:
toc_tree.insert("", tkinter.END, values=(" " * lvl + t, str(p)))
@ -67,8 +67,8 @@ def main() -> None:
CURRENT_PAGE -= 1
load_page(CURRENT_PAGE)
ttk.Button(frm, text="Previous", command=previous_page).grid(column=1, row=1)
ttk.Button(frm, text="Next", command=next_page).grid(column=3, row=1)
ttk.Button(frm, text="Previous", command=previous_page).grid(column=1, row=1, sticky="NS", padx=5, pady=5)
ttk.Button(frm, text="Next", command=next_page).grid(column=3, row=1, sticky="NS", padx=5, pady=5)
load_page(CURRENT_PAGE)