This commit is contained in:
yumoqing 2021-01-23 03:38:52 +08:00
parent 055c3d3699
commit a40113c5d6
2 changed files with 5 additions and 1 deletions

View File

@ -148,6 +148,7 @@ class Text(Label):
} }
fontsize = {'font_size': CSize(1) + offset.get(texttype,0)} fontsize = {'font_size': CSize(1) + offset.get(texttype,0)}
self._i18n = i18n self._i18n = i18n
self.i18n = I18n()
self.bgcolor = fgcolor self.bgcolor = fgcolor
kwargs = kw.copy() kwargs = kw.copy()
config = getConfig() config = getConfig()
@ -218,6 +219,9 @@ class Modal(BGColorBehavior, ModalView):
BGColorBehavior.__init__(self, color_level=color_level, BGColorBehavior.__init__(self, color_level=color_level,
radius=radius) radius=radius)
self.auto_open = auto_open self.auto_open = auto_open
def add_widget(self,w, *args, **kw):
super().add_widget(w, *args, **kw)
if self.auto_open: if self.auto_open:
self.open() self.open()

View File

@ -24,7 +24,7 @@ class NewVideo(BGColorBehavior, Video):
set_log_callback(self.ffplayerLog) set_log_callback(self.ffplayerLog)
self.register_event_type('on_open_failed') self.register_event_type('on_open_failed')
def on_open_failed(self, o, source): def on_open_failed(self, source, x=None):
print('source=',source, 'open failed') print('source=',source, 'open failed')
def ffplayerLog(self, msg, level): def ffplayerLog(self, msg, level):