Use img tag instead of background-image for custom icon to avoid flickering

This commit is contained in:
Johannes Zellner
2019-09-26 21:12:11 +02:00
parent 17771ccecd
commit 4518c2c4c0
2 changed files with 12 additions and 2 deletions

View File

@@ -328,7 +328,8 @@
<div>
<label class="control-label">Icon</label>
</div>
<div id="previewIcon" class="app-custom-icon" ng-click="display.showCustomIconSelector()" style="background-image: url('{{ display.iconUrl() }}');">
<div id="previewIcon" class="app-custom-icon" ng-click="display.showCustomIconSelector()">
<img ng-src="{{ display.iconUrl() || 'img/appicon_fallback.png' }}" fallback-icon="img/appicon_fallback.png" onerror="imageErrorHandler(this)"/>
<div class="overlay"></div>
</div>
<a href="" style="font-weight: normal;" ng-click="display.resetCustomIcon()">Reset Icon</a>