Add a Camera toggle to show the camera panel, hidden by default

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
erik
2026-10-09 16:25:26 +00:00
co-authored by Claude Opus 5.5
parent 16df509d01
commit 61b6cf70a7
+4 -1
View File
@@ -475,7 +475,6 @@ class MainWindow(QMainWindow):
if self.device is None:
self.act_scan.setEnabled(False)
self.act_scan.setToolTip("No myScan found (scanning needs Linux and the mouse plugged in)")
self.camera_pane.hide()
self.set_message("No scanner found: open or drop an image to read it")
else:
self.start_scanner()
@@ -499,6 +498,9 @@ class MainWindow(QMainWindow):
tb.addAction(a)
return a
self.act_camera = act("Camera", lambda on: self.camera_pane.setVisible(on), "Ctrl+K",
"Show the camera and the live sensor readings", True)
tb.addSeparator()
self.act_scan = act("Start scan", self.toggle_scan, "F5", "Start or stop a scan (or press the mouse's scan button)")
tb.addSeparator()
act("Open…", self.open_image, QKeySequence.Open, "Open an image to read")
@@ -542,6 +544,7 @@ class MainWindow(QMainWindow):
for w in (self.camera_pane, page_pane):
main.addWidget(w)
main.setSizes([220, 1180])
self.camera_pane.hide()
self.setCentralWidget(main)
self.status_label = QLabel()
self.statusBar().addWidget(self.status_label, 1)