Spyder: Black bar at the top of the spyder 3 IDE causing miss click issue

Created on 24 May 2018  Â·  14Comments  Â·  Source: spyder-ide/spyder

Problem Description

untitled

black bar at the top of the editor.
doesn't seem like a big deal but causes the cursor to click lower than intended.
when i click on a line in the editor it would mark the row below.
i believe this has to do with dpi issues, since i use dual monitors, and when i switch to the other monitor it seems fine. my windows 10 display settings in the "scale and layout" section are set to the same resolution on both screens, although the small screen has the "change the size of text, apps, and other items" box set to 150%. when i change the other screen to 150% as well, it works fine and there is no black bar (but then my entire windows 10 has huge icons and text on the large screen which makes this a very weak solution).

What steps reproduce the problem?

just opening Spyder IDE is enough.

Versions

  • Spyder version: 3.2.8
  • Python version: 3.6.5 64bits
  • Qt version: 5.9.4
  • PyQt version: 5 5.9.2
  • Operating System name/version: windows 10

Dependencies

IPython >=4.0    :  6.3.1 (OK)
cython >=0.21    :  0.28.2 (OK)
jedi >=0.9.0     :  0.12.0 (OK)
nbconvert >=4.0  :  5.3.1 (OK)
numpy >=1.7      :  1.14.2 (OK)
pandas >=0.13.1  :  0.22.0 (OK)
pycodestyle >=2.3:  2.4.0 (OK)
pyflakes >=0.6.0 :  1.6.0 (OK)
pygments >=2.0   :  2.2.0 (OK)
pylint >=0.25    :  1.8.4 (OK)
qtconsole >=4.2.0:  4.3.1 (OK)
rope >=0.9.4     :  0.10.7 (OK)
sphinx >=0.6.6   :  1.7.4 (OK)
sympy >=0.7.3    :  1.1.1 (OK)

Help Invalid Bug

All 14 comments

Hmm, @ccordoba12 could it have something to do with an invisible UI element not scaling properly at such high resolutions, or something like that? Is there anything we can do about it? @YoniPorat What resolutions are your two monitors, exactly?

@CAM-Gerlach thanks for the response.
i am using 1920 x 1080 on both monitors.
also, i was just about to post that i came up with a temporary solution.
if i change the "change the size of text, apps, and other items" box setting to 100% on the small monitor and then sign out of windows 10 (because windows 10 says "some apps won't respond to scaling changes until you sign out"), the Spyder IDE goes back to normal with no black bar at the top. then, i change it back to 150% on the small monitor and do not sign out. so as long as i do not sign out now or restart my computer it will work fine (however i am not sure if this affects other apps currently).

Thanks for the quick followup.

i am using 1920 x 1080 on both monitors.

Okay, that's as standard as you can get. It seems the issue is using different scaling on the two different monitors, and Spyder getting a little confused. Not sure if something can be done about that, though...

@YoniPorat, please close the Help pane and try again.

@ccordoba12 Yup, that fixed it. once the help window was closed the black bar has gone away. there are no miss click issues anymore as well. as long as i don't need help, it all works great! thank you both very much for the help @ccordoba12 @CAM-Gerlach .

@ccordoba12 Should this be closed? Obviously, loosing the help pane is not an acceptable workaround for many (most?) users, but on the other hand this could be considered a OS-side problem with inconsistant scaling, or it otherwise may not be easily fixable on Spyder's side. What's your take?

No, it shouldn't. Are you able to reproduce it? I think this is a Win 10 only problem.

Oops, sorry about that... let me know if you have anymore questions for me.

@YoniPorat, no worries. We need a way to reproduce this so we can fix it, but so far we haven't had time to do it.

Testing on my Windows 10 1709 system with the same versions of anything important and help open, (Spyder 3.2.8, Qt 5.9.4, PyQt 5.9.2, Python 3.6.5 x64, Sphinx 1.7.4, 2x1200p monitors, and the rest generally identical as well), I was only able to partially reproduce it. The best I managed was to get the black bar, but it was on the bottom of the window, not the top, and had no effect on functionality; it just took away a few dozen pixels of vertical real estate and that was it. There were some other graphics glitches though which had more of an impact. @YoniPorat , what version (e.g. 1709) of Windows 10 are you running it on?

It only happens on Qt 5.9, not 5.6 (as did some of the other glitches, or vice-versa), when monitors have different scaling ratios, and when Spyder is on the monitor that has the scaling applied. I tried it on two 1920 x 1200 monitors, and two 1600 x 900 monitors, and experienced exactly the same effects on each; also, which monitor I launched Spyder on didn't cause any differences. Which monitor was the primary when applying a scaling setting (1 is always the primary, 2 is always the secondary, and I tried it on both) did have an impact, but only to one of the other glitches, not the black bar.

Summary of findings and glitches (plain items are good, bold items are bad, italic items are neutral):

In Qt 5.6:

  • No black bar
  • Window title bar never scaled
  • UI Text scaled always based on current monitor scaling
  • UI element size always scaled based on primary monitor scaling
  • Help pane and "Connecting to kernel" display always scaled based on primary monitor scaling

In Qt 5.9:

  • Black bar on scaled monitor
  • Window title bar scaled on scaled monitor, but covers up part of menu bar
  • UI Text scaled always based on current monitor scaling
  • Some UI element sizes always scaled based on current monitor scaling, others based on primary
  • Help pane and "Connecting to kernel" display always scaled based on primary monitor scaling

Also, on both, Spyder would apparently not connect to the kernel on my machine if primary monitor scaling was not 100%

In full, for the record, here are the results:

Qt 5.6 Results

150% Scale on 1 (primary), 100% on 2

Monitor 1:
spyder_150-1_on1_5 6

Monitor 2:
spyder_150-1_on2_5 6

100% Scale on 1 (primary), 150% on 2

Monitor 1:
spyder_150-2_on1_5 6

Monitor 2:
spyder_150-2_on2_5 6

Qt 5.9

150% Scale on 1 (primary), 100% on 2

Monitor 1:
spyder_150-1_on1_5 9

Monitor 2:
spyder_150-1_on2_5 9

100% Scale on 1 (primary), 150% on 2

Monitor 1:
spyder_150-2_on1_5 9

Monitor 2:
spyder_150-2_on2_5 9

@CAM-Gerlach My laptop is running windows 10 version 1709.
also i would like to point out that one of the screens i am using is the laptop screen which is significantly smaller than the other. currently using the lenovo ideapad 510s which has a 14" screen connected to a Samsung SyncMaster S23B300 23" screen (which i mostly use obviously).

As a practical matter, as a better solution than loosing Help (a non-trivial chunk of Spyder's core functionality) a better solution might be simply making the 23 in monitor your primary, scaling the smaller one as desired, and using the larger one for Spyder (and the other for websites, git, anaconda prompt, another text editor, task management, monitoring, etc,. as your workflow requires). You can also scale just Spyder itself using the High DPI options under Preferences > General.

For example, at work where I do data science, where I have one 24 in 16:10 monitor horizontal, then one ~21 in 16:9 vertical, then one ~21 in 4:3 vertical, I put Spyder on the first, with variable explorer windows and my web browser for docs, stack overflow, and other web stuff on the second, and the third split between ConEmu/Cmdr with Git Bash, Anaconda Prompt, etc,. and a text editor (NP++) where I have my task manager, scratchpad, and other ancillary files.

At home where I do Spyder, docs, and website development, where I have 2x 1200p 16:10 24 in monitors both horizontal, I throw Spyder on one and split the other between docs/SO/help, email/comms/Github, Gitbash/Anaconda Prompt in ConEmu, my text editor, and/or a web preview as required for the current project. Of course, your workflow is probably very different from either, but when you have two very different monitors it usually only makes sense to keep Spyder on one or the other and not bounce between too often, which is where this problem comes into play.

My laptop is running windows 10 version 1709.

Thanks; so the same version then.

which is significantly smaller than the other

For these purposes, size doesn't matter, at least physical size that is. An application has no way of reliably determining such, and therefore doesn't care. All that matters in the resolution, and what scaling factor one uses. So long as the resolution of both were identical, or to two very different sized monitors for the purposes of the test, they should all behave identically. (Incidentally, one of the screens I used was also small, a 17 in (44 cm) laptop; the other two were 24 in (61 cm) IPS monitors). In this case, even when I tested different resolutions—1600 x 900, 1920 x 1080 and 1920 x 1200—I got the very same results.

No one else has reported this issue. I would close this.

This was solved by using the software OpenGL renderer in Qt by default.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

spyder-bot picture spyder-bot  Â·  3Comments

dalthviz picture dalthviz  Â·  3Comments

keith-golden picture keith-golden  Â·  3Comments

goanpeca picture goanpeca  Â·  3Comments

cchu08 picture cchu08  Â·  3Comments