bugfix
This commit is contained in:
parent
5ee7e534ff
commit
bf2e9bc1e3
@ -533,7 +533,7 @@ class Blocks(EventDispatcher):
|
||||
|
||||
@classmethod
|
||||
def getWidgetById(self,id,from_widget=None):
|
||||
def find_widget_by_id(id, from_widget=None):
|
||||
def find_widget_by_id(id, from_widget):
|
||||
if id=='self':
|
||||
return from_widget
|
||||
if hasattr(from_widget,'widget_id'):
|
||||
@ -547,6 +547,12 @@ class Blocks(EventDispatcher):
|
||||
ret = find_widget_by_id(id,from_widget=c)
|
||||
if ret:
|
||||
return ret
|
||||
app = App.get_running_app()
|
||||
if from_widget == app.root:
|
||||
w = getattr(app,'fs_widget',None)
|
||||
if w:
|
||||
print('full screen ...............................')
|
||||
return find_widget_by_id(id, w)
|
||||
return None
|
||||
ids = id.split('.')
|
||||
app = App.get_running_app()
|
||||
|
@ -1,6 +1,7 @@
|
||||
from kivy.event import EventDispatcher
|
||||
from kivy.core.window import Window
|
||||
from kivy.utils import platform
|
||||
from kivy.app import App
|
||||
from kivy.properties import BooleanProperty
|
||||
|
||||
desktopOSs=[
|
||||
@ -64,8 +65,10 @@ class WidgetReady(EventDispatcher):
|
||||
'no parent.')
|
||||
return
|
||||
|
||||
app = App.get_running_app()
|
||||
if value:
|
||||
Window.fullscreen = True
|
||||
app.fs_widget = self
|
||||
self._fullscreen_state = state = {
|
||||
'parent': self.parent,
|
||||
'pos': self.pos,
|
||||
@ -91,6 +94,7 @@ class WidgetReady(EventDispatcher):
|
||||
self.pos_hint = {}
|
||||
self.size_hint = (1, 1)
|
||||
else:
|
||||
app.fs_widget = None
|
||||
Window.fullscreen = False
|
||||
#if platform in desktopOSs:
|
||||
# Window.restore()
|
||||
|
Loading…
Reference in New Issue
Block a user