Hardcoded some shortcuts.
This commit is contained in:
parent
3f6b40e5fe
commit
4cd6482571
2 changed files with 9 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/python3
|
||||
|
||||
from PyQt6.QtCore import Qt, QPoint
|
||||
from PyQt6.QtGui import QIcon, QContextMenuEvent
|
||||
from PyQt6.QtCore import Qt
|
||||
from PyQt6.QtGui import QIcon, QShortcut
|
||||
from PyQt6.QtWidgets import QMainWindow, QMenu
|
||||
from .track_control import TrackControl
|
||||
from .settings import Settings
|
||||
|
@ -58,3 +58,6 @@ class MainWindow(QMainWindow):
|
|||
dock_menu = self.createPopupMenu()
|
||||
dock_menu.setTitle("Docks And Toolbars")
|
||||
self.view_menu.addMenu(dock_menu)
|
||||
|
||||
close_shortcut = QShortcut("Ctrl+Q", self)
|
||||
close_shortcut.activated.connect(self.close)
|
||||
|
|
|
@ -18,14 +18,18 @@ class TrackControl(QToolBar):
|
|||
|
||||
icon = QIcon.fromTheme(QIcon.ThemeIcon.MediaSkipBackward)
|
||||
self.previous_button = self.addAction(icon, "Previous")
|
||||
self.previous_button.setShortcut("Shift+Left")
|
||||
|
||||
self.toggle_play_button = self.addAction(self.play_icon, "Play/Pause")
|
||||
self.toggle_play_button.setShortcut("Space")
|
||||
|
||||
icon = QIcon.fromTheme(QIcon.ThemeIcon.MediaPlaybackStop)
|
||||
self.stop_button = self.addAction(icon, "Stop")
|
||||
self.stop_button.setShortcut("Shift+S")
|
||||
|
||||
icon = QIcon.fromTheme(QIcon.ThemeIcon.MediaSkipForward)
|
||||
self.next_button = self.addAction(icon, "Next")
|
||||
self.next_button.setShortcut("Shift+Right")
|
||||
|
||||
self.progress_indicator = QLabel("0:00")
|
||||
self.addWidget(self.progress_indicator)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue