adding ctrl+q shortcut

This commit is contained in:
Bernd 2025-07-25 12:36:03 +05:00
parent 25df9c5a9a
commit 8403e7b7c5
3 changed files with 4 additions and 3 deletions

Binary file not shown.

Binary file not shown.

View File

@ -97,7 +97,7 @@ Global Shortcuts:
- A: Add an anime - A: Add an anime
- Page Down: Next tab - Page Down: Next tab
- Page Up: Previous tab - Page Up: Previous tab
- Q: Quit the program - Ctrl + Q: Quit the program
- R: Pick random anime - R: Pick random anime
- Ctrl + + : Increase table scale - Ctrl + + : Increase table scale
- Ctrl + - : Decrease table scale - Ctrl + - : Decrease table scale
@ -688,8 +688,6 @@ class AnimeTracker(QMainWindow):
current = self.tab_widget.currentIndex() current = self.tab_widget.currentIndex()
if current > 0: if current > 0:
self.tab_widget.setCurrentIndex(current - 1) self.tab_widget.setCurrentIndex(current - 1)
elif key == Qt.Key_Q:
self.close()
elif key == Qt.Key_R: elif key == Qt.Key_R:
self.random_pick() self.random_pick()
elif modifiers == Qt.ControlModifier: elif modifiers == Qt.ControlModifier:
@ -703,6 +701,9 @@ class AnimeTracker(QMainWindow):
self.table_scale = max(self.table_scale - 0.1, 0.5) self.table_scale = max(self.table_scale - 0.1, 0.5)
self.load_tabs() self.load_tabs()
self.set_current_tab_by_identifier(current_id) self.set_current_tab_by_identifier(current_id)
elif key == Qt.Key_Q:
self.close()
super().keyPressEvent(event) super().keyPressEvent(event)
if __name__ == '__main__': if __name__ == '__main__':