diff --git a/kivyblocks/blocksapp.py b/kivyblocks/blocksapp.py index 71fc23c..7046c9b 100644 --- a/kivyblocks/blocksapp.py +++ b/kivyblocks/blocksapp.py @@ -111,6 +111,11 @@ class BlocksApp(App): self.buildCsses(d) Logger.info('blocksapp: csses=%s', self.csses) + def on_rotate(self,*largs): + self.current_rotation = Window.rotation + Logger.info('BlocksApp:on_rotate(), largs=%s', + self.current_rotation) + def buildCsses(self, dic): for k,v in dic.items(): if isinstance(v,dict): @@ -141,6 +146,7 @@ class BlocksApp(App): } self.public_headers = {} Window.bind(on_request_close=self.on_close) + Window.bind(on_rotate=self.rotate) Window.bind(size=self.device_info) self.workers = Workers(maxworkers=config.maxworkers or 80) self.workers.start() diff --git a/kivyblocks/xcamera/xcamera.py b/kivyblocks/xcamera/xcamera.py index f08871d..88088ad 100644 --- a/kivyblocks/xcamera/xcamera.py +++ b/kivyblocks/xcamera/xcamera.py @@ -65,7 +65,7 @@ class XCamera(Camera): __events__ = ('on_picture_taken', 'on_camera_ready') def __init__(self, **kwargs): - Builder.load_file(os.path.join(ROOT, "xcamera.kv")) + # Builder.load_file(os.path.join(ROOT, "xcamera.kv")) super().__init__(**kwargs) def _on_index(self, *largs):