]> Devi Nivas Git - 4180kiosk.git/commitdiff
Improve dialog box
authorAdvaith Menon <noreply-git@bp4k.net>
Fri, 30 Jan 2026 22:01:12 +0000 (17:01 -0500)
committerAdvaith Menon <noreply-git@bp4k.net>
Fri, 30 Jan 2026 22:01:12 +0000 (17:01 -0500)
ohdisp/exception_dialog.py

index 3ef0e8f733d501cc4c19f1a6ec6630a5a4894c86..5bbdafce0235fcf43ba8ee338da0ae482931379e 100644 (file)
@@ -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();