Skip to content

Commit

Permalink
fix: pass duration with value of 0 to Screen's transition runner …
Browse files Browse the repository at this point in the history
…to avoid flickering of the screen
  • Loading branch information
sassanh committed Jul 2, 2024
1 parent fada3d1 commit f421616
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## Version 0.11.14

- fix: pass duration with value of `0` to `Screen`'s transition runner to avoid
flickering of the screen

## Version 0.11.13

- build: update headless-kivy-pi to the latest version
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "ubo-gui"
version = "0.11.13"
version = "0.11.14"
description = "GUI sdk for Ubo Pod"
authors = ["Sassan Haradji <[email protected]>"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion ubo_gui/menu/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ def handle_items_change(items: Sequence[Item]) -> None:
)
self.current_menu_items = items
self._render_items()
if last_items:
if last_items is not None:
self._switch_to(
self.current_screen,
transition=self._no_transition,
Expand Down
4 changes: 2 additions & 2 deletions ubo_gui/menu/transitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ def _perform_switch(
mainthread(self.screen_manager.switch_to)(
screen,
transition=transition,
**({'duration': duration} if duration else {}),
**({'direction': direction} if direction else {}),
duration=duration,
**({} if direction is None else {'direction': direction}),
)

def _switch_to(
Expand Down

0 comments on commit f421616

Please sign in to comment.