diff --git a/app_state.py b/app_state.py index f13af90..e33761a 100644 --- a/app_state.py +++ b/app_state.py @@ -8,7 +8,7 @@ so later rebinding would only ever be seen by the module that did it. import configparser import os -VERSION = "0.0.0.067" +VERSION = "0.0.0.068" PROPERTIES_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), "editor.properties") DEFAULT_GRID_SIZE = 10 DEFAULT_ADD_TIMESTAMP = True diff --git a/manage_kits.py b/manage_kits.py index 40ca1b2..6145753 100644 --- a/manage_kits.py +++ b/manage_kits.py @@ -213,23 +213,29 @@ class KitsPanel: self.frame = ttk.Frame(parent, padding=10) COLUMNS = ("name", "installed", "latest", "action") + + table_frame = ttk.Frame(self.frame) + table_frame.pack(fill=tk.BOTH, expand=True) + self.table = ttk.Treeview( - self.frame, columns=COLUMNS, show="tree headings", selectmode="browse", + table_frame, columns=COLUMNS, show="tree headings", selectmode="browse", ) self.table.heading("#0", text="") self.table.column("#0", width=32, minwidth=32, stretch=False, anchor="center") - for column, heading, width, stretch, anchor in [ - ("name", "Kit name", 200, True, "w"), - ("installed", "Installed", 105, False, "w"), - ("latest", "Latest", 105, False, "w"), - ("action", "Action", 300, False, "w"), + for column, heading, width, anchor in [ + ("name", "Kit name", 190, "w"), + ("installed", "Installed", 105, "w"), + ("latest", "Latest", 105, "w"), + ("action", "Action", 195, "w"), ]: self.table.heading(column, text=heading, anchor=anchor) - self.table.column(column, width=width, anchor=anchor, stretch=stretch) + self.table.column(column, width=width, minwidth=width, anchor=anchor, stretch=False) - scrollbar = ttk.Scrollbar(self.frame, orient=tk.VERTICAL, command=self.table.yview) - self.table.configure(yscrollcommand=scrollbar.set) - scrollbar.pack(side=tk.RIGHT, fill=tk.Y) + vscroll = ttk.Scrollbar(table_frame, orient=tk.VERTICAL, command=self.table.yview) + hscroll = ttk.Scrollbar(table_frame, orient=tk.HORIZONTAL, command=self.table.xview) + self.table.configure(yscrollcommand=vscroll.set, xscrollcommand=hscroll.set) + vscroll.pack(side=tk.RIGHT, fill=tk.Y) + hscroll.pack(side=tk.BOTTOM, fill=tk.X) self.table.pack(fill=tk.BOTH, expand=True) self.table.tag_configure(SECTION_TAG, background="#dcdcdc")