From 6d3ff74e67c83b3c4ef9a8aaf3d12b78a96b5b54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Mon, 30 Dec 2019 20:50:24 +0100 Subject: [PATCH] Adjust text preview size MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- apps/files/src/views/Sidebar.vue | 1 + lib/private/Preview/TXT.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/files/src/views/Sidebar.vue b/apps/files/src/views/Sidebar.vue index e5908cd3ab..1733ae56f1 100644 --- a/apps/files/src/views/Sidebar.vue +++ b/apps/files/src/views/Sidebar.vue @@ -382,6 +382,7 @@ export default { #app-sidebar { &.has-preview::v-deep .app-sidebar-header__figure { background-size: cover; + background-position: top; } } diff --git a/lib/private/Preview/TXT.php b/lib/private/Preview/TXT.php index 06f60457af..123d124049 100644 --- a/lib/private/Preview/TXT.php +++ b/lib/private/Preview/TXT.php @@ -68,7 +68,7 @@ class TXT extends ProviderV2 { $lines = preg_split("/\r\n|\n|\r/", $content); // Define text size of text file preview - $fontSize = $maxX ? (int) ((2 / 32) * $maxX) : 5; //5px + $fontSize = 80; $lineSize = ceil($fontSize * 1.5); $image = imagecreate($maxX, $maxY);