Re-factor the loading-icons used in the viewer toolbars

Currently the SVG images for the loading-icons exist in two versions, for the light- respectively dark-theme, which nowadays are the only "duplicated" icons left.
The reason for this is that these icons are being used in `input`-elements, where the regular `mask-image` approach used for all buttons don't work.

To address this we add containers for the `input`-elements, such that we have a "regular" DOM-element where we can use `mask-image`.
This commit is contained in:
Jonas Jenwald 2023-11-16 14:24:16 +01:00
parent 086a5921dc
commit 625d4f794e
4 changed files with 56 additions and 64 deletions

View file

@ -22,8 +22,6 @@ import {
toggleCheckedBtn,
} from "./ui_utils.js";
const PAGE_NUMBER_LOADING_INDICATOR = "visiblePageIsLoading";
/**
* @typedef {Object} ToolbarOptions
* @property {HTMLDivElement} container - Container for the secondary toolbar.
@ -300,7 +298,7 @@ class Toolbar {
updateLoadingIndicatorState(loading = false) {
const { pageNumber } = this.items;
pageNumber.classList.toggle(PAGE_NUMBER_LOADING_INDICATOR, loading);
pageNumber.classList.toggle("loading", loading);
}
}