Spyder: Spyder looks terrible on a very high resolution screen

Created on 1 Apr 2017  Â·  44Comments  Â·  Source: spyder-ide/spyder

Description of your problem

image
Display scaling is on, but my text on the tabs and the like are really tiny? I also cannot drop the reso as it causes issues on this laptop, my laptop is new but is super buggy and I really don't have time to exchange it and what not.
What steps will reproduce the problem?

  1. Leaving the com at original reso


    1. 3.

What is the expected output? What do you see instead?

Please provide any additional information below

Versions and main components

  • Spyder Version: 3.1.2
  • Python Version: 2.7
  • Qt Version: 5.6.2
  • PyQt Version: 5.6
  • Operating system: Windows 10

Dependencies

Please go to the menu entry Help > Optional Dependencies (or
Help > Dependencies), press the button Copy to clipboard
and paste the contents below:
jedi >=0.8.1 : 0.9.0 (OK)
matplotlib >=1.0 : 2.0.0 (OK)
nbconvert >=4.0 : 4.2.0 (OK)
numpy >=1.7 : 1.11.3 (OK)
pandas >=0.13.1 : 0.19.2 (OK)
pep8 >=0.6 : 1.7.0 (OK)
pyflakes >=0.5.0 : 1.5.0 (OK)
pygments >=2.0 : 2.1.3 (OK)
pylint >=0.25 : 1.6.4 (OK)
qtconsole >=4.2.0: 4.2.1 (OK)
rope >=0.9.4 : 0.9.4 (OK)
sphinx >=0.6.6 : 1.5.1 (OK)
sympy >=0.7.3 : 1.0 (OK)

I really don't know my way around spyder and I'm a student, so a super idiot proof guide would really help, thanks! I also don't know how to mess around with it much; nor can I ><

Preferences Ui Ux-usability Enhancement

Most helpful comment

I get the following results:

Turn OFF high dpi scaling in spyder preferences menu (so UNtick the tickmark item) and start with
QT_SCALE_FACTOR=2.5 spyder
This is the best solution and solves my problems as it scales up everything nicely (buttons plus fonts)
image

Turn ON high dpi scaling in spyder preferences menu (so tick the tickmark item) and start with
QT_SCALE_FACTOR=2.5 spyder
This increases the size of the button bar only but doesn't scale the font in the menu or window borders
image

Turn OFF high dpi scaling in spyder preferences menu (so Untick the tickmark item) and start with
QT_SCALE_FACTOR=1 spyder
Now everything is tiny - spyder is not using any of the up-scaling from the Unity environment. This is the default setting if a new user starts Spyder for the first time with a hi dpi screen.
image

Turn ON high dpi scaling in spyder preferences menu (so tick the tickmark item) and start with
QT_SCALE_FACTOR=1 spyder
This increases the size of the button bar only (as before) but doesn't scale the font in the menu or window borders
image

So I think if you add QT_SCALE_FACTOR=2.5 to the preference menu users could scale everything according to what they need. The current hidpi adjustment only scales the buttons, and is therefore less helpful in my case.

All 44 comments

I have no idea why that's happening, sorry. What's your screen resolution?

Same problem on a Dell XPS 13, high dpi laptop under Ubuntu 16.10 with high-dpi scaling on. Ubuntu Unity has a central scaling option for high dpi screens.
The button size in spyder is okay, editor and command window fonts are okay, but the fonts in the window frames and the menu entries are tiny - just like in the screenshot above.
I run Python 3.6.1 - Anaconda custom (64-bit) distribution with qt 5.6.2 and Spyder Version: 3.1.3

@juejung, what if you run Spyder like this?

QT_SCALE_FACTOR=1.5 spyder

You can adjust your scale factor according to Ubuntu settings (in this case it's 150%).

If this works for you, we can add an entry in our Preferences so that people can adjust this factor by hand.

I get the following results:

Turn OFF high dpi scaling in spyder preferences menu (so UNtick the tickmark item) and start with
QT_SCALE_FACTOR=2.5 spyder
This is the best solution and solves my problems as it scales up everything nicely (buttons plus fonts)
image

Turn ON high dpi scaling in spyder preferences menu (so tick the tickmark item) and start with
QT_SCALE_FACTOR=2.5 spyder
This increases the size of the button bar only but doesn't scale the font in the menu or window borders
image

Turn OFF high dpi scaling in spyder preferences menu (so Untick the tickmark item) and start with
QT_SCALE_FACTOR=1 spyder
Now everything is tiny - spyder is not using any of the up-scaling from the Unity environment. This is the default setting if a new user starts Spyder for the first time with a hi dpi screen.
image

Turn ON high dpi scaling in spyder preferences menu (so tick the tickmark item) and start with
QT_SCALE_FACTOR=1 spyder
This increases the size of the button bar only (as before) but doesn't scale the font in the menu or window borders
image

So I think if you add QT_SCALE_FACTOR=2.5 to the preference menu users could scale everything according to what they need. The current hidpi adjustment only scales the buttons, and is therefore less helpful in my case.

@juejung this information is very useful!, thanks a lot :-),

@ccordoba12 this would be a new option that would require restarting spyder, right, also we would need to define the env variable before the app starts, right?

Yes, this needs a new option, and we also need to allow setting the resolution for multiple screens, i.e. not only a single number but multiple ones separated by ; (this is described in the Qt5 blog post I mentioned above).

So my idea is to create a new section in Preferences > General > Appearance like this

....

           Screen resolution

( ) Autoscale resolution for High DPI screens
( ) Define a custom scale factor [______]

           Interface
....

Autoscale ... and Define ... must be radio buttons so that users can select one or the other but not both at the same time.

Then we can define the corresponding environment variable in spyder/app/start.py.

Note: We need to add to the Define ... option some help to tell users how to set it for multiple screens.

Ok, I will take this one :-)

Great!

One more remark on this: Two more things which I found which are affected (in addition to the panel move/close buttons, see screenshots):

  • the font of the Help tab which somehow seems to be separate from the other fonts. It is also much too small in my system

  • the inline plot output in the IPython console is also rendered too small. In addition, if you set the QT scale factor (which simply scales the matplotlib output), then this problem is not really adequately solved: The system should render the plot bitmap with twice the pixel size instead of rendering the same bitmap and scaling the pixels.

See screenshots for example (from the console window you can see what the correct size would be):

First one with QT_SCALE_FACTOR=1, second one with QT_SCALE_FACTOR=2

For both screenshots, the Ubuntu scale display value is at 1.5.
Enable high DPI scaling is off, but somehow that seems to make no difference on my system.

screenshot_qtfactor1
screenshot_qtfactor2

...and one more comment:

In Windows, strangely enough, the Help Window font seems to be OK, whereas all the other behaviour seems identical to Linux. (the same buttons are too small)

Possibly the "Spyder" Icon in the top left corner Window button is also too small, but maybe that is by design. It is much smaller than the Linux one though.

@juejung How do you set the QT_SCALE_FACTOR like you did? When I try to run the same command as you, it says that QT_SCALE_FACTOR is not an internal or external command. I figure I need to add it to my computer's environment variables somehow, but I'm not sure where to point it?

@rlaverde, please work on this one. My proposed solution is here

https://github.com/spyder-ide/spyder/issues/4316#issuecomment-291879519

and your solution has to take into account

https://github.com/spyder-ide/spyder/issues/4316#issuecomment-292474386

for the Help plugin.

@Elliptica1 I simply ran it from command line:
QT_SCALE_FACTOR=2.5 spyder
This then starts spyder with the high dpi scaling.

@juejung But what is your QT path in environmental variables? When I run the same code, I get 'QT_SCALE_FACTOR' is not recognized as an internal or external command,
I know that means it's not part of my path, but I'm not sure where QT is stored, I can't seem to find it. I have Anaconda and Spyder both working, but that command does not.

@Elliptica1 I don't recall having to set anything. On my system QT is already in the path. Maybe try something like this?
https://askubuntu.com/questions/435564/qt5-installation-and-path-configuration

I'm running spyder 3.1.4 on Ubuntu 17.04, ThinkPad P50s, 2880 x 1620 resolution. The suggestion from @ccordoba12 to run python using QT_SCALE_FACTOR=<preferred_scale_factor> spyder works great for me. I get the same results as @juejung. Thanks for posting this stuff.

@groundhogxc, you can rescale the help menu text in spyder 3.1.4 settings. Tools > Preferences > General > Rich Text Font
Here's an image that shows the setting and the help panel with the Rich Text Font set really high:
helpscaling

Thanks @bclinthall your comment gave me a clue of where to trace the error 😄

We just added a new option to set a custom scale factor to our 3.x and master branches. Those of you who have this problem, please test it and let us know if it solves it correctly.

Hi Guys,
I'm running on XPS 13 high DPI, Ubuntu 17.10, Anaconda custom (64-bit) distribution with Python 3.6.2 64bits, Qt 5.6.2, PyQt5 5.6 and Spyder Version: 3.2

Thanks for adding the: Set a custom high DPI scaling - option to Spyder 3.2

There are now 3 options available in the settings menu:
[1] Normal
[2] Enable auto high scaling
[3] Set custom high DPI scaling

alternatively we can run it from command line using:
[4] QT_SCALE_FACTOR=2.5 spyder

Running Spyder with [1] Normal, I get this:
image

Everything is very small.

Running Spyder with [2] Enable auto high scaling, I get this:
image
Everything is still small except for the toolbar which is now scaled up.

Running Spyder with [3] Set custom high DPI scaling set to 2.5 I get this
image
Still everything is small, except for the toolbar. The toolbar is a tad smaller than under [2]. I guess the automatic scaling is 3. Anyways, this is puzzling since I expected that everything would be scaled.

[4] Running Spyder from command line with: QT_SCALE_FACTOR=2.5 spyder
I get this:
image

Perfect outcome, everything is scaled up. I assumed that the newly added custom option [3] would produce this, but on my system it does not?

That is a bug, setting a custom high DPI scaling to 2.5 in the configurations, and running Spyder from command line with: QT_SCALE_FACTOR=2.5 should have the same effect.

@ccordoba12 I guess we need to add the environment setting, event before the qtpy imports 😕 what do you think?

I don't think so, we're already setting the env var before qtpy is imported.

Instead, it seems QT_SCALE_FACTOR and QT_SCREEN_SCALE_FACTORS (which is
the one we're using) give different effects. Please open a new issue
about this for 3.2.1, so we don't forget to address it.

El 28/07/17 a las 09:27, Rafael Laverde escribió:
>

That is a bug, setting a custom high DPI scaling to 2.5 in the
configurations, and running Spyder from command line with:
QT_SCALE_FACTOR=2.5 should have the same effect.

@ccordoba12 https://github.com/ccordoba12 I guess we need to add the
environment setting, event before the qtpy imports 😕 what do you think?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/spyder-ide/spyder/issues/4316#issuecomment-318666593,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAWS7S5vIjUUHeu8q-A9U1ZKFv4SKD0wks5sSe_egaJpZM4Mwg05.

@juejung Could you test if the fix proposed in #4846 works for you?

@rlaverde Yes, it works. Thank you.

@juejung Thank you for testing it 😄

@juejung hi, I'm new to spyder and I met the same issue. where am I supposed to add this command? type it in cmd ?
Ill be appreciated if you can give me full description how to do it :)

@simonsayshi This has been fixed in the newest version of Spyder. I would just upate with: conda update spyder

@juejung sorry....where should I type this command? run it in cmd?

oh I see, I typed it in the terminal but it showed

CondaIOError: Missing write permissions in: C:ProgramDataAnaconda3
#

You don't appear to have the necessary permissions to update packages

into the install area 'C:ProgramDataAnaconda3'.

However you can clone this environment into your home directory and

then make changes to it.

This may be done using the command:

#

$ conda create -n my_root --clone="C:ProgramDataAnaconda3"

how do I deal with it?

The new options in 3.2.3 for dealing with high res displays don't work for me. I had to reduce the resolution of my laptop to get the my plots look bigger (I can't resize the plots at this point in time). I'm running on Windows 10. I went to the link that is indicated on the preferences page, but its seems to be more for developers than users. Are there simple instructions to work with high res screens that say a casual user which doesn't know about command lines or jargon can follow?

The resolution of plots is handled in the IPython console options.
Please take a look at them.

El 09/01/18 a las 15:34, Herbert Sauro escribió:
>

The new options in 3.2.3 for dealing with high res displays don't work
for me. I had to reduce the resolution of my laptop to get the my
plots look bigger (I can't resize the plots at this point in time).
I'm running on Windows 10. I went to the link that is indicated on the
preferences page, but its seems to be more for developers than users.
Are there simple instructions to work with high res screens that say a
casual user which doesn't know about command lines or jargon can follow?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/spyder-ide/spyder/issues/4316#issuecomment-356405819,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAWS7aJgqmge70EVi1NcR6394VVmyLt1ks5tI81AgaJpZM4Mwg05.

I saw those and tried changing the width and height but it didn't make any difference. Perhaps they only apply to non-inline plots?

You have to change the resolution, but please open a new issue about it.
I think there's an option to set HiDPI for inline plots.

El 09/01/18 a las 17:52, Herbert Sauro escribió:
>

I saw those and tried changing the width and height but it didn't make
any difference. Perhaps they only apply to non-inline plots?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/spyder-ide/spyder/issues/4316#issuecomment-356440619,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAWS7S6ZhD4fQntS6u6v9WDeGnYrLgs_ks5tI-2ZgaJpZM4Mwg05.

I set resolution to 300dpi (and to 48dpi) and increased width and height but no change. I also switched between normal, auto and set custom high DPI in the General->Appearance tab and no difference. If there is nothing else to try I'll open an issue.

Yep, there's nothing else to try. Please open the issue.

El 09/01/18 a las 17:59, Herbert Sauro escribió:
>

I set resolution to 300dpi (and to 48dpi) and increased width and
height but no change. I also switched between normal, auto and set
custom high DPI in the General->Appearance tab and no difference. If
there is nothing else to try I'll open an issue.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/spyder-ide/spyder/issues/4316#issuecomment-356442356,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAWS7e0qYypEtvbgc7KkLFhFE_w6ZpFpks5tI-9jgaJpZM4Mwg05.

One other thing, at high resolution I tend to increase the font size but this makes the code completion window in the editor not wide enough to fit the options (see attached image). From the IPython console the code completion window is wide enough. I didn't see an option to widen the completion window or drag it wider with the mouse.

codecompletion

There's no option to increase that size. Please open a different issue
for that.

El 09/01/18 a las 18:10, Herbert Sauro escribió:
>

One other thing, at high resolution I tend to increase the font size
but this makes the code completion window in the editor not wide
enough to fit the options (see attached image). From the IPython
console the code completion window is wide enough. I didn't see an
option to widen the completion window or drag it wider with the mouse.

codecompletion
https://user-images.githubusercontent.com/1054990/34747947-35ce0596-f54f-11e7-9ea2-a639d9a830ee.png

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/spyder-ide/spyder/issues/4316#issuecomment-356444674,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAWS7TlX-1bxdANG6z5DcU42oyG8cAphks5tI_IAgaJpZM4Mwg05.

With reference to the small matplotlib image on high res screens, in the process of creating a small example to include with the issue, it turns out it was the application I was using that must have the problem because a small example such as

import pylab
pylab.plot ([1,2,3,4],[6,7,4,5])

does change the size of the inline plot to changing the width and height under IPython preferences. The only thing I found is that you must restart spyder to have the settings apply. I will report this to the application developers of the tool I was using. This does not appear to be a problem with spyder.

Oh, that's a Spyder problem. We should inform users when a change in an
option in the IPython console requires a restart, not of Spyder but of
the console kernel.

El 09/01/18 a las 18:26, Herbert Sauro escribió:
>

With reference to the small matplotlib image on high res screens, in
the process of creating a small example to include with the issue, it
turns out it was the application I was using that must have the
problem because a small example such as

import pylab
pylab.plot ([1,2,3,4],[6,7,4,5])

does change the size of the inline plot to changing the width and
height under IPython preferences. The only thing I found is that you
must restart spyder to have the settings apply. I will report this to
the application developers of the tool I was using. This does not
appear to be a problem with spyder.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/spyder-ide/spyder/issues/4316#issuecomment-356447818,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAWS7R43dOU7UpKGg1osqNnjoTko2Ib2ks5tI_WygaJpZM4Mwg05.

You're right a kernel restart is sufficient for the setting to be recognized.

I used to use this thread to make Spyder look bigger/readable (right now it's minuscule) on a high resolution screen. I would do

set QT_SCALE_FACTOR=2.5
spyder

It used to work fine. Now, however, it does nothing. I've tried putting it on one line, but if I do that, nothing happens. How can I increase the scale factor now? I'm using Spyder 3.3.1.

(I went ahead and updated to Spyder 3.3.3. Same problem)

If I manually set it in preferences, then automated tabs no longer work (e.g if I hit enter from a line indented 8 spaces, the cursor now starts at 0 spaces instead of 8)

I'm having the same issue with the newest version of Spyder. Adjusting the QT_SCALE_FACTOR does nothing. The text is grotesquely large. Any help? I'm running this on Windows 10.

SpyderTexttooLarge

I also ran into this issue, but was able to fix it by following the advice of this person on Stack Overflow: https://stackoverflow.com/a/48141311/11627783
Would love it if this could be somehow integrated into Spyder! Very annoying.

Was this page helpful?
0 / 5 - 0 ratings