Fix slideshow button icons in WebOS 4

This commit is contained in:
Dmitry Lyzo 2020-03-10 12:57:09 +03:00
parent e016836d3e
commit 13a03b6e2c

View File

@ -70,7 +70,7 @@ define(['dialogHelper', 'inputManager', 'connectionManager', 'layoutManager', 'f
var tabIndex = canFocus ? '' : ' tabindex="-1"'; var tabIndex = canFocus ? '' : ' tabindex="-1"';
autoFocus = autoFocus ? ' autofocus' : ''; autoFocus = autoFocus ? ' autofocus' : '';
return '<button is="paper-icon-button-light" class="autoSize ' + cssClass + '"' + tabIndex + autoFocus + '><i class="material-icons slideshowButtonIcon">' + icon + '</i></button>'; return '<button is="paper-icon-button-light" class="autoSize ' + cssClass + '"' + tabIndex + autoFocus + '><i class="material-icons slideshowButtonIcon ' + icon + '"></i></button>';
} }
function setUserScalable(scalable) { function setUserScalable(scalable) {
@ -201,14 +201,16 @@ define(['dialogHelper', 'inputManager', 'connectionManager', 'layoutManager', 'f
function onAutoplayStart() { function onAutoplayStart() {
var btnSlideshowPause = dlg.querySelector('.btnSlideshowPause i'); var btnSlideshowPause = dlg.querySelector('.btnSlideshowPause i');
if (btnSlideshowPause) { if (btnSlideshowPause) {
btnSlideshowPause.innerHTML = "pause"; btnSlideshowPause.classList.remove("play_arrow");
btnSlideshowPause.classList.add("pause");
} }
} }
function onAutoplayStop() { function onAutoplayStop() {
var btnSlideshowPause = dlg.querySelector('.btnSlideshowPause i'); var btnSlideshowPause = dlg.querySelector('.btnSlideshowPause i');
if (btnSlideshowPause) { if (btnSlideshowPause) {
btnSlideshowPause.innerHTML = "&#xE037;"; btnSlideshowPause.classList.remove("pause");
btnSlideshowPause.classList.add("play_arrow");
} }
} }
@ -365,8 +367,7 @@ define(['dialogHelper', 'inputManager', 'connectionManager', 'layoutManager', 'f
} }
function playPause() { function playPause() {
var paused = !dlg.querySelector('.btnSlideshowPause i').classList.contains("pause");
var paused = dlg.querySelector('.btnSlideshowPause i').innerHTML !== "pause";
if (paused) { if (paused) {
play(); play();
} else { } else {