From 82eacc96f7ad80d26cd832d570ca8683bdcdaa3f Mon Sep 17 00:00:00 2001 From: yumoqing Date: Mon, 23 Dec 2019 09:46:11 +0800 Subject: [PATCH] bugfix --- kivyblocks/vplayer.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kivyblocks/vplayer.py b/kivyblocks/vplayer.py index 1613aa3..118befa 100644 --- a/kivyblocks/vplayer.py +++ b/kivyblocks/vplayer.py @@ -214,8 +214,10 @@ class VPlayer(FloatLayout): if value: Window.fullscreen = True + print('Window size=',Window.size) self._fullscreen_state = state = { + "WindowSize":Window.size, 'parent': self.parent, 'pos': self.pos, 'size': self.size, @@ -223,6 +225,7 @@ class VPlayer(FloatLayout): 'size_hint': self.size_hint, 'window_children': window.children[:]} + Window.maximize() # remove all window children for child in window.children[:]: window.remove_widget(child) @@ -241,6 +244,7 @@ class VPlayer(FloatLayout): else: Window.fullscreen = False state = self._fullscreen_state + Window.size = state['WindowSize'] window.remove_widget(self) for child in state['window_children']: window.add_widget(child)