From 0d4f5d38c30cb0c489d721080e09a4d8116a6dbd Mon Sep 17 00:00:00 2001 From: Bartek Przybylski Date: Thu, 12 Jul 2012 22:26:33 +0200 Subject: [PATCH] make preview a bit smaller than screen width --- src/eu/alefzero/owncloud/ui/fragment/FileDetailFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/eu/alefzero/owncloud/ui/fragment/FileDetailFragment.java b/src/eu/alefzero/owncloud/ui/fragment/FileDetailFragment.java index bbc2473e..c94719ee 100644 --- a/src/eu/alefzero/owncloud/ui/fragment/FileDetailFragment.java +++ b/src/eu/alefzero/owncloud/ui/fragment/FileDetailFragment.java @@ -879,7 +879,7 @@ public class FileDetailFragment extends SherlockFragment implements Log.e("ASD", "W " + width + " SW " + screenwidth); if (width > screenwidth) { - scale = (int) Math.ceil((Math.ceil(Math.max(height, width) / screenwidth))); + scale = (int) Math.ceil((float)width / screenwidth); options.inSampleSize = scale; } -- 2.11.0