make preview a bit smaller than screen width
[pub/Android/ownCloud.git] / 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