make preview a bit smaller than screen width
authorBartek Przybylski <bart.p.pl@gmail.com>
Thu, 12 Jul 2012 20:26:33 +0000 (22:26 +0200)
committerBartek Przybylski <bart.p.pl@gmail.com>
Thu, 12 Jul 2012 20:26:33 +0000 (22:26 +0200)
src/eu/alefzero/owncloud/ui/fragment/FileDetailFragment.java

index bbc2473..c94719e 100644 (file)
@@ -879,7 +879,7 @@ public class FileDetailFragment extends SherlockFragment implements
                 Log.e("ASD", "W " + width + " SW " + screenwidth);\r
 \r
                 if (width > screenwidth) {\r
-                    scale = (int) Math.ceil((Math.ceil(Math.max(height, width) / screenwidth)));\r
+                    scale = (int) Math.ceil((float)width / screenwidth);\r
                     options.inSampleSize = scale;\r
                 }\r
 \r