bugfix
This commit is contained in:
parent
09dc73554e
commit
d9f56aa96a
@ -93,19 +93,19 @@ def closeWorkers():
|
||||
app.workers.running = False
|
||||
|
||||
def appBlocksHack(app):
|
||||
config = getConfig()
|
||||
# app.on_close = on_close
|
||||
app.getAuthHeader = getAuthHeader
|
||||
app.__del__ = closeWorkers
|
||||
Window.bind(on_request_close=app.on_close)
|
||||
app.serverinfo = ServerInfo()
|
||||
app.title = 'Test Title'
|
||||
app.blocks = Blocks()
|
||||
app.workers = Workers(maxworkers=config.maxworkers or 80)
|
||||
app.workers.start()
|
||||
app.hc = HttpClient()
|
||||
WindowBase.softinput_mode='below_target'
|
||||
|
||||
config = getConfig()
|
||||
# app.on_close = on_close
|
||||
app.getAuthHeader = getAuthHeader
|
||||
app.__del__ = closeWorkers
|
||||
Window.bind(on_request_close=app.on_close)
|
||||
app.serverinfo = ServerInfo()
|
||||
app.title = 'Test Title'
|
||||
app.blocks = Blocks()
|
||||
app.workers = Workers(maxworkers=config.maxworkers or 80)
|
||||
app.workers.start()
|
||||
app.hc = HttpClient()
|
||||
WindowBase.softinput_mode='below_target'
|
||||
|
||||
class BlocksApp(App):
|
||||
def build(self):
|
||||
appBlocksHack(self)
|
||||
|
@ -6,31 +6,6 @@ from kivy.uix.label import Label
|
||||
from kivy.app import App
|
||||
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):
|
||||
def __init__(self,**kw):
|
||||
super().__init__(**kw)
|
||||
|
@ -217,7 +217,3 @@ class ToolPage(BGColorBehavior, BoxLayout):
|
||||
self.add_widget(self.content)
|
||||
self.add_widget(self.toolbar)
|
||||
|
||||
if __name__ == '__main__':
|
||||
from blocksapp import BlocksApp
|
||||
app = BlocksApp()
|
||||
app.run()
|
||||
|
Loading…
Reference in New Issue
Block a user