From 9ee2a08700d988b75443c23b37d5be8afd51c913 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Tue, 29 Jun 2021 10:23:30 +0800 Subject: [PATCH] bugfix --- kivyblocks/twosides.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kivyblocks/twosides.py b/kivyblocks/twosides.py index b454629..a8d52ce 100644 --- a/kivyblocks/twosides.py +++ b/kivyblocks/twosides.py @@ -1,6 +1,7 @@ from kivy.clock import Clock from kivy.uix.boxlayout import BoxLayout from kivy.factory import Factory +from kivy.core.window import Window from kivyblocks.ready import WidgetReady @@ -18,10 +19,14 @@ class TwoSides(WidgetReady, BoxLayout): def on_size(self,*args): if self.width >= self.height: + print('twosides.py:Window.rotation=', Window.rotation, + Window.size) if not self.landscape_widget in self.children: self.clear_widgets() self.add_widget(self.landscape_widget) else: + print('twosides.py:Window.rotation=', Window.rotation, + Window.size) if not self.portrait_widget in self.children: self.clear_widgets() self.add_widget(self.portrait_widget)