Adjust text preview size

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2019-12-30 20:50:24 +01:00
parent d4e75c8eca
commit 6d3ff74e67
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
2 changed files with 2 additions and 1 deletions

View File

@ -382,6 +382,7 @@ export default {
#app-sidebar {
&.has-preview::v-deep .app-sidebar-header__figure {
background-size: cover;
background-position: top;
}
}
</style>

View File

@ -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);