spyder-ide / spyder-terminal

Run system terminals inside Spyder. Works on Linux, macOS and Windows.
MIT License
227 stars 77 forks source link

Zoom level increases by 2x every time a Terminal is opened. #302

Closed mrclary closed 2 years ago

mrclary commented 2 years ago

Description of your problem

If zoom level is non-zero, zoom level is multiplied by factor of 2 every time a Terminal tab is opened.

What steps will reproduce the problem?

  1. Change zoom level (either in or out)
  2. Open a new Terminal tab
  3. Zoom level is enhanced by factor of two. This is also reflected in the plugins/terminal/spyder.ini file.

What is the expected output? What do you see instead? No change in zoom level when a new Terminal is opened

Please provide any additional information below It seems the offending code is widgets.terminalgui.TerminalWidget.apply_zoom and widgets.terminalgui.TermView.increase_font. Every time the zoom is applied, it calls increase_font a "zoom" number of times and increase_font updates the zoom configuration level. Hence, the zoom configuration is doubled.

This may be related to #301.

Versions and main components

steff456 commented 2 years ago

Hi @mrclary,

We decided to store the zoom in/out that the people does, so when they open new terminals they don't have to perform the action again. When I tried it in a big resolution screen, it helped a lot because you don't have to do 8 or 10 zooms every time a terminal is open.

I'm not sure if it will be helpful to indicate the level of zoom somewhere, or even to make this functionality optional in the preferences tab of the terminal. What do you think about that?

But I do see the bug in the zoom level, I'll update that in our next release.

mrclary commented 2 years ago

@steff456, thanks for your hard work on this plugin. I think it will be useful for me and many of my colleagues that use Spyder.

We decided to store the zoom in/out that the people does, so when they open new terminals they don't have to perform the action again. When I tried it in a big resolution screen, it helped a lot because you don't have to do 8 or 10 zooms every time a terminal is open.

For sure.

I'm not sure if it will be helpful to indicate the level of zoom somewhere, or even to make this functionality optional in the preferences tab of the terminal. What do you think about that?

That's a good idea, but it is not important to me to see the zoom level.

But I do see the bug in the zoom level, I'll update that in our next release.

That was my only concern at present.