Add Icon To the tkinter folder picker

This commit is contained in:
blessedcoolant 2022-12-27 17:24:29 +13:00
parent 1313e31f62
commit 1a65d43569
2 changed files with 6 additions and 1 deletions

View File

@ -10,6 +10,7 @@ import base64
import os
import json
import tkinter as tk
import sys
from werkzeug.utils import secure_filename
from flask import Flask, redirect, send_from_directory, request, make_response
@ -304,11 +305,15 @@ class InvokeAIWebServer:
try:
# Using tkinter to get the filepath because JS doesn't allow
root = tk.Tk()
root.iconify() # for macos
root.title('InvokeAI')
root.withdraw()
root.iconbitmap(default=os.path.join(os.getcwd(), '../backend/logo.ico'))
if root.wm_state() == 'withdrawn':
root.iconify()
root.wm_attributes('-topmost', 1)
root.focus_force()
search_folder = filedialog.askdirectory(parent=root, title='Select Checkpoint Folder')
root.quit()
root.destroy()
if not search_folder:

BIN
backend/logo.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB