From 624c237b53b324098d27d38f675e2d79ad8f765b Mon Sep 17 00:00:00 2001 From: yumoqing Date: Mon, 23 Dec 2019 10:15:00 +0800 Subject: [PATCH] bugfix --- kivyblocks/vplayer.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/kivyblocks/vplayer.py b/kivyblocks/vplayer.py index 0565c48..4052391 100644 --- a/kivyblocks/vplayer.py +++ b/kivyblocks/vplayer.py @@ -18,6 +18,13 @@ from kivy.properties import ObjectProperty, StringProperty, BooleanProperty, \ from .utils import * from .baseWidget import PressableImage +desktopOSs=[ + "win", + "linux", + "macosx" +] + +othersplatforms=['ios','android'] class VPlayer(FloatLayout): fullscreen = BooleanProperty(False) @@ -226,7 +233,7 @@ class VPlayer(FloatLayout): 'window_children': window.children[:]} print('vplayer fullscreen,platform=',platform) - if platform in ['windows', 'linux','macOS' ]: + if platform in desktopOSs: Window.maximize() # remove all window children for child in window.children[:]: @@ -256,7 +263,7 @@ class VPlayer(FloatLayout): if state['parent'] is not window: state['parent'].add_widget(self) print('vplayer fullscreen,platform=',platform) - if platform in ['windows', 'linux','macOS' ]: + if platform in desktopOSs: Window.restore() def buildMenu(self,obj,touch):