Bug 420657 - Allow 512+ px icon sizes
Summary: Allow 512+ px icon sizes
Status: RESOLVED NOT A BUG
Alias: None
Product: dolphin
Classification: Applications
Component: view-engine: general (show other bugs)
Version: unspecified
Platform: Debian stable Linux
: NOR wishlist
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-27 11:21 UTC by myndstream
Modified: 2020-05-08 13:55 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description myndstream 2020-04-27 11:21:01 UTC
SUMMARY
I'd like to configure a media center within dolphin. In particular I'd like to set up a movies folder which shows movie covers as folder icons, has large folder labels and is zoomed in so that the covers are large.

The best way for this would be to have directory-specific view settings and have a preconfigured folder view settings profile called "Movies" which automatically configures all those things dependent on some user variables such as display size. But these would be separate issues.

It's already possible to do most of these things in an improvised way by manually selecting folder-icons, disabling preview, selecting the icons mode, zooming in to the maximum and changing the font size for the icon mode under Configure Dolphin->View Modes->Icons->Label font->Custom->Size.

This is why the only remaining problem with this improvised solution is the maximum zoom level: the folder-icons (movie covers) aren't large enough at the maximum icon size.

This could be fixed in two ways:
- increasing the maximum zoom level and/or
- giving users the option to configure the maximum zoom level (or multiple options like a maximum zoom level for each view mode)

Currently the maximum zoom is 256px which was probably chosen due to icons not being larger than 256 pixels. But even icons of less than 256 px should display properly at a larger resolution. To prevent e.g. less tech-savvy users to configure the view-mode to look very bad it could be made an option or options.

STEPS TO REPRODUCE
1. Enter a folder which contains a folder that contains an image
2. Selecting the folder's image to be the folder's icon
3. Disable preview
4. Selecting the icons mode
5. Zoom in to the maximum

OBSERVED RESULT
Maximum zoom too small (subjective and depends on hardware)

EXPECTED RESULT
Maximum zoom should be larger or configurable

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 5.14.5
KDE Plasma Version: 5.14
KDE Frameworks Version: 5.54.0
Qt Version: 5.11.3

ADDITIONAL INFORMATION
I previously asked about this here:
https://unix.stackexchange.com/questions/581870/how-to-configure-per-directory-view-settings-in-kde-dolphin-for-a-media-center
and I will link to here from there.

I might be relevant that the "Zren" fork of dolphin has this:
> Added a few "View Modes" which will toggle "Preview"
> automatically, and "Zoom" to specific sizes which are
> familiar to Windows users.
> Huge Icons, Large Icons, and Tiled view mode presets.
https://github.com/Zren/dolphin
Comment 1 Christoph Feck 2020-04-27 15:42:38 UTC
The global scale factor affects font and thumbnail size.

Try:

QT_SCALE_FACTOR=2 dolphin
Comment 2 myndstream 2020-04-27 15:50:30 UTC
(In reply to Christoph Feck from comment #1)
> The global scale factor affects font and thumbnail size.
> 
> Try:
> 
> QT_SCALE_FACTOR=2 dolphin

Nice, that works! Thank you. This way one can simply create a shortcut via right click on KDE icon in bottom left -> Edit applications... with the Command set to e.g.:
QT_SCALE_FACTOR=2 dolphin ~/Movies

It would still be very useful to have this as an option.
Furthermore the space between the icons is too large.
Comment 3 Christoph Feck 2020-04-27 16:11:18 UTC
Change 'Label width'.
Comment 4 myndstream 2020-04-28 09:26:44 UTC
Thanks, but it only makes a difference when changing from "Huge" to "Large" but neither the space between the folders nor the widths of folders shrink any further when changing from "Large" to "Medium" to "Small".  
If the image chosen for the folder icon has portrait format the size dedicated to the folder is much larger than the folder-icon. Maybe there could be some space-saving view mode option which only dedicates as much width to the folder as the width of its icon. But that would probably be a separate issue/feature-idea.

It's looking quite neat despite the space between the folders being a bit too large. So I think the improvised solution (using the QT_SCALE_FACTOR variable in a command) to the improvised solution (manual arrangement without a view mode profile) could be considered resolved. But I think it would probably still be better if there was an option or options to change the maximum zoom level. It could also have many other uses and would be more easily findable and usable.
Comment 5 Christoph Feck 2020-04-28 09:51:32 UTC
Yes, we also bumped maximum thumbnail sizes to 512 for Gwenview (see https://phabricator.kde.org/D6083). I only wanted to offer a workaround until a higher scaling was supported for Dolphin.
Comment 6 Nate Graham 2020-04-28 13:06:50 UTC
The QT_SCALE_FACTOR environment variable is meant for automatically scaling apps (really the whole system) for high DPI screen setups. Are you using one such setup? Maybe the problem is that *everything* is too small...
Comment 7 myndstream 2020-04-28 14:41:41 UTC
(In reply to Nate Graham from comment #6)
> The QT_SCALE_FACTOR environment variable is meant for automatically scaling
> apps (really the whole system) for high DPI screen setups. Are you using one
> such setup? Maybe the problem is that *everything* is too small...

Yes, the display is fairly large and high-resolution. But the icon-sizes that can be configured are large enough. However, it would be better to have more gradient steps (like a gradient slider) between "Small" and "Large" in the Appearance option for icon-sizes. The default zoom in lots of apps is too small. But I wouldn't say that everything is too small - maybe that's due to the appearance changes though. I usually zoom in in lots of apps so that the icon-sizes of specific folders as described above is the only problem. I'm pretty sure I already tried changing the scaling setting under Displays and have undone this change because it looked bad or had some other problems. But I don't remember what the problems were and I'll try changing it again and see how it looks like after the next restart. I think it would be useful in any case to have larger maximum icon-sizes depending on the screen size/resolution.
Comment 8 Nate Graham 2020-04-28 22:20:12 UTC
It's not just about the icon sizes in Dolphin's main view; when using a high DPI screen, *everything* needs to grow or else it's too small. I would strongly recommend looking into display scaling in the System Settings Display Configuration page.
Comment 9 myndstream 2020-04-29 21:15:25 UTC
I changed the display scaling setting back again after restarting.

It just looked too bad and there were too many problems - the biggest of which was that the tabs in the bottom panel were too large and had a font-size that was much too large so that only very few open windows were shown there. Furthermore the text-size of many buttons was too large for the buttons, text and icons were unaligned in the left sidebar in dolphin and the space between icons on the desktop was too large. I think the resolution also wasn't as good and there were additional problems. So as of right now it imo works best to use large scaling settings (not even the largest setting with the exception of things like a media center folder) in apps like dolphin and in KDE appearance options and to zoom in where needed.

I guess there are *many* bugs to be resolved with this scaling if that's the way the UI is intended to be adapted to larger screens. I won't create bug reports for these as it probably needs more in-depth knowledge of the software and in-depth testing.

Could the status of this issue be changed back to "wishlist" as a very good near-term solution and a generally useful change would be to change the maximum zoom in dolphin (or to make it changeable) or, as the modified title of this issue says, to allow 512+ px icon sizes? Even if the display scaling worked flawlessly in practice that would be very useful.
Comment 10 Nate Graham 2020-04-29 21:20:20 UTC
Sorry no, we don't add code to work around our own bugs; we fix our own bugs instead! :) Please feel free to file bugs resulting from using a high DPI scale factor. But first, how did you change the scale factor? I hope you used the scaling system in the Display Configuration page rather than increasing the font size of the fonts DPI. The system presented in the Display Configuration page is the recommended way to do this.

I also notice you're using Debian stable so you're using software that's more than a year out of date. So it's quite likely that many of the bugs you're encountering have already been fixed in newer versions of Plasma and KDE apps that Debian hasn't shipped yet.
Comment 11 myndstream 2020-04-29 21:45:35 UTC
It wouldn't be a workaround but a generally useful change which only also would be (at least) a short-term solution to the problem described here. I changed the setting under Displays->Scale Display. The Label fonts of all three view modes are currently set to System Font.

I'm interested in what would be needed to make Debian (or rather by Debian to) ship newer KDE software.

I think the feature-requests I originally described and the one I submitted as a wishlist issue are all still relevant to the latest software and I won't report bugs related to the scaling. Imo the feature request would still be relevant even if all problems related to the scaling have been resolved. Maybe the reasons for why it's useful and its importance would change a bit. If I'm not misunderstanding something here larger maximum icon sizes would allow for better resolution than with scaling-only.
Comment 12 Nate Graham 2020-04-30 17:12:23 UTC
(In reply to myndstream from comment #11)
> It wouldn't be a workaround but a generally useful change which only also
> would be (at least) a short-term solution to the problem described here. I
> changed the setting under Displays->Scale Display. The Label fonts of all
> three view modes are currently set to System Font.
> 
> I'm interested in what would be needed to make Debian (or rather by Debian
> to) ship newer KDE software.
Nothing; that's just the way Debian works. If you want newer versions of KDE software, you'll need to wait for the next major Debian version, switch to Debian Testing, or switch to a different distro that ships more recent versions of KDE software.

> I won't report bugs related to the scaling.
Why not? That's how things get fixed.

> Imo the feature request would
> still be relevant even if all problems related to the scaling have been
> resolved. Maybe the reasons for why it's useful and its importance would
> change a bit. If I'm not misunderstanding something here larger maximum icon
> sizes would allow for better resolution than with scaling-only.
In principle I'm not against adding a 512 size. Unfortunately a technical blocker is the fact that the XDG thumbnail spec only goes up to 256px. So we would not actually have any 512px thumbnails to display for the new larger 512px icons. This is a thing that irritates me in other contexts too, but we need the XDG thumbnail spec to be updated first before we can consider 512px thumbnails.
Comment 13 Christoph Feck 2020-04-30 17:31:08 UTC
I am against saving 512 px icons. Since these are losslessly stored, they could end up larger than the original JPEG, defeating the purpose of the cache.

What I hoped for was that Dolphin simply scales the thumbnails (it does so, anyway, but only to scale them down), like we added for Gwenview.
Comment 14 myndstream 2020-05-06 10:59:34 UTC
(In reply to Nate Graham from comment #12)
> Nothing; that's just the way Debian works. If you want newer versions of KDE
> software, you'll need to wait for the next major Debian version, switch to
> Debian Testing, or switch to a different distro that ships more recent
> versions of KDE software.

I asked about it here: https://unix.stackexchange.com/questions/584892/what-would-be-needed-by-debian-to-ship-newer-versions-of-the-kde-desktop-environ

> Why not? That's how things get fixed.

There were just too many (many of which probably due to the same underlying issue) and apparently, as you wrote, they have already gotten fixed in newer versions. I think many of the bugs depend on what I configured in other display-settings and it would be easy to test and better to make sense of by people with knowledge of the code. Also I'd like to not use the scaling due to the bugs. For reporting bugs related to it I would need to use a newer version so I don't report bugs which have already been solved but I'd like to stay with Debian stable (hence the question linked above might also be relevant to this).

> In principle I'm not against adding a 512 size. Unfortunately a technical
> blocker is the fact that the XDG thumbnail spec only goes up to 256px. So we
> would not actually have any 512px thumbnails to display for the new larger
> 512px icons. This is a thing that irritates me in other contexts too, but we
> need the XDG thumbnail spec to be updated first before we can consider 512px
> thumbnails.

Okay, that's interesting. In that case the issue for that in XDG thumbnail spec should probably be linked in issues related to it. Do you have a link to the issue (I guess somebody created it already)?

(In reply to Christoph Feck from comment #13)
> I am against saving 512 px icons. Since these are losslessly stored, they
> could end up larger than the original JPEG, defeating the purpose of the
> cache.

Good point. But maybe, and as originally proposed, it could be made a per-directory view-option.  
Later there could also be some code that allows storing only a low-resolution thumbnail and quickly increasing the thumbnail resolution when the thumbnail is in or near the current field of view. After the view is closed the newly created cache created by the higher resolution thumbnails would get cleared again.

> What I hoped for was that Dolphin simply scales the thumbnails (it does so,
> anyway, but only to scale them down), like we added for Gwenview.

Imo that would be a good near-term / somewhat improvised solution. It would be an implementation of:
- increasing the maximum zoom level and/or
- giving users the option to configure the maximum zoom level (or multiple options like a maximum zoom level for each view mode)
with the maximum zoom level being larger than what the resolution offers. Because scaling/zooming above resolution-boundaries doesn't look well I'd opt for a view-option rather allowing it by-default.
Comment 15 myndstream 2020-05-08 13:55:03 UTC
I added some info on the scaling issues and workarounds to this Q&A: https://unix.stackexchange.com/q/585361/233262

I might edit the answer if I find more info on how to improve the scaling without having to scale the display or once this works flawlessly in the latest Debian stable. (You could also post an answer there if you have more info on scaling apps without changing the display scaling.)