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

Feature request: Pls. restore content of font selection pull-down menu in prefs. back to version 5 quality #22683

Open
xaverm opened this issue Oct 16, 2024 · 3 comments

Comments

@xaverm
Copy link

xaverm commented Oct 16, 2024

Problem Description

Preferences->Appearance->Fonts provides a pull-down menu of fonts.
Version 5.x did show (i) a font preview and (ii) the font names did fit into the pull-down's menu display.
Version 6.0.1 does not show a preview and the font names are truncated (with no obvious way to resize the lists width).

It would be cool if for this particular functionality, version 5.x's behavior could be restored in some way.
Thx.

What steps reproduce the problem?

  1. Start spyder
  2. Click Preferences->Appearance->Fonts access the pull-down list

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

Expected output: See left of attached fig.
Seen instead: See right of attached fig.

Versions

  • Spyder version: 6.0.1
  • Python version: 3.9.20
  • Qt version: 5.15.8
  • PyQt version: 5.15.9
  • Operating System name/version: Linux

Dependencies

# Mandatory:
aiohttp >=3.9.3                  :  3.10.9 (OK)
asyncssh >=2.14.0,<3.0.0         :  2.17.0 (OK)
atomicwrites >=1.2.0             :  1.4.1 (OK)
chardet >=2.0.0                  :  5.2.0 (OK)
cloudpickle >=0.5.0              :  3.0.0 (OK)
cookiecutter >=1.6.0             :  2.6.0 (OK)
diff_match_patch >=20181111      :  20230430 (OK)
github >=2.3.0                   :  2.4.0 (OK)
importlib_metadata >=4.6.0       :  8.5.0 (OK)
intervaltree >=3.0.2             :  3.1.0 (OK)
IPython >=8.13.0,<9.0.0,!=8.17.1 :  8.18.1 (OK)
jedi >=0.17.2,<0.20.0            :  0.19.1 (OK)
jellyfish >=0.7                  :  1.1.0 (OK)
jsonschema >=3.2.0               :  4.23.0 (OK)
keyring >=17.0.0                 :  25.4.1 (OK)
nbconvert >=4.0                  :  7.16.4 (OK)
numpydoc >=0.6.0                 :  1.8.0 (OK)
parso >=0.7.0,<0.9.0             :  0.8.4 (OK)
pexpect >=4.4.0                  :  4.9.0 (OK)
pickleshare >=0.4                :  0.7.5 (OK)
psutil >=5.3                     :  6.0.0 (OK)
pygments >=2.0                   :  2.18.0 (OK)
pylint >=3.1,<4                  :  3.3.1 (OK)
pylint_venv >=3.0.2              :  3.0.3 (OK)
pyls_spyder >=0.4.0              :  0.4.0 (OK)
pylsp >=1.12.0,<1.13.0           :  1.12.0 (OK)
pylsp_black >=2.0.0,<3.0.0       :  2.0.0 (OK)
pyuca >=1.2                      :  1.2 (OK)
qdarkstyle >=3.2.0,<3.3.0        :  3.2.3 (OK)
qstylizer >=0.2.2                :  0.2.3 (OK)
qtawesome >=1.3.1,<1.4.0         :  1.3.1 (OK)
qtconsole >=5.6.0,<5.7.0         :  5.6.0 (OK)
qtpy >=2.4.0                     :  2.4.1 (OK)
rtree >=0.9.7                    :  1.3.0 (OK)
setuptools >=49.6.0              :  75.1.0 (OK)
sphinx >=0.6.6                   :  7.4.7 (OK)
spyder_kernels >=3.0.0,<3.1.0    :  3.0.0 (OK)
superqt >=0.6.2,<1.0.0           :  0.6.7 (OK)
textdistance >=4.2.0             :  4.6.2 (OK)
three_merge >=0.1.1              :  0.1.1 (OK)
watchdog >=0.10.3                :  5.0.3 (OK)
xdg >=0.26                       :  0.28 (OK)
yarl >=1.9.4                     :  1.14.0 (OK)
zmq >=24.0.0                     :  26.2.0 (OK)

# Optional:
cython >=0.21                    :  3.0.11 (OK)
matplotlib >=3.0.0               :  3.9.2 (OK)
numpy >=1.7                      :  1.26.4 (OK)
pandas >=1.1.1                   :  2.2.3 (OK)
scipy >=0.17.0                   :  1.13.1 (OK)
sympy >=0.7.3                    :  1.13.3 (OK)

fontselmenu

@dalthviz
Copy link
Member

Hi @xaverm thank you for the feedback! Indeed, that was something (kind of a regression in functionality) that we discussed while doing the changes to the combobox widgets at #21555.

I think over that PR we discussed an idea to have an interface font preview widget (#21555 (comment)). Do you think such an idea would cover the combobox not displaying directly a preview of the font for you?

Regarding the fonts name truncation, is there a way to disabled that when creating the combobox @ccordoba12 ? Or there was a reason to do the truncation? 🤔

@ccordoba12
Copy link
Member

ccordoba12 commented Oct 24, 2024

that was something (kind of a regression in functionality) that we discussed while doing the changes to the combobox widgets at #21555.

After some consideration, I think Qt actually allows to set the font of combobox items. So, it should be possible to get the previous behavior back.

I think over that PR we discussed an idea to have an interface font preview widget (#21555 (comment)). Do you think such an idea would cover the combobox not displaying directly a preview of the font for you?

But I agree with @dalthviz that this a much better option.

Regarding the fonts name truncation, is there a way to disabled that when creating the combobox @ccordoba12 ? Or there was a reason to do the truncation? 🤔

I don't know what's happening there. Perhaps we need to set the width using the max number of characters of all font names.

@ccordoba12 ccordoba12 added this to the v6.0.3 milestone Oct 24, 2024
@xaverm
Copy link
Author

xaverm commented Oct 24, 2024

I think over that PR we discussed an idea to have an interface font preview widget (#21555 (comment)). Do you think such an idea would cover the combobox not displaying directly a preview of the font for you?

Regarding the fonts name truncation, is there a way to disabled that when creating the combobox @ccordoba12 ? Or there was a reason to do the truncation? 🤔

Yes, agreed, this request had two points to it, i.e., (i) the missing font display and (ii) the truncation of names.

Regarding (i), I completely understand, that this part of the preferences does already have a "Preview" section. However, to get a font preview, now, one always has to actually select a font from the drop down list to 'see something'. This was not necessary with the fonts directly displayed in 5.x.
Your suggestion of having a preview widget which displays the font while hovering over it, without actually selecting it, as it seems in (#21555 (comment)) is certainly a solution. Wouldn't that be more complicated to realize than just displaying the fonts in the drop-down list? Also it would introduce an additional sub-window in this preference section. I wouldn't mind.
So, I guess you guys know much better which of the two options, i.e., "direct display" or "additional widget" is less of a hassle to implement. From a user perspective I think both would serve more or less the same purpose.

Regarding (ii), this font-name truncation can be really confusing. Moreover it may be that there is some weird dependence between the number of characters of the font-name displayed and the display resolution(?) I.e. using spyder 'on-the-go' on my laptop, I had the impression there was even more truncation and a substantial fraction of the font names could only be guessed. (But I have not verified this dependence.)

In summary, i.m.h.o. as a user, re-enabling full font-names would be of higher priority than re-enabling a font preview of some. But whatever you guys decide to do in the end - spyder remains my favorite!

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

3 participants