Skip to content

Commit

Permalink
Fix png icons for older tkinter versions
Browse files Browse the repository at this point in the history
  • Loading branch information
torzdf committed Jan 26, 2019
1 parent fd5c004 commit 0637523
Showing 1 changed file with 12 additions and 28 deletions.
40 changes: 12 additions & 28 deletions lib/gui/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,35 +175,19 @@ def __init__(self, pathcache=None):
self.previewoutput = None
self.previewtrain = dict()
self.errcount = 0

self.icons = dict()
self.icons["folder"] = tk.PhotoImage(file=os.path.join(
self.pathicons,
"open_folder.png"))
self.icons["load"] = tk.PhotoImage(file=os.path.join(
self.pathicons,
"open_file.png"))
self.icons["context"] = tk.PhotoImage(file=os.path.join(
self.pathicons,
"open_file.png"))
self.icons["save"] = tk.PhotoImage(file=os.path.join(
self.pathicons,
"save.png"))
self.icons["reset"] = tk.PhotoImage(file=os.path.join(
self.pathicons,
"reset.png"))
self.icons["clear"] = tk.PhotoImage(file=os.path.join(
self.pathicons,
"clear.png"))
self.icons["graph"] = tk.PhotoImage(file=os.path.join(
self.pathicons,
"graph.png"))
self.icons["zoom"] = tk.PhotoImage(file=os.path.join(
self.pathicons,
"zoom.png"))
self.icons["move"] = tk.PhotoImage(file=os.path.join(
self.pathicons,
"move.png"))
self.icons["folder"] = ImageTk.PhotoImage(file=os.path.join(
self.pathicons, "open_folder.png"))
self.icons["load"] = ImageTk.PhotoImage(file=os.path.join(
self.pathicons, "open_file.png"))
self.icons["context"] = ImageTk.PhotoImage(file=os.path.join(
self.pathicons, "open_file.png"))
self.icons["save"] = ImageTk.PhotoImage(file=os.path.join(self.pathicons, "save.png"))
self.icons["reset"] = ImageTk.PhotoImage(file=os.path.join(self.pathicons, "reset.png"))
self.icons["clear"] = ImageTk.PhotoImage(file=os.path.join(self.pathicons, "clear.png"))
self.icons["graph"] = ImageTk.PhotoImage(file=os.path.join(self.pathicons, "graph.png"))
self.icons["zoom"] = ImageTk.PhotoImage(file=os.path.join(self.pathicons, "zoom.png"))
self.icons["move"] = ImageTk.PhotoImage(file=os.path.join(self.pathicons, "move.png"))
logger.debug("Initialized %s: (icons: %s)", self.__class__.__name__, self.icons)

def delete_preview(self):
Expand Down

0 comments on commit 0637523

Please sign in to comment.