qtconsole icon indicating copy to clipboard operation
qtconsole copied to clipboard

Calltips too close to text being typed.

Open daver1691 opened this issue 6 years ago • 4 comments

I like the idea of the calltips appearing on open parenthesis, but the popup is too close to the text being typed on my system (Ubuntu 18.04, jupyter qtconsole 4.3.1).

The corner of the calltips popup box is commonly in actual contact with the text, and occasionally a pixel or two over the top of the text being typed. Also, if using the KDE desktop, the "drop-shadow" that appears around pop-ups will darken the text area. Personally, I'd be perfectly happy with it if it were close but not touching, maybe 20 pixels away, but as it is I have to disable calltips altogether.

daver1691 avatar Sep 27 '18 16:09 daver1691

You're welcome to improve the situation.

ccordoba12 avatar Sep 28 '18 00:09 ccordoba12

I didn't look at the code because I normally find that application software that uses desktop widgets to be far beyond my meager coding skills, but in this case I'll grant that it was remarkably easy to find, which is a tribute to this code being well written and the general ease-of-use of Python.

Line 156 of call_tip_widget.py. I recommend that padding number be bumped up from 3 to 20.

I've fixed it on my system, but a web-search shows I'm not the only one to find it too close as it stands. Here, for example:

https://stackoverflow.com/questions/23820926

I think that some desktops add a border to popups and that there's probably a pixel or two of jitter, so that padding of 3 pixels often turns into a padding of no pixels — or a pixel or two of overlap.

daver1691 avatar Sep 29 '18 13:09 daver1691

Today, Sep 18 2019

$ grep 'padding =' .../qtconsole-4.5.4-py_0/site-packages/qtconsole/call_tip_widget.py
        padding = 3 # Distance in pixels between cursor bounds and tip box.
$ ```

boffi avatar Sep 18 '19 10:09 boffi

As I said above, you're welcome to improve the situation.

ccordoba12 avatar Sep 18 '19 12:09 ccordoba12