Skip to content

Commit

Permalink
Merge pull request #16 from tisnik/help-button-in-logging-dialog
Browse files Browse the repository at this point in the history
Help button in logging dialog
  • Loading branch information
tisnik authored Jan 16, 2025
2 parents d354717 + 82bfa96 commit d285948
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/gui/dialogs/logging_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import tkinter
from tkinter import ttk

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


Expand Down Expand Up @@ -89,9 +90,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 d285948

Please sign in to comment.