mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Add Icon To the tkinter folder picker
This commit is contained in:
parent
1313e31f62
commit
1a65d43569
@ -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
BIN
backend/logo.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 116 KiB |
Loading…
Reference in New Issue
Block a user