Fixed fullscreen issue

This commit is contained in:
PM Kuipers 2024-05-07 14:00:15 +02:00
parent a17b2cab7b
commit 2910f12fcf

View File

@ -95,10 +95,15 @@ class MediaService(dbus.service.Object):
css_provider.load_from_data(css)
context = Gtk.StyleContext()
screen = Gdk.Screen.get_default()
display = screen.get_display()
monitor = display.get_monitor(0)
geom = monitor.get_geometry()
w = geom.width
h = geom.height
context.add_provider_for_screen(screen, css_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)
self.window.add(self.imagebox)
self.window.set_size_request(w,h)
self.window.fullscreen()
pass
@ -115,6 +120,8 @@ class MediaService(dbus.service.Object):
image = Gtk.Image()
image.set_from_file(imfile)
image.set_halign(Gtk.Align.CENTER)
image.set_valign(Gtk.Align.CENTER)
self.loadImage(image)
def loadImageData(self,data):