daemon/gui: coverted remaining usages of old string formatting to f strings
This commit is contained in:
parent
4dba1bbe32
commit
899800b925
3 changed files with 10 additions and 10 deletions
|
@ -29,7 +29,7 @@ class CanvasTooltip:
|
|||
*,
|
||||
pad: tuple[int, int, int, int] = (5, 3, 5, 3),
|
||||
waittime: int = 400,
|
||||
wraplength: int = 600
|
||||
wraplength: int = 600,
|
||||
) -> None:
|
||||
# in miliseconds, originally 500
|
||||
self.waittime: int = waittime
|
||||
|
@ -64,7 +64,7 @@ class CanvasTooltip:
|
|||
label: ttk.Label,
|
||||
*,
|
||||
tip_delta: tuple[int, int] = (10, 5),
|
||||
pad: tuple[int, int, int, int] = (5, 3, 5, 3)
|
||||
pad: tuple[int, int, int, int] = (5, 3, 5, 3),
|
||||
):
|
||||
c = canvas
|
||||
s_width, s_height = c.winfo_screenwidth(), c.winfo_screenheight()
|
||||
|
@ -112,7 +112,7 @@ class CanvasTooltip:
|
|||
)
|
||||
label.grid(padx=(pad[0], pad[2]), pady=(pad[1], pad[3]), sticky=tk.NSEW)
|
||||
x, y = tip_pos_calculator(canvas, label, pad=pad)
|
||||
self.tw.wm_geometry("+%d+%d" % (x, y))
|
||||
self.tw.wm_geometry(f"+{x:d}+{y:d}")
|
||||
|
||||
def hide(self) -> None:
|
||||
if self.tw:
|
||||
|
|
|
@ -42,7 +42,7 @@ class Tooltip:
|
|||
y += self.widget.winfo_rooty() + 32
|
||||
self.tw = tk.Toplevel(self.widget)
|
||||
self.tw.wm_overrideredirect(True)
|
||||
self.tw.wm_geometry("+%d+%d" % (x, y))
|
||||
self.tw.wm_geometry(f"+{x:d}+{y:d}")
|
||||
self.tw.rowconfigure(0, weight=1)
|
||||
self.tw.columnconfigure(0, weight=1)
|
||||
frame = ttk.Frame(self.tw, style=Styles.tooltip_frame, padding=3)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue