From 93000ad55038b798dadb49efda33cd3333f6ce39 Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 5 Dec 2023 19:01:02 +0100 Subject: [PATCH] fix white flash before first tutorial screen --- screens/tutorial.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/screens/tutorial.py b/screens/tutorial.py index 20ab1f5..09f8997 100644 --- a/screens/tutorial.py +++ b/screens/tutorial.py @@ -37,10 +37,11 @@ def __init__(self, **kw): font_name=PATH_TEXT_FONT, **kw) - def on_enter(self, *args): + def on_pre_enter(self, *args): self.ids.tutorial_text.text = TEXT.tutorial[self.counter_tutorial][0] - self.path_tutorial_image = PATH_IMAGES_TUTORIAL + TEXT.tutorial[self.counter_tutorial][1] + ".jpg" - return super().on_enter(*args) + self.path_tutorial_image = PATH_IMAGES_TUTORIAL + \ + TEXT.tutorial[self.counter_tutorial][1] + ".jpg" + return super().on_pre_enter(*args) def go_to_previous_slide(self): """ @@ -61,7 +62,8 @@ def go_to_previous_slide(self): else: self.counter_tutorial -= 1 self.ids.tutorial_text.text = TEXT.tutorial[self.counter_tutorial][0] - self.path_tutorial_image = PATH_IMAGES_TUTORIAL + TEXT.tutorial[self.counter_tutorial][1] + ".jpg" + self.path_tutorial_image = PATH_IMAGES_TUTORIAL + \ + TEXT.tutorial[self.counter_tutorial][1] + ".jpg" def go_to_next_slide(self): """ @@ -92,4 +94,5 @@ def go_to_next_slide(self): else: self.ids.tutorial_text.text = TEXT.tutorial[self.counter_tutorial][0] - self.path_tutorial_image = PATH_IMAGES_TUTORIAL + TEXT.tutorial[self.counter_tutorial][1] + ".jpg" + self.path_tutorial_image = PATH_IMAGES_TUTORIAL + \ + TEXT.tutorial[self.counter_tutorial][1] + ".jpg"