Merge pull request #13764 from nextcloud/design/text-preview-size

Reduce text size of text file preview, fix #13720
This commit is contained in:
Roeland Jago Douma 2019-01-23 17:01:46 +01:00 committed by GitHub
commit 2767139ca9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -60,8 +60,9 @@ class TXT extends Provider {
$lines = preg_split("/\r\n|\n|\r/", $content);
$fontSize = $maxX ? (int) ((5 / 32) * $maxX) : 5; //5px
$lineSize = ceil($fontSize * 1.25);
// Define text size of text file preview
$fontSize = $maxX ? (int) ((2 / 32) * $maxX) : 5; //5px
$lineSize = ceil($fontSize * 1.5);
$image = imagecreate($maxX, $maxY);
imagecolorallocate($image, 255, 255, 255);