[Pkg-owncloud-commits] [owncloud] 13/58: Determine the size we need before asking for a thumbnail We need to set the size of the preview using the devicePixelRatio and use that as arguments when using the preview endpoint or that endpoint will use the default 36x36 and thumbnails will be blurry on high DPI devices

David Prévot taffit at moszumanska.debian.org
Tue Aug 11 15:58:04 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag v8.0.6
in repository owncloud.

commit a20487907bd1922ade6b9533745c70d468ca193e
Author: Olivier Paroz <github at oparoz.com>
Date:   Fri Jun 12 18:50:21 2015 +0200

    Determine the size we need before asking for a thumbnail
    We need to set the size of the preview using the devicePixelRatio and use that as arguments when using the preview endpoint or that endpoint will use the default 36x36 and thumbnails will be blurry on high DPI devices
---
 apps/files_sharing/js/public.js | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js
index bec43a4..19f31aa 100644
--- a/apps/files_sharing/js/public.js
+++ b/apps/files_sharing/js/public.js
@@ -147,6 +147,8 @@ OCA.Sharing.PublicApp = {
 
 			this.fileList.generatePreviewUrl = function (urlSpec) {
 				urlSpec.t = $('#dirToken').val();
+				urlSpec.y = 36 * window.devicePixelRatio;
+				urlSpec.x = 36 * window.devicePixelRatio;
 				return OC.generateUrl('/apps/files_sharing/ajax/publicpreview.php?') + $.param(urlSpec);
 			};
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list