Fix tooltips positioning regression,
@@ -1020,18 +1020,23 @@ class ToolTip:
y = y + cy + self.widget.winfo_rooty() + self.widget.winfo_height() + 2
self.tipwindow = tw = tk.Toplevel(self.widget)
if running_on_mac_os():
- tw.wm_geometry("+%d+%d" % (x, y))
try:
# Must be the first thing to do after creating window
# https://wiki.tcl-lang.org/page/MacWindowStyle
- tw.tk.call("::tk::unsupported::MacWindowStyle", "style", tw._w, "help", "noActivates")
+ tw.tk.call(
+ "::tk::unsupported::MacWindowStyle", "style", tw._w, "help", "noActivates"
+ )
except tk.TclError:
pass
else:
tw.wm_overrideredirect(1)
+
+ tw.wm_geometry("+%d+%d" % (x, y))
+
if running_on_mac_os():
# TODO: maybe it's because of Tk 8.5, not because of Mac
tw.wm_transient(self.widget)
+
label = tk.Label(tw, text=self.text, **self.options)
label.pack()
# get_workbench().bind("WindowFocusOut", self.hidetip, True)
