bugfix
This commit is contained in:
parent
f0bf0ab866
commit
da8df5906e
@ -31,7 +31,6 @@ class WidgetReady(EventDispatcher):
|
|||||||
self.ready()
|
self.ready()
|
||||||
|
|
||||||
def on_fullscreen(self, instance, value):
|
def on_fullscreen(self, instance, value):
|
||||||
print('NewVideo::on_fullscreen(),value=', value)
|
|
||||||
window = self.get_parent_window()
|
window = self.get_parent_window()
|
||||||
if not window:
|
if not window:
|
||||||
Logger.warning('VideoPlayer: Cannot switch to fullscreen, '
|
Logger.warning('VideoPlayer: Cannot switch to fullscreen, '
|
||||||
@ -39,6 +38,7 @@ class WidgetReady(EventDispatcher):
|
|||||||
if value:
|
if value:
|
||||||
self.fullscreen = False
|
self.fullscreen = False
|
||||||
return
|
return
|
||||||
|
print('NewVideo::on_fullscreen(),value=', value, window.size)
|
||||||
if not self.parent:
|
if not self.parent:
|
||||||
Logger.warning('VideoPlayer: Cannot switch to fullscreen, '
|
Logger.warning('VideoPlayer: Cannot switch to fullscreen, '
|
||||||
'no parent.')
|
'no parent.')
|
||||||
@ -56,16 +56,21 @@ class WidgetReady(EventDispatcher):
|
|||||||
'size_hint': self.size_hint,
|
'size_hint': self.size_hint,
|
||||||
'window_children': window.children[:]}
|
'window_children': window.children[:]}
|
||||||
|
|
||||||
|
print('on_fullscreen()*******1******')
|
||||||
if platform in desktopOSs:
|
if platform in desktopOSs:
|
||||||
Window.maximize()
|
Window.maximize()
|
||||||
|
print('on_fullscreen()*******2******')
|
||||||
# remove all window children
|
# remove all window children
|
||||||
for child in window.children[:]:
|
for child in window.children[:]:
|
||||||
window.remove_widget(child)
|
window.remove_widget(child)
|
||||||
|
print('on_fullscreen()*******3******')
|
||||||
|
|
||||||
# put the video in fullscreen
|
# put the video in fullscreen
|
||||||
if state['parent'] is not window:
|
if state['parent'] is not window:
|
||||||
state['parent'].remove_widget(self)
|
state['parent'].remove_widget(self)
|
||||||
|
print('on_fullscreen()*******4******')
|
||||||
window.add_widget(self)
|
window.add_widget(self)
|
||||||
|
print('on_fullscreen()*******5******')
|
||||||
|
|
||||||
# ensure the video widget is in 0, 0, and the size will be
|
# ensure the video widget is in 0, 0, and the size will be
|
||||||
# readjusted
|
# readjusted
|
||||||
|
Loading…
Reference in New Issue
Block a user