Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add background_color to show image and show animated image #86

Merged
merged 2 commits into from
Nov 30, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions ovos_utils/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@ def show_text(self, text, title=None, override_idle=None,
override_animations)

def show_image(self, url, caption=None,
title=None, fill=None,
title=None, fill=None, background_color=None,
override_idle=None, override_animations=False):
"""Display a GUI page for viewing an image.

Expand All @@ -827,6 +827,7 @@ def show_image(self, url, caption=None,
title (str): A title to display above the image content
fill (str): Fill type supports 'PreserveAspectFit',
'PreserveAspectCrop', 'Stretch'
background_color (str): A background color for the page
AIIX marked this conversation as resolved.
Show resolved Hide resolved
override_idle (boolean, int):
True: Takes over the resting page indefinitely
(int): Delays resting page for the specified number of
Expand All @@ -839,11 +840,12 @@ def show_image(self, url, caption=None,
self["title"] = title
self["caption"] = caption
self["fill"] = fill
self["background_color"] = background_color
self.show_page("SYSTEM_ImageFrame.qml", override_idle,
override_animations)

def show_animated_image(self, url, caption=None,
title=None, fill=None,
title=None, fill=None, background_color=None,
override_idle=None, override_animations=False):
"""Display a GUI page for viewing an image.

Expand All @@ -865,6 +867,7 @@ def show_animated_image(self, url, caption=None,
self["title"] = title
self["caption"] = caption
self["fill"] = fill
self["background_color"] = background_color
self.show_page("SYSTEM_AnimatedImageFrame.qml", override_idle,
override_animations)

Expand Down