Skip to content

Commit

Permalink
Help button in default model dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
tisnik committed Jan 13, 2025
1 parent fac2b1d commit b61e823
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/gui/dialogs/default_model_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import tkinter

from gui.dialogs.help_dialog import show_help
from gui.icons import Icons


Expand Down Expand Up @@ -33,9 +34,24 @@ def __init__(self, parent: tkinter.Toplevel, icons: Icons) -> None:
width=200,
)
ok_button.grid(row=2, column=1, sticky="W", padx=10, pady=10)

help_button = tkinter.Button(
self,
text="Help",
command=self.help,
compound="left",
image=self.icons.help_faq_icon,
width=200,
)
help_button.grid(row=2, column=2, sticky="W", padx=10, pady=10)

# get the focus
ok_button.focus_set()

def ok(self) -> None:
"""Handle Ok button press."""
self.destroy()

def help(self) -> None:
"""Handle Help button press."""
show_help()

0 comments on commit b61e823

Please sign in to comment.