fixes and update on animated icon contexmanager gitea and menu_bar

This commit is contained in:
2025-08-13 22:21:03 +02:00
parent 864ad63bf8
commit 0d3eff772e
2 changed files with 21 additions and 9 deletions

View File

@@ -837,16 +837,16 @@ class Translate:
@contextmanager
def message_box_animation(animated_icon):
"""
A context manager to handle starting and stopping an animated icon
A context manager to handle pausing and resuming an animated icon
around an operation like showing a message box.
Args:
animated_icon: The animated icon object with start() and stop() methods.
animated_icon: The animated icon object with pause() and resume() methods.
"""
if animated_icon:
animated_icon.stop()
animated_icon.pause()
try:
yield
finally:
if animated_icon:
animated_icon.start()
animated_icon.resume()