Skip to content

Commit

Permalink
Try to fix fullscreen. .. it didn't
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonm23 committed Sep 4, 2024
1 parent 0d118fc commit 74b222a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
1 change: 1 addition & 0 deletions build_exe.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pyinstaller --noconfirm --onefile --windowed --icon slideshow.ico slideshow.py
18 changes: 17 additions & 1 deletion slideshow.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,22 @@ def toggle_random_image():
osd("Sequence")


def toggle_fullscreen():
screen = window.display.get_default_screen()
if window.fullscreen:
window.set_fullscreen(
fullscreen=False,
width=screen.width - 100,
height=screen.height - 100,
)
else:
window.set_fullscreen(
fullscreen=True,
width=screen.width,
height=screen.height + 32,
)


def resize_window_to_screen():
screen = window.display.get_default_screen()
width = screen.width
Expand Down Expand Up @@ -578,7 +594,7 @@ def on_key_release(symbol, modifiers):
toggle_random_image()

elif key.F == symbol:
resize_window_to_screen()
toggle_fullscreen()

elif key.K == symbol:
toggle_ken_burns()
Expand Down

0 comments on commit 74b222a

Please sign in to comment.