From 69751fcd69fb4d215ef6ebf3f07e65e514ad2ba7 Mon Sep 17 00:00:00 2001 From: Philipp Memmel Date: Thu, 19 Sep 2024 09:14:01 +0200 Subject: [PATCH] MDL-81450 mod_forum: Reduce size of file icon in HTML mails @Co-authored-by: Mateusz Walczak --- mod/forum/lib.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/mod/forum/lib.php b/mod/forum/lib.php index 72af47cda4d2b..ff9485ef4b461 100644 --- a/mod/forum/lib.php +++ b/mod/forum/lib.php @@ -2581,7 +2581,14 @@ function forum_print_attachments($post, $cm, $type) { foreach ($files as $file) { $filename = $file->get_filename(); $mimetype = $file->get_mimetype(); - $iconimage = $OUTPUT->pix_icon(file_file_icon($file), get_mimetype_description($file), 'moodle', array('class' => 'icon')); + $iconimage = $OUTPUT->pix_icon(file_file_icon($file), + get_mimetype_description($file), + 'moodle', + [ + 'class' => 'icon', + 'style' => 'max-width: 24px; max-height: 24px; vertical-align: middle;', + ] + ); $path = file_encode_url($CFG->wwwroot.'/pluginfile.php', '/'.$context->id.'/mod_forum/attachment/'.$post->id.'/'.$filename); if ($type == 'html') {