Skip to content

Commit

Permalink
Merge pull request #54 from samirg1/53-images-not-displaying-on-calib…
Browse files Browse the repository at this point in the history
…ration-page

images not displaying on calibration page
  • Loading branch information
samirg1 authored Sep 4, 2023
2 parents b11e80f + 19bfb84 commit cd9bd54
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion exe_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"excludes": ["pytest", "PyQt6", "PyQt5", "cv2", "numpy", "mypy", "test", "email", "pydoc_data", "multiprocessing", "rubicon"],
"packages": ["pyautogui", "pyperclip", "attrs", "pynput"],
"include_msvcr": True,
"include_files": ["autosmx.png"],
"include_files": ["autosmx.png", "src/img"],
}

bdist_mac = {"iconfile": "autosmx.ico", "bundle_name": "AutoSMX"}
Expand Down
Binary file modified src/img/sm_incident_tab.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion src/popups/CalibrationHelpPopup.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
import os
import sys
from tkinter import Message, Misc, ttk

from PIL import Image, ImageTk

from popups.Popup import Popup

_APPLICATION_PATH = os.path.dirname(sys.executable)


class CalibrationHelpPopup(Popup):
def __init__(self, master: Misc | None, image_name: str):
width = 360
super().__init__(master, "Calibration Help", width=width)

img = Image.open(f"src/img/{image_name}.png")
img = Image.open(f"{_APPLICATION_PATH}/img/{image_name}.png")
img = img.resize((width, 500), resample=Image.LANCZOS)
img = ImageTk.PhotoImage(img) # type: ignore
panel = ttk.Label(self, image=img) # type: ignore
Expand Down

0 comments on commit cd9bd54

Please sign in to comment.