bugfix
This commit is contained in:
parent
09dc73554e
commit
d9f56aa96a
@ -6,31 +6,6 @@ from kivy.uix.label import Label
|
|||||||
from kivy.app import App
|
from kivy.app import App
|
||||||
from .utils import CSize
|
from .utils import CSize
|
||||||
|
|
||||||
class TwinShapeMenuBar(BoxLayout):
|
|
||||||
def __init__(self,**kw):
|
|
||||||
pass
|
|
||||||
|
|
||||||
class MultiPanel(BoxLayout):
|
|
||||||
def __init__(self,bar_width=CSize(2),**kw):
|
|
||||||
BoxLayout.__init__(self,**kw)
|
|
||||||
self.panels = []
|
|
||||||
self.bar_width = bar_width
|
|
||||||
self.menubar = TwinShapeMenuBar(self,bar_width=bar_width)
|
|
||||||
self.cur_panel = None
|
|
||||||
self.bind(on_size=self.sizeChanged)
|
|
||||||
|
|
||||||
def sizeChanged(self,*args):
|
|
||||||
if len(self.panels) == 0:
|
|
||||||
return
|
|
||||||
if len(self.panels) == 1:
|
|
||||||
self.cur_panel.height = self.height - self.menubar.height
|
|
||||||
self.cur_panel.width = self.height - self.menubar.width
|
|
||||||
return
|
|
||||||
|
|
||||||
self.menubar.sizeChanged(self)
|
|
||||||
self.cur_panel.height = self.height - self.menubar.height
|
|
||||||
self.cur_panel.width = self.height - self.menubar.width
|
|
||||||
|
|
||||||
class PageContainer(FloatLayout):
|
class PageContainer(FloatLayout):
|
||||||
def __init__(self,**kw):
|
def __init__(self,**kw):
|
||||||
super().__init__(**kw)
|
super().__init__(**kw)
|
||||||
|
@ -217,7 +217,3 @@ class ToolPage(BGColorBehavior, BoxLayout):
|
|||||||
self.add_widget(self.content)
|
self.add_widget(self.content)
|
||||||
self.add_widget(self.toolbar)
|
self.add_widget(self.toolbar)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
from blocksapp import BlocksApp
|
|
||||||
app = BlocksApp()
|
|
||||||
app.run()
|
|
||||||
|
Loading…
Reference in New Issue
Block a user