change some variable names to be more informative, add an image to error dialog
This commit is contained in:
parent
0407645061
commit
ee0c63e4a1
9 changed files with 23 additions and 20 deletions
|
@ -1,6 +1,8 @@
|
|||
from tkinter import ttk
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from core.gui.dialogs.dialog import Dialog
|
||||
from core.gui.images import ImageEnum, Images
|
||||
from core.gui.widgets import CodeText
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
@ -18,10 +20,14 @@ class ErrorDialog(Dialog):
|
|||
def draw(self):
|
||||
self.top.columnconfigure(0, weight=1)
|
||||
self.top.rowconfigure(0, weight=1)
|
||||
image = Images.get(ImageEnum.ERROR, 36)
|
||||
label = ttk.Label(self.top, image=image)
|
||||
label.image = image
|
||||
label.grid(row=0, column=0)
|
||||
self.error_message = CodeText(self.top)
|
||||
self.error_message.text.insert("1.0", self.details)
|
||||
self.error_message.text.config(state="disabled")
|
||||
self.error_message.grid(row=0, column=0, sticky="nsew")
|
||||
self.error_message.grid(row=1, column=0, sticky="nsew")
|
||||
|
||||
|
||||
def show_grpc_error(e: "grpc.RpcError", master, app: "Application"):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue