From 5087e5781ebbfdc1f5006484c037c9b01affc50b Mon Sep 17 00:00:00 2001 From: Func Date: Mon, 13 Dec 2021 09:45:38 +0000 Subject: [PATCH] Use svg for the logo if applicable Improve the appearance of the logo for High-DPI users. Change-Id: I2b6e6f2c28eafddd6f958acca84eaec0d000f1c4 --- includes/TimelessTemplate.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/includes/TimelessTemplate.php b/includes/TimelessTemplate.php index 95059b8..43b691d 100644 --- a/includes/TimelessTemplate.php +++ b/includes/TimelessTemplate.php @@ -531,11 +531,13 @@ class TimelessTemplate extends BaseTemplate { } if ( $part !== 'text' ) { $logoImage = $this->getLogoImage( $config->get( 'TimelessLogo' ) ); - if ( $logoImage === false && isset( $logos['icon'] ) ) { - $logoSrc = $logos['icon']; - $logoImage = Html::element( 'img', [ - 'src' => $logoSrc, - ] ); + if ( $logoImage === false ) { + $logoSrc = $logos['svg'] ?: $logos['icon'] ?: ''; + if ( $logoSrc !== '' ) { + $logoImage = Html::element( 'img', [ + 'src' => $logoSrc, + ] ); + } } $html .= Html::rawElement(