spyder-ide / spyder

Official repository for Spyder - The Scientific Python Development Environment
https://www.spyder-ide.org
MIT License
8.21k stars 1.59k forks source link

Outline pane resizes itself after expanding/contracting other panes #10651

Open eafpres opened 4 years ago

eafpres commented 4 years ago

Problem Description

Resizing some panes larger then smaller causes other panes to resize in unwanted ways

What steps reproduce the problem?

Running Spyder4 launched from miniconda shell
Environment is Windows 10

As seen in the first image below, I have the Outline pane on the left of the code pane
If I resize, for example, the plot window (2nd image below), then resize back (3rd image below) the Outline pane resizes to a wider size and I must manually resize it.

image

image

image

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

image

Versions

Spyder 4.0.0b5
Python 3.6.9 64-bit
Qt 5.13.1
PyQt5 5.13.1
Windows 10

Dependencies

cloudpickle >=0.5.0          :  1.2.2 (OK)
pygments >=2.0               :  2.4.2 (OK)
qtconsole >=4.5.5            :  4.5.5 (OK)
nbconvert >=4.0              :  5.6.0 (OK)
sphinx >=0.6.6               :  2.2.0 (OK)
pylint >=0.25                :  2.3.1 (OK)
psutil >=0.3                 :  5.6.3 (OK)
qtawesome >=0.5.7            :  0.6.0 (OK)
qtpy >=1.5.0                 :  1.9.0 (OK)
pickleshare >=0.4            :  0.7.5 (OK)
zmq >=17                     :  18.1.0 (OK)
chardet >=2.0.0              :  3.0.4 (OK)
numpydoc >=0.6.0             :  0.9.1 (OK)
spyder_kernels >=1.5.0;<2.0.0:  1.5.0 (OK)
qdarkstyle >=2.7             :  2.7 (OK)
atomicwrites >=1.2.0         :  1.3.0 (OK)
diff_match_patch >=20181111  :  20181111 (OK)
watchdog                     :  None (OK)
keyring                      :  None (OK)
pexpect >=4.4.0              :  4.7.0 (OK)
pympler                      :  None (OK)
sympy >=0.7.3                :  None (NOK)
cython >=0.21                :  None (NOK)
IPython >=4.0                :  7.8.0 (OK)
matplotlib >=2.0.0           :  3.1.1 (OK)
pandas >=0.13.1              :  0.25.2 (OK)
numpy >=1.7                  :  1.16.5 (OK)
scipy >=0.17.0               :  1.3.1 (OK)
pyls >=0.28.2;<0.29.0        :  0.28.3 (OK)
rtree >=0.8.3                :  0.8.3 (OK)
bcolsen commented 4 years ago

I can can replicate this on Linux. With the same layout.

I think this might just be the way Qt handles this resizing in this case.

ccordoba12 commented 4 years ago

@goanpeca, do you think there's something we can do about this?

goanpeca commented 4 years ago

@goanpeca, do you think there's something we can do something about this?

I would need yo investigate. We might have to add specific logic to the outline explorer pane so that resizing works differently.

This is just the way Qt works so more that a bug this is a feature request.

The default for qt is to stretch panes proportionally so when reducing the pane it will do it until it reaches the minimum width and when expanding it will do it prooportionally from that min width

goanpeca commented 4 years ago

I guess we could ser the resizing mode for panes in this case we don’t want to have resizing of outline at all, unless the user specifically resizes that pane.

https://doc.qt.io/qt-5/qsizepolicy.html#Policy-enum