From 63a4bfdb93b02916f8ec717e21c2cfe7253cd279 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Thu, 23 Jul 2020 21:34:49 +0800 Subject: [PATCH] bugfix --- kivyblocks/tab.py | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/kivyblocks/tab.py b/kivyblocks/tab.py index ecb6799..c19c1d0 100644 --- a/kivyblocks/tab.py +++ b/kivyblocks/tab.py @@ -21,6 +21,8 @@ """ from kivy.uix.tabbedpanel import TabbedPanel from kivy.clock import Clock +from kivy.factory import Factory + from kivyblocks.blocks import Blocks class TabsPanel(BGColorBehavior, TabbedPanel): @@ -45,17 +47,8 @@ class TabsPanel(BGColorBehavior, TabbedPanel): desc = d['content'] self.add_tab(text,desc) - w = block.widgetBuild(( -class BLKTabItem(BGColorBehavior, TabbedPanelItem): - def __init__(self,parent,color_level=0,text="",content={}): - self.parent=parent - self.color_level = color_level +Factory.register('TabsPanel',TabsPanel) -class BLKTabedPanel(BGColorBehavior, TabbedPanel): - def __init__(self,color_level=0, tabs=[], **kwargs): - self.tabs_desc = tabs - self.color_level = color_level - TabbedPanel.__init__(**kwargs) - BGColorBehavior.__init__(self) - -class +if __name__ == '__main__': + from kivy.app import App + pass