PreviewJob is not DPR aware, so scale up the preview asked.
BUG: 390488
ngraham | |
elvisangelaccio |
Dolphin |
PreviewJob is not DPR aware, so scale up the preview asked.
BUG: 390488
Before:
After:
No Linters Available |
No Unit Test Coverage |
Buildable 25493 | |
Build 25511: arc lint + arc unit |
When the size is smaller than KIconLoader::SizeEnormous it prevents to see a size difference between the preview size of a folder and the icon of a folder.
With D29002 the two always match in size.
Looks like this fixes https://bugs.kde.org/show_bug.cgi?id=408455!
Probably a candidate for the stable branch.
It does not, this one is about the main files view.
But the fix will be quite similar.
Probably a candidate for the stable branch.
Sure, done
Do we have a KF6 task for this to add support for dpr to this? Adding it to the PreviewJob should be straightforward, but we cannot really change the preview plug-ins class.
It does not, this one is about the main files view.
But the fix will be quite similar.
This approach is wrong though, for the main files view in particular. There's a difference between loading e.g. a 32px icon, and a 16px @2x scaling.
Doesn't really matter for the preview pane's large icon size but for the icon view it could have undesired side effects of using a non-symbolic icon when it should by symbolic, or having an icon with too small detail
Do you recommend me to abandon this then ?
I have tried to implement to add a setDevicePixelRatio to PreviewJob and in turn add it to the thumbnail ioslave and ThumbCreator.
I don't think we have to wait for KF6 for it, it won't break anything or at least we can implement it in a retro-compatible way.
But this requires some work.
Do you recommend me to abandon this then ?
I think in this particular instance is fine, but could lead to small text for text preview?
it won't break anything or at least we can implement it in a retro-compatible way.
If you have an idea how, sure. You can't add new virtuals to ThumbCreator class, though. Not too keen on having a V2, though.
I was thinking modifying the virtual bool create(const QString &path, int width, int height, QImage &img) adding it a devicePixelRatio qreal parameter.
I am not sure it will break this way.
So that may we need a KF6 task indeed.
I have a working branch of kio and kio-extras allowing to set a device Pixel Ratio.
It needs to solve the binary compatibility issue still around ThumbCreator API
kio patch: D29397