From: Advaith Menon Date: Fri, 30 Jan 2026 22:01:12 +0000 (-0500) Subject: Improve dialog box X-Git-Url: https://git.devinivas.org/?a=commitdiff_plain;h=249894f16cfae555ee19af4eb951b1210f1d704c;p=4180kiosk.git Improve dialog box --- diff --git a/ohdisp/exception_dialog.py b/ohdisp/exception_dialog.py index 3ef0e8f..5bbdafc 100644 --- a/ohdisp/exception_dialog.py +++ b/ohdisp/exception_dialog.py @@ -15,17 +15,36 @@ class ExceptionDialog(tk.Toplevel): self.attributes("-topmost", True); self.wm_protocol("WM_DELETE_WINDOW", self.destroy) - sb = tk.Scrollbar(self); + tit_lbl = tk.Label(self, text=("An unhandled exception has occured!\n" + "Send a screenshot to advaith@gatech.edu\n" + "Press Quit to quit/restart the " + "application."), + anchor='w', padx=2, pady=2, justify='left') + tit_lbl.pack(side='top', fill='x') + + frm = tk.Frame(self); + sb = tk.Scrollbar(frm); sb.pack(side='right', fill='y') - te = tk.Text(self); + te = tk.Text(frm); te.insert('end', txt); te.pack(side='top', fill='both', expand=True) te['yscrollcommand'] = sb.set sb['command'] = te.yview + frm.pack(side='top', fill='both', expand=True); + quit_btn = tk.Button(self, text="Quit", command=self.destroy, padx=5, pady=5) quit_btn.pack(side='right') + + self.expand_btn = tk.Button(self, text="Maximize", + command=self.w_maximize, + padx=5, pady=5) + self.expand_btn.pack(side='right') + + def w_maximize(self): + self.state("zoomed"); + self.expand_btn.destroy();