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

Fixed-width columns do not scale with Font DPI settings #1420

Closed
lazka opened this Issue Mar 15, 2015 · 11 comments

Comments

Projects
None yet
1 participant
@lazka
Member

lazka commented Mar 15, 2015

Original issue 1420 created by tamiko@43-1.org on 2014-07-06T11:14:07.000Z:

Some columns in quodlibet have a fixed width (such as Length, Rating, Track, Disc, etc.). This width seems to be calculated from the font's point size assuming a fixed DPI value of 96.

Unfortunately this completely clutters up the view when using quodlibet on a high dpi display with DPI values of 160 and more.

Steps to Reproduce:

  • Temporarily set DPI to a high value
  • restart quodlibet

The root of the issue seems to be the use of _label.get_pixel_size()[0] in quodlibet/qltk/songlist.py:

new_width = self._label.get_pixel_size()[0] + pad + cell_pad

Manually multiplying this line with an appropriate factor temporarily fixes the problem, so is suspect that get_pixel_size does not take the correct dpi value into account.

The rest of the interface scales nicely!

@lazka

This comment has been minimized.

Member

lazka commented Mar 15, 2015

Comment #1 originally posted by reiter.christoph on 2014-07-06T12:01:58.000Z:

Thanks.

  1. Which QL version is this? (and which desktop environment?)
  2. To be clear, the columns are too narrow for the content?
  3. How do you change the DPI btw, there is a "scale factor" in gnome-tweak-tool, not sure if that is the same thing you do..?
@lazka

This comment has been minimized.

Member

lazka commented Mar 15, 2015

Comment #2 originally posted by tamiko@43-1.org on 2014-07-06T12:27:45.000Z:

1/ This is quodlibet 3.1.1 running under KDE 4.12.5

2/ Yes, the columns are to narrow for the content.

3/ I change the DPI settings via the Xft.dpi value in Xresources (and additionally in the KDE systemsettings menu).

The setting for gnome is nowadays called "font-scaling-factor" and - if I recall correctly - shouldn't do significantly more than setting the correct Xft.dpi value in xresources (same for KDE).

Note that the DPI value set for the X server is still 96 DPI.

@lazka

This comment has been minimized.

Member

lazka commented Mar 15, 2015

Comment #3 originally posted by s@kazlauskas.me on 2014-07-06T12:35:47.000Z:

Can’t reproduce by setting dpi option for xorg via xrandr --dpi 320x320 (needs application restart to kick in). Icons don’t get scaled, but length column is scaled just fine here.

@lazka

This comment has been minimized.

Member

lazka commented Mar 15, 2015

Comment #4 originally posted by reiter.christoph on 2014-07-06T13:14:18.000Z:

Thanks, the gnome things changes Xft.dpi yes.

I can't reproduce with 3.1 (get_pixel_size() should return the right value), I'll try under KDE.

@lazka

This comment has been minimized.

Member

lazka commented Mar 15, 2015

Comment #5 originally posted by reiter.christoph on 2014-07-06T14:36:42.000Z:

This is what I get with 160, http://f.666kb.com/i/cpu73kcb2o9mfcqw8.png

looks ok to me (except some icons missing, not sure what's going on there)

@lazka

This comment has been minimized.

Member

lazka commented Mar 15, 2015

Comment #6 originally posted by tamiko@43-1.org on 2014-07-06T14:42:22.000Z:

Am 06. Jul 2014, 16:36 schrieb quodlibet@googlecode.com:

Well, the title heading "Track" is clearly cropped. Same goes for
"Length" in your screenshot.

If you enable something like "Rating" and have set 5 or 6 stars also the
contents get cropped.

@lazka

This comment has been minimized.

Member

lazka commented Mar 15, 2015

Comment #7 originally posted by tamiko@43-1.org on 2014-07-06T15:13:51.000Z:

Now, I have access to the laptop again. Here, is a small screenshot how it looks like on my machine [1]. The upper image shows a crop coming from quodlibet 3.1.1, the lower image results from the hack mentioned above (the column widths are still a bit off, but this is roughly the sizes I would have expected)

[1] http://666kb.com/i/cpu7z9qrd7oh9a2il.jpg

@lazka

This comment has been minimized.

Member

lazka commented Mar 15, 2015

Comment #8 originally posted by reiter.christoph on 2014-07-06T15:17:21.000Z:

True, but since the titles can be of arbitrary length (+ translations, say Titlenummer) there is no nice way. I'd also argue that the content is more important.

In current trunk there are tooltips for showing the whole title.

Ratings should work if you restart.

@lazka

This comment has been minimized.

Member

lazka commented Mar 15, 2015

Comment #9 originally posted by tamiko@43-1.org on 2014-07-06T15:53:18.000Z:

OK.

The point is still that the default width does not scale with the xft dpi setting.
As a last example, please have a look at [2] and [3]. The first crop is at a setting of 96 for Xft.dpi, the second at 220 (which is more or less the true dpi value of my screen). [3] is a full screenshot.

I would expect the default width to scale with the DPI setting in this case, so that the headings get always cropped exactly at the same character.

[2] http://666kb.com/i/cpu8qw9svwdj89rnh.jpg
[3] http://666kb.com/i/cpu93e3qsveu288ql.jpg

@lazka

This comment has been minimized.

Member

lazka commented Mar 15, 2015

Comment #10 originally posted by reiter.christoph on 2014-07-06T17:00:01.000Z:

I see. I can get something similar if I change the dpi while QL is running.

@lazka

This comment has been minimized.

Member

lazka commented Mar 15, 2015

Comment #11 originally posted by reiter.christoph on 2014-07-07T18:07:04.000Z:

fyi, I've just added HiDPI support in revision ac2e92c http://f.666kb.com/i/cpvcx4gh84sxdtb1q.png

with a newer cairo/gtk etc you can start QL with GDK_SCALE=2 to scale everything up by 2.

..doesn't fix this bug of course.

@lazka lazka removed the priority-normal label Mar 15, 2015

@lazka lazka removed the confirmed label Apr 22, 2015

@lazka lazka closed this in ee95bcd Jul 26, 2016

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