Skip to content

Commit

Permalink
Merge pull request #14 from erivlis/13-tkinter-exception-thrown-in-ex…
Browse files Browse the repository at this point in the history
…ample-code

13 tkinter exception thrown in example code
  • Loading branch information
erivlis authored Nov 27, 2023
2 parents 160f5fd + 6969c6c commit d4b4c58
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
12 changes: 6 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ dependencies = [
"click==8.1.7",
"inflect==7.0.0",
"loguru==0.7.2",
"matplotlib==3.8.1",
"matplotlib==3.8.2",
"networkx==3.2.1",
"strawberry-graphql[asgi,opentelemetry]==0.213.0"
]
Expand Down Expand Up @@ -59,19 +59,19 @@ docs = [
"mkdocs-section-index",
]
test = [
"faker>=19.6.2",
"pytest>=7.4.2",
"faker>=20.0.3",
"pytest>=7.4.3",
"pytest-asyncio>=0.21.1",
"pytest-cov>=4.1.0",
"pytest-randomly>=3.15.0",
"pytest-xdist>=3.3.1"
"pytest-xdist>=3.5.0"
]
plot = [
"scipy>=1.11.3"
"scipy>=1.11.4"
]
server = [
"starlette-prometheus",
"uvicorn[standard]>=0.23.2"
"uvicorn[standard]>=0.24.0"
]


Expand Down
9 changes: 6 additions & 3 deletions src/graphinate/tools/gui.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
import platform
import tkinter as tk
from tkinter import ttk as ttk


def _modal_window(title: str) -> tk.Tk: # pragma: no cover
# Creating parent Tkinter window
"""Creating a parent Tkinter modal window"""
win = tk.Tk()
# win.geometry("200x125")
win.title(title)
win.wm_attributes('-toolwindow', 'True')

if platform.system().lower() == 'windows':
win.wm_attributes('-toolwindow', 'True')

win.wm_attributes('-topmost', 'True')
win.resizable(False, False)
return win


def modal_radiobutton_chooser(window_title: str, options: dict, default=None): # pragma: no cover
# Creating parent Tkinter window
win = _modal_window(window_title)

# let us create a Tkinter string variable
Expand Down

0 comments on commit d4b4c58

Please sign in to comment.