more type hinting, remove some Optional type, and fix a small bug at dialogs.nodeconfig.mac_auto()
This commit is contained in:
parent
6c8a2526d9
commit
c22f1680f7
12 changed files with 59 additions and 52 deletions
|
@ -3,7 +3,7 @@ shape input dialog
|
|||
"""
|
||||
import tkinter as tk
|
||||
from tkinter import font, ttk
|
||||
from typing import TYPE_CHECKING
|
||||
from typing import TYPE_CHECKING, List, Union
|
||||
|
||||
from core.gui.dialogs.colorpicker import ColorPickerDialog
|
||||
from core.gui.dialogs.dialog import Dialog
|
||||
|
@ -167,10 +167,9 @@ class ShapeDialog(Dialog):
|
|||
self.add_text()
|
||||
self.destroy()
|
||||
|
||||
def make_font(self):
|
||||
def make_font(self) -> List[Union[int, str]]:
|
||||
"""
|
||||
create font for text or shape label
|
||||
:return: list(font specifications)
|
||||
"""
|
||||
size = int(self.font_size.get())
|
||||
text_font = [self.font.get(), size]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue