From bcb7bf4a10a632032043e9d7805b08fc6835518a Mon Sep 17 00:00:00 2001 From: Blake Harnden Date: Sun, 15 Sep 2019 16:38:12 -0700 Subject: [PATCH] coretk change to set a core-icon --- coretk/coretk/app.py | 18 ++++++++++++------ coretk/coretk/core-icon.png | Bin 0 -> 2931 bytes 2 files changed, 12 insertions(+), 6 deletions(-) create mode 100644 coretk/coretk/core-icon.png diff --git a/coretk/coretk/app.py b/coretk/coretk/app.py index cc664923..5957054a 100644 --- a/coretk/coretk/app.py +++ b/coretk/coretk/app.py @@ -1,4 +1,5 @@ import tkinter as tk +from PIL import Image, ImageTk from coretk.graph import CanvasGraph @@ -6,18 +7,27 @@ from coretk.graph import CanvasGraph class Application(tk.Frame): def __init__(self, master=None): super().__init__(master) + self.master.title("CORE") + self.master.geometry("800x600") + self.master.state("zoomed") + self.set_icon() self.pack(fill=tk.BOTH, expand=1) self.images = [] self.menubar = None self.create_menu() self.create_widgets() + def set_icon(self): + image = Image.open("core-icon.png") + tk_image = ImageTk.PhotoImage(image) + self.master.tk.call("wm", "iconphoto", self.master._w, tk_image) + def create_menu(self): self.master.option_add("*tearOff", tk.FALSE) self.menubar = tk.Menu(self.master) file_menu = tk.Menu(self.menubar) file_menu.add_command(label="Open") - file_menu.add_command(label="Exit", command=root.quit) + file_menu.add_command(label="Exit", command=self.master.quit) self.menubar.add_cascade(label="File", menu=file_menu) help_menu = tk.Menu(self.menubar) self.menubar.add_cascade(label="Help", menu=help_menu) @@ -60,9 +70,5 @@ class Application(tk.Frame): if __name__ == "__main__": - root = tk.Tk() - root.title("Graph Canvas") - root.geometry("800x600") - root.state("zoomed") - app = Application(master=root) + app = Application() app.mainloop() diff --git a/coretk/coretk/core-icon.png b/coretk/coretk/core-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..0b0ff5aa3a51f71807691032f516d7a15d7da896 GIT binary patch literal 2931 zcmV-(3yk!MP)O2x6XXC0pBbvv5f}@T(BXrBb?NUYTVXBwzz2H$ZZs<%|)6z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