Pane toolbar buttons are not sized properly
See original GitHub issueProblem Description
The icon size is scaled as expected, but not the tool buttons size. We thus end up with “big” tool buttons with small icons. Enabling or disabling auto high dpi scaling
does not change anything.
Paste Traceback/Error Below (if applicable)
I suspect that this due to the fact that we are setting the icon size for the panes with Qt, but are setting a fixed size for the toolbuttons in the stylesheet.
In MainWidgetToolbar.set_icon_size
, we are using the QToolbar.setIconSize
method to set the icon size of the toolbars. This effectively scale the icons as expected.
However, the size of the buttons remains unchanged because it is fixed in the stylesheet.
Versions
- Spyder version: 5.1.0.dev0 5648cfa74
- Python version: 3.7.6 64-bit
- Qt version: 5.12.5
- PyQt5 version: 5.12.3
- Operating System: Windows 10
Dependencies
Mandatory:
atomicwrites >=1.2.0 : 1.4.0 (OK) chardet >=2.0.0 : 3.0.4 (OK) cloudpickle >=0.5.0 : 1.5.0 (OK) cookiecutter >=1.6.0 : 1.7.2 (OK) diff_match_patch >=20181111 : 20200713 (OK) intervaltree >=3.0.2 : 3.0.2 (OK) IPython >=7.6.0 : 7.16.1 (OK) jedi =0.17.2 : 0.17.2 (OK) jsonschema >=3.2.0 : 3.2.0 (OK) keyring >=17.0.0 : 21.2.1 (OK) nbconvert >=4.0 : 5.6.1 (OK) numpydoc >=0.6.0 : 1.1.0 (OK) paramiko >=2.4.0 : 2.7.1 (OK) parso =0.7.0 : 0.7.0 (OK) pexpect >=4.4.0 : 4.8.0 (OK) pickleshare >=0.4 : 0.7.5 (OK) psutil >=5.3 : 5.7.2 (OK) pygments >=2.0 : 2.6.1 (OK) pylint >=1.0 : 2.5.3 (OK) pyls >=0.36.2;<1.0.0 : v5.0.0+75.g5648cfa74 (OK) pyls_black >=0.4.6 : 0.4.6 (OK) pyls_spyder >=0.3.2 : 0.3.2 (OK) qdarkstyle =3.0.2 : 3.0.dev (OK) qstylizer >=0.1.10 : 0.1.10 (OK) qtawesome >=1.0.2 : 1.1.0.dev0 (OK) qtconsole >=5.0.3 : 5.0.3 (OK) qtpy >=1.5.0 : 1.9.0 (OK) rtree >=0.8.3 : 0.9.4 (OK) setuptools >=39.0.0 : 49.6.0.post20210108 (OK) sphinx >=0.6.6 : 3.1.2 (OK) spyder_kernels >=2.0.1;<2.1.0 : 2.1.0.dev0 (OK) textdistance >=4.2.0 : 4.2.0 (OK) three_merge >=0.1.1 : 0.1.1 (OK) watchdog >=0.10.3;<2.0.0 : 0.10.3 (OK) zmq >=17 : 19.0.1 (OK)
Optional:
cython >=0.21 : 0.29.21 (OK) matplotlib >=2.0.0 : 3.2.1 (OK) numpy >=1.7 : 1.20.2 (OK) pandas >=1.1.1 : 1.1.4 (OK) scipy >=0.17.0 : 1.5.3 (OK) sympy >=0.7.3 : None (NOK)
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:11 (10 by maintainers)
Top GitHub Comments
You clearly put a lot of work and thoughts into this, this is really impressive.
I am willing to help adding a new option in the preferences that would allow users to make the toolbar of the panes more compact.
I used the “Find” and “Outline” panes to illustrate what I would like this option to do. What do you think?
Hi @jnsebgosselin thanks for the feedback! Pinging @ccordoba12 @juanis2112 @steff456 just in case