user15437271
user15437271

Reputation:

PySimpleGUI window borders

My program is showing a gif on a black background. But the default window has gray borders that I want to remove. I've been searching on github, google and here but I couldn't find nothing related to PySimpleGUI borders, all I found was about Tkinter library.

This is my code:

import PySimpleGUI as sg    


gifpath="media/079.gif"
image = sg.Image(gifpath, background_color='black')
layout = [[image]]
window = sg.Window('SCP-079',layout,size=(540, 360), icon='media/079.ico')

while True:
    event, values = window.read(timeout=100)
    if event in (None,'Exit'):
        break
    image.update_animation_no_buffering(image.Filename, 100)

Upvotes: 0

Views: 2091

Answers (1)

user15437271
user15437271

Reputation:

Thanks to Jason for the answer, all i had to do was adding pad=(0, 0) to sg.Image and margins=(0, 0) sg.Window

here is the code:

import PySimpleGUI as sg    



gifpath="media/079.gif"
image = sg.Image(gifpath, background_color='black',pad=(0, 0))
layout = [[image]]
window = sg.Window('SCP-079',layout,size=(540, 360), icon='media/079.ico',margins=(0, 0))

while True:
    event, values = window.read(timeout=100)
    if event in (None,'Exit'):
        break
    image.update_animation_no_buffering(image.Filename, 100)

Upvotes: 2

Related Questions