Skip to content

Commit

Permalink
Update DisplayKeys-IS.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Neuffexx authored Jul 16, 2023
1 parent 7283561 commit 1ebf516
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ProjectFiles/DisplayKeys-IS.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def __init__(self):
print("---Creating Window---")
self.window = tk.Tk()
self.window.title("DisplayKeys-IS")
icon_path = "./Preview.png" #sys._MEIPASS + "./DisplayKeys-IS.ico"
icon_path = sys._MEIPASS + "./DisplayKeys-IS.ico"
self.window.iconbitmap(icon_path)
self.window.geometry("600x600")
self.window.resizable(False, False)
Expand Down Expand Up @@ -201,7 +201,7 @@ class DisplayKeys_Previewer:
def __init__(self, parent, width, height):
self.width = width
self.height = height
self.image_path = "./Preview.png" #sys._MEIPASS + "./Preview.png"
self.image_path = sys._MEIPASS + "./Preview.png"

# Initialize canvas
self.canvas = tk.Canvas(parent, width=self.width, height=self.height, background="#151515", highlightthickness=3, highlightbackground="#343A40")
Expand Down Expand Up @@ -532,7 +532,7 @@ def process_image(widget_id):
if get_params_type_widget.dropdown_var.get() == "Defaults":
image_path = get_image_widget.textbox.get()
if not image_path:
image_path = "./Preview.png" #sys._MEIPASS + "./Preview.png"
image_path = sys._MEIPASS + "./Preview.png"
output_dir = get_output_widget.textbox.get() if get_output_widget.textbox.get() else None
if not output_dir:
output_dir = os.path.join(os.path.expanduser("~"), "Desktop")
Expand All @@ -549,7 +549,7 @@ def process_image(widget_id):
gap = int(get_gap_widget.spinbox.get()) if get_gap_widget.spinbox.get().isnumeric() else None

if not image_path:
image_path = "./Preview.png" #sys._MEIPASS + "./Preview.png"
image_path = sys._MEIPASS + "./Preview.png"
if not output_dir:
output_dir = os.path.join(os.path.expanduser("~"), "Desktop")
if not rows:
Expand Down Expand Up @@ -597,7 +597,7 @@ def process_preview(widget_id):
if get_params_type_widget.dropdown_var.get() == "Defaults":
image_path = get_image_widget.textbox.get()
if not image_path:
image_path = "./Preview.png" #sys._MEIPASS + "./Preview.png"
image_path = sys._MEIPASS + "./Preview.png"
rows = int(get_rows_widget.spinbox_default)
columns = int(get_columns_widget.spinbox_default)
gap = int(get_gap_widget.spinbox_default)
Expand All @@ -610,7 +610,7 @@ def process_preview(widget_id):
gap = int(get_gap_widget.spinbox.get()) if get_gap_widget.spinbox.get().isnumeric() else None

if not image_path:
image_path = "./Preview.png" #sys._MEIPASS + "./Preview.png"
image_path = sys._MEIPASS + "./Preview.png"
else:
# Temporarily set the text entry widget to normal state to update its value
get_image_widget.textbox.configure(state="normal")
Expand Down

0 comments on commit 1ebf516

Please sign in to comment.