resize to fit rpi screen

master
agp8x 2018-08-23 21:02:04 +02:00
parent 799e38c50c
commit 74641a57ee
1 changed files with 3 additions and 2 deletions

View File

@ -37,7 +37,8 @@ class Window(object):
def __init__(self, args):
self.window = Gtk.Window()
self.window.set_title("weather")
#self.window.set_default_size(150, 150)
self.window.set_default_size(800, 450)
#self.window.set_resizable(False)
self.window.connect("destroy", self.destroy)
self.window.connect("key-press-event", self.on_key)
self.window.connect("button-press-event", self.on_click)
@ -72,7 +73,7 @@ class Window(object):
loader.write(buff.getvalue())
pixbuf = loader.get_pixbuf()
loader.close()
return pixbuf
return pixbuf.scale_simple(800, 450, GdkPixbuf.InterpType.BILINEAR)
if __name__=="__main__":
parser = argparse.ArgumentParser()