Skip to content

Commit

Permalink
Merge pull request #6 from mondeendeguise/cross-platform
Browse files Browse the repository at this point in the history
fix: load icons with PIL before sourcing
  • Loading branch information
xlenore authored Mar 27, 2024
2 parents 08246fc + 57b7221 commit 416732e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from tkinter import filedialog
import tkinter as tk
import os
from PIL import Image
from PIL import Image, ImageTk
import configparser
import pscoverdl
import requests
Expand All @@ -35,7 +35,8 @@ def __init__(self):
icon_path = os.path.join(
os.path.dirname(os.path.realpath(__file__)), "app/icon.ico"
)
self.iconbitmap(icon_path)
icon_photo = ImageTk.PhotoImage(Image.open(icon_path))
self.wm_iconphoto(True, icon_photo)
self.geometry("450x350")
self.resizable(False, False)
self.font = ("MS Sans Serif", 12, "bold")
Expand All @@ -45,10 +46,10 @@ def __init__(self):
image_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "icons")

self.ps1_image = ctk.CTkImage(
Image.open(image_path + "/PS1.png"), size=(20, 20)
Image.open(image_path + "/ps1.png"), size=(20, 20)
)
self.ps2_image = ctk.CTkImage(
Image.open(image_path + "/PS2.png"), size=(20, 20)
Image.open(image_path + "/ps2.png"), size=(20, 20)
)

# region nav frame
Expand Down

0 comments on commit 416732e

Please sign in to comment.