Space to pause/play video when hovering over preview
Uses keyPressEvent on main window — only fires when no text input has focus (search bar consumes Space itself). Checks underMouse() so it only works when hovering the preview.
This commit is contained in:
parent
d4ee2b2ec1
commit
c26d9a64f9
@ -1615,6 +1615,10 @@ class BooruApp(QMainWindow):
|
||||
if 0 <= idx < len(self._posts):
|
||||
self._open_in_default(self._posts[idx])
|
||||
return
|
||||
elif key == Qt.Key.Key_Space:
|
||||
if self._preview._stack.currentIndex() == 1 and self._preview.underMouse():
|
||||
self._preview._video_player._toggle_play()
|
||||
return
|
||||
super().keyPressEvent(event)
|
||||
|
||||
# -- Bookmarks --
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user