From: Jakob Cornell Date: Tue, 7 Jan 2020 02:29:52 +0000 (-0600) Subject: Cosmetic UI tweaks X-Git-Url: https://jcornell.net/gitweb/gitweb.cgi?a=commitdiff_plain;h=65f6733ddb5c24e8c35b672d62c36a33ceefc26f;p=tutoring-tool.git Cosmetic UI tweaks --- diff --git a/main.py b/main.py index ac2e236..41448c1 100644 --- a/main.py +++ b/main.py @@ -177,6 +177,7 @@ class MainView(View): self.propagate = defaultdict(lambda: True) self.root = tk.Tk() self.root.title("Tutoring Tool") + self.root.resizable(False, False) def on_close(): if self.editor_views: @@ -237,6 +238,8 @@ class MainView(View): dialog = tk.Toplevel(self.root) dialog.title("Generate plot") dialog.minsize(250, 0) + dialog.resizable(False, False) + dialog.bind('', lambda *_: dialog.destroy()) type_var = tk.StringVar(self.root) select_frame = tk.Frame(dialog) type_select = ttk.OptionMenu(select_frame, type_var) @@ -389,6 +392,7 @@ class DataEditView(View): if do: self.finish() self.root = tk.Toplevel(parent) + self.root.resizable(False, False) self.root.protocol('WM_DELETE_WINDOW', on_close) scroll_frame = VertScrollingFrame(self.root) self.grid = scroll_frame.content_frame @@ -420,7 +424,7 @@ class DataEditView(View): cancel_btn.pack(side = 'left', **TK_PAD) buttons.pack() - label_for = lambda name: tk.Label(self.grid, text = name, width = 10) + label_for = lambda name: tk.Label(self.grid, text = name, width = 15) labels = list(map(label_for, DataEditModel.Record.DISPLAY_NAMES)) for (col, label) in enumerate(labels): label.grid(row = 0, column = col) @@ -477,7 +481,7 @@ class DataEditView(View): def install_row(self, ord_, controls): for (col, control) in enumerate(controls): - control.grid(row = ord_, column = col) + control.grid(row = ord_, column = col, sticky = 'EW') class DataError(Exception): def __init__(self, row, column):