Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spyder IDE GUI elements don't reset scaling with View->Window Layouts->Reset to Spyder default #19571

Open
WEB-FMA opened this issue Sep 23, 2022 · 10 comments

Comments

@WEB-FMA
Copy link

WEB-FMA commented Sep 23, 2022

Problem Description

I just upgraded Laptop to a model with 14" screen and an 4k panel.
My external Monitor is a 24" model with 1080p panel.
After unplugging the monitors HDMI cable (while running Spyder on the monitor)
the Spyder IDE application window jumped back to the internal display and
the scaling of the GUI elements (pane borders, text in the status bar) where
grotesquely enlarged. (screenshot attached)
The text itself is correctly scaled, for example in the coding pane, but the way too big GUI elements make
the whole IDE unusable.
This behaviour stayed, no restart changes the scaling. (regardless of which monitor spyder now runs on)

Screenshot 2022-09-23 144040

As I understand it, this problem should be fixable by using the reset of the pane layout:
View->Window Layouts->Reset to Spyder default

But using this function correctly resets the spacing between the panes but leaves the scaling of the GUI untouched.
I found several older questions where this was mentioned as the solution to scaling problems, so I assume this
is a bug worth reporting.

What steps reproduce the problem?

  1. Working on 1080p monitor
  2. disconnecting 1080p monitor so that windows 10 sends the application to the internal 4k display
  3. trying to reset the layout to no avail

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

Expected output would be a GUI resetting back to factory default, like when first installed
Instead GUI elements don't change back and stay much too big, regardless of which screen spyder uses

Versions

  • Spyder version: 5.4.0.dev0 (pip)
  • Python version: 3.10.5 64-bit
  • Qt version: 5.15.2
  • PyQt5 version: 5.15.6
  • Operating System: Windows 10

note: installed with Winpython64-3.10.5.0

Dependencies

Mandatory:

atomicwrites >=1.2.0 : 1.4.0 (OK)
chardet >=2.0.0 : 3.0.4 (OK)
cloudpickle >=0.5.0 : 2.1.0 (OK)
cookiecutter >=1.6.0 : 2.1.1 (OK)
diff_match_patch >=20181111 : 20200713 (OK)
intervaltree >=3.0.2 : 3.0.2 (OK)
IPython >=7.31.1;<8.0.0 : 7.32.0 (OK)
jedi >=0.17.2;<0.19.0 : 0.18.1 (OK)
jellyfish >=0.7 : 0.9.0 (OK)
jsonschema >=3.2.0 : 4.6.2 (OK)
keyring >=17.0.0 : 23.5.0 (OK)
nbconvert >=4.0 : 6.5.0 (OK)
numpydoc >=0.6.0 : 1.3 (OK)
paramiko >=2.4.0 : 2.8.0 (OK)
parso >=0.7.0;<0.9.0 : 0.8.3 (OK)
pexpect >=4.4.0 : 4.8.0 (OK)
pickleshare >=0.4 : 0.7.5 (OK)
psutil >=5.3 : 5.9.0 (OK)
pygments >=2.0 : 2.11.2 (OK)
pylint >=2.5.0;<3.0 : 2.14.0 (OK)
pyls_spyder >=0.4.0 : 0.4.0 (OK)
pylsp >=1.4.1;<1.5.0 : 1.4.1 (OK)
pylsp_black >=1.2.0 : 1.2.1 (OK)
qdarkstyle >=3.0.2;<3.1.0 : 3.0.3 (OK)
qstylizer >=0.1.10 : 0.2.1 (OK)
qtawesome >=1.0.2 : 1.1.1 (OK)
qtconsole >=5.3.0;<5.4.0 : 5.3.1 (OK)
qtpy >=2.1.0 : 2.2.0.dev0 (OK)
rtree >=0.9.7 : 1.0.0 (OK)
setuptools >=49.6.0 : 63.1.0 (OK)
sphinx >=0.6.6 : 5.0.2 (OK)
spyder_kernels >=2.3.1;<2.4.0 : 2.3.2 (OK)
textdistance >=4.2.0 : 4.2.2 (OK)
three_merge >=0.1.1 : 0.1.1 (OK)
watchdog >=0.10.3 : 2.1.8 (OK)
zmq >=22.1.0 : 23.2.0 (OK)

Optional:

cython >=0.21 : 0.29.30 (OK)
matplotlib >=3.0.0 : 3.5.2 (OK)
numpy >=1.7 : 1.22.4 (OK)
pandas >=1.1.1 : 1.4.3 (OK)
scipy >=0.17.0 : 1.8.1 (OK)
sympy >=0.7.3 : 1.10.1 (OK)

@WEB-FMA
Copy link
Author

WEB-FMA commented Sep 23, 2022

I just managed to fix the GUI again.
Following a hunch I disconnected the 1080p external monitor again and started Spyder with just
the 4k laptop screen. This resulted in Spyder starting with correctly scaled GUI elements, and they stayed correct
once I reattached the external monitor dragged the spyder application window to the external screen.

So at least I know a workaround now, but I think it would still be preferable if the dedicated reset option would fix this issue as well.

@dalthviz
Copy link
Member

Hi @WEB-FMA could you check if some of the options at Preferences > Application > Interface > Screen resolution like Enable auto high DPI scaling help?

Let us know!

@WEB-FMA
Copy link
Author

WEB-FMA commented Sep 29, 2022

Hi @dalthviz I tried all three different settings under ""Configuration for high DPI screens", all I was able to do was making the UI elements even bigger when I forced a custom high DPI scaling (as the value can't be set below 1, and everything above scales up).

The bug stemmed from Spyder already starting upscaled, or at least it appeared that way to me.
I'm used to spyder misaligning panels and scaling when the external monitor gets disconnected, my normal approach here is
to snap the application window fullscreen to the monitor I'm working on. Then Spyder resets itself correctly, sometimes panes get a little jumbled up but this is fixable in the worst case by resetting the window layout to default (normally it's not that bad).

With the bug I described this approach didn't help, that's why I wrote the bug report.

Once I was able to fix the layout again with the workaround I described in my second post, I did not have the problem I
described again. If I am able to recreate the behaviour again I will post it here.

@dalthviz
Copy link
Member

Thanks for the details @WEB-FMA ! And yes please, If you have any other info that let us understand better this is greatly appreciated 👍

@cbarron100
Copy link

I have the same issue with the scaling. Up until now I have followed what you have written in the comments and the scaling remains incorrect, despite the screen I use the IDE on. This has happened before but, I was always able to solve it by going to preferances.

@bramson
Copy link

bramson commented Feb 13, 2024

I have this same scaling problem on my new setup with Windows 11 and Spyder 5.5.1.

The computer is a laptop with a 4K screen set at 225% upscaling. The Main monitor is 4k set at 100% scaling.
The text in the editor and console are correct, but all the tabs and the address bar and everything in the preferences UI are about 3 times (maybe 2.25 times) bigger than they should be. The spacing of the drop-down menus is also about 3 times taller than normal (even though the font there is correct). I tried all the options in preferences, and nothing helped.

I do not have this problem on my old setup: a laptop 1440p at 150% and the same 4K main monitor at 100% using Spyder v5.4.1 on Windows 10.

@ccordoba12
Copy link
Member

Hey @bramson, thanks for letting us know that this is still a problem. Could you download and install our latest Windows application for Spyder 6.0 alpha4?

That application is completely independent from Anaconda/Miniconda, so it won't interfere with them. I'd like to know if this problem is solved in it because we've done several improvements to the way we handle fonts in that version.

@bramson
Copy link

bramson commented Feb 21, 2024

I installed the Windows package from your link, and I confirmed that it does not have the scaling problem.
(It did start in Japanese, which took me a while to fix, but the scaling looks fine.)

I then installed v6.0.a4 through conda inside my mini forge environment.
And running it from my Python console gave me no problems.
It even kept the preferences I set after from running it from the Windows install package (which is a nice bonus).

Thank you for your hard work. For me, v6 closes this issue.

@ccordoba12
Copy link
Member

That's fantastic news! Thanks for letting us know about it @bramson.

@bramson
Copy link

bramson commented Mar 2, 2024

....but I spoke too soon.
First, even before, when it was mostly fixed, the fonts in linting pop-ups were still huge...but I usually turn those off so it didn't bother me.

Windows 11 just updated itself, and I don't know if that was the cause, but now when I open Spyder 6 the same way I did yesterday, the entire interface is scaled incorrectly...specifically, everything is about 2 times larger than it should be., but not inside the editor. This is not the same as v5.4 when the elements affected were inconsistent. Now it is a consistent enlargement. I tried variations of the high DPI scaling and none had any effect.

And now, if I start Spyder without the external monitor attached, and then attach it, and move Spyder to it, the scaling is inconsistently correct. Fonts and icons are now the correct size (even in the linting pop-ups!), but the spacing is 1.5 or 2 times too big. It's fully usable in this state, but the layout is less efficient and less attractive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants