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

chore: use empty.png from resources folder #20

Closed
Show file tree
Hide file tree
Changes from all commits
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
Empty file.
5 changes: 4 additions & 1 deletion asp_interactive_configuration/ooasp/ui.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# Copyright (c) 2022 Siemens AG Oesterreich
# SPDX-License-Identifier: MIT

from importlib import resources
import ipywidgets as widgets
from ipywidgets import Button, VBox, Label, Layout,GridspecLayout, HTML
from IPython.display import display, Image
import ooasp.resources

def basic_layout():
return VBox(layout=Layout(height='auto', width='auto'))
Expand Down Expand Up @@ -119,7 +121,8 @@ def set_found_config(self):
Sets the found configuration image
"""
if self.iconf.found_config is None:
image = Image(f"out/empty.png")
path = resources.files(ooasp.resources).joinpath("empty.png")
image = Image(str(path))
self.found_config.value = image.data
else:
self.iconf.found_config.save_png("out/found/")
Expand Down