@@ -59,14 +59,17 @@ def show(self, widget):
5959 .width (width )
6060 self .right .css ("display" , "block" ).css ("left" , left + width - 2 ).css ("top" , top ) \
6161 .height (height )
62- self .details .css ("display" , "block" ). css ( "left" , left + width ). css ( "top" , top ) \
62+ self .details .css ("display" , "block" ) \
6363 .html (f"""
64- A widget of type { widget .__class__ .__name__ } <ul>
64+ An LTK Python widget of class <tt> { widget .__class__ .__name__ } </tt> <ul>
6565 <li>{ widget .__class__ .__doc__ .replace ("<" , "<" )}
6666 { self .get_attrs (widget )}
6767 <li>{ self .get_creation_link (widget )}
6868 <li>{ widget .children ().length } children
6969 """ )
70+ details_left = max (0 , left - self .details .outerWidth () + 2 ) \
71+ if left + width > find ("body" ).width () * 3 / 4 else left + width - 2
72+ self .details .css ("left" , details_left ).css ("top" , top )
7073
7174 def hide (self ):
7275 """ Hide the highlight """
@@ -98,7 +101,7 @@ def get_creation_link(self, widget):
98101 lineno = caller .f_lineno
99102 abspath = f"{ home } /{ filename } "
100103 url = f"vscode://file:/{ abspath } :{ lineno } "
101- return f"<a href={ url } >{ filename } :{ lineno } </a>"
104+ return f"Created at: <a href={ url } >{ filename } :{ lineno } </a>"
102105
103106 @classmethod
104107 def get_caller (cls ):
0 commit comments