Ctrl+P privacy screen works from slideshow window

This commit is contained in:
pax 2026-04-05 04:52:48 -05:00
parent 1cc7bc06c1
commit 915afb41df
2 changed files with 6 additions and 1 deletions

View File

@ -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:

View File

@ -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: