bugfix
This commit is contained in:
parent
63a4bfdb93
commit
f0061e1918
@ -67,6 +67,7 @@ from .charts.bar import Bar
|
|||||||
from .bgcolorbehavior import BGColorBehavior
|
from .bgcolorbehavior import BGColorBehavior
|
||||||
from .utils import NeedLogin, InsufficientPrivilege, HTTPError
|
from .utils import NeedLogin, InsufficientPrivilege, HTTPError
|
||||||
from .login import LoginForm
|
from .login import LoginForm
|
||||||
|
from .tab import TabsPanel
|
||||||
if platform == 'android':
|
if platform == 'android':
|
||||||
from .widgetExt.phonebutton import PhoneButton
|
from .widgetExt.phonebutton import PhoneButton
|
||||||
from .widgetExt.androidwebview import AWebView
|
from .widgetExt.androidwebview import AWebView
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
"""
|
"""
|
||||||
{
|
{
|
||||||
"widgettype":"BLKTabbedPanel",
|
"widgettype":"TabsPanel",
|
||||||
"options":{
|
"options":{
|
||||||
"tab_pos":"top_left"
|
"tab_pos":"top_left"
|
||||||
},
|
|
||||||
"tabs":[
|
"tabs":[
|
||||||
{
|
{
|
||||||
"text":"tab1",
|
"text":"tab1",
|
||||||
@ -17,13 +16,14 @@
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
from kivy.uix.tabbedpanel import TabbedPanel
|
from kivy.uix.tabbedpanel import TabbedPanel
|
||||||
from kivy.clock import Clock
|
from kivy.clock import Clock
|
||||||
from kivy.factory import Factory
|
from kivy.factory import Factory
|
||||||
|
|
||||||
from kivyblocks.blocks import Blocks
|
from .bgcolorbehavior import BGColorBehavior
|
||||||
|
|
||||||
class TabsPanel(BGColorBehavior, TabbedPanel):
|
class TabsPanel(BGColorBehavior, TabbedPanel):
|
||||||
def __init__(self,**options):
|
def __init__(self,**options):
|
||||||
@ -37,7 +37,7 @@ class TabsPanel(BGColorBehavior, TabbedPanel):
|
|||||||
def add_tab(self,text,desc):
|
def add_tab(self,text,desc):
|
||||||
def add(o,w):
|
def add(o,w):
|
||||||
self.add_widget(TabbedPanelItem(text=text,content=w))
|
self.add_widget(TabbedPanelItem(text=text,content=w))
|
||||||
blocks = Blocks()
|
blocks = Factory.Blocks()
|
||||||
blocks.bind(on_built=add)
|
blocks.bind(on_built=add)
|
||||||
blocks.widgetBuild(desc,ancestor=self)
|
blocks.widgetBuild(desc,ancestor=self)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user