Ctrl+P privacy screen works from slideshow window
This commit is contained in:
parent
1cc7bc06c1
commit
915afb41df
@ -1118,6 +1118,7 @@ class BooruApp(QMainWindow):
|
||||
self._fullscreen_window.bookmark_requested.connect(self._bookmark_from_preview)
|
||||
self._fullscreen_window.save_toggle_requested.connect(self._save_toggle_from_slideshow)
|
||||
self._fullscreen_window.closed.connect(self._on_fullscreen_closed)
|
||||
self._fullscreen_window.privacy_requested.connect(self._toggle_privacy)
|
||||
self._fullscreen_window.set_media(path, info)
|
||||
# Seek to the position from the preview after media loads
|
||||
if video_pos > 0 and self._fullscreen_window._stack.currentIndex() == 1:
|
||||
|
||||
@ -28,6 +28,7 @@ class FullscreenPreview(QMainWindow):
|
||||
navigate = Signal(int) # direction: -1/+1 for left/right, -cols/+cols for up/down
|
||||
bookmark_requested = Signal()
|
||||
save_toggle_requested = Signal() # save or unsave depending on state
|
||||
privacy_requested = Signal()
|
||||
closed = Signal()
|
||||
|
||||
def __init__(self, grid_cols: int = 3, show_actions: bool = True, monitor: str = "", parent=None) -> None:
|
||||
@ -136,7 +137,10 @@ class FullscreenPreview(QMainWindow):
|
||||
return super().eventFilter(obj, event)
|
||||
key = event.key()
|
||||
mods = event.modifiers()
|
||||
if key == Qt.Key.Key_H and mods & Qt.KeyboardModifier.ControlModifier:
|
||||
if key == Qt.Key.Key_P and mods & Qt.KeyboardModifier.ControlModifier:
|
||||
self.privacy_requested.emit()
|
||||
return True
|
||||
elif key == Qt.Key.Key_H and mods & Qt.KeyboardModifier.ControlModifier:
|
||||
self._toolbar.setVisible(not self._toolbar.isVisible())
|
||||
# Also hide video controls if showing video
|
||||
if self._stack.currentIndex() == 1:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user