Explorar el Código

go fullscreen instead of maximize

subDesTagesMitExtraKaese hace 3 años
padre
commit
71846a610d
Se han modificado 2 ficheros con 4 adiciones y 1 borrados
  1. 3 0
      raspberry-pi/gui/mainWindow.py
  2. 1 1
      raspberry-pi/main.py

+ 3 - 0
raspberry-pi/gui/mainWindow.py

@@ -36,6 +36,9 @@ class MainWindow(tk.Frame):
     tk.Label(self.controls, textvariable=self.ac_dro_t1, anchor="nw").pack(side="top", fill="both", expand=False)
     tk.Label(self.controls, textvariable=self.ac_dro_t2, anchor="nw").pack(side="top", fill="both", expand=False)
 
+    quit_button = tk.Button(self.controls, text="Quit", command=self.root.destroy, height=2, foreground="red")
+    quit_button.pack(side="bottom", fill="both")
+
     calibrate_button = tk.Button(self.controls, text="Calibrate", command=self.calibrate, height=4)
     calibrate_button.pack(side="bottom", fill="both")
 

+ 1 - 1
raspberry-pi/main.py

@@ -19,7 +19,7 @@ def main():
     ac_sensor.start()
     root = tk.Tk()
     root.title("Tracking System")
-    root.state("zoomed")
+    root.attributes('-fullscreen', True)
     view = MainWindow(root, ac_sensor, ac_queue, ac_calibration_state)
     view.pack(side="top", fill="both", expand=True)
     view.update()