Make high contrast and draggable toolbar items mutually exclusive.
This commit is contained in:
parent
bd68d31773
commit
64d2ae84fa
|
@ -50,7 +50,7 @@ body {
|
|||
display: block;
|
||||
top: 0;
|
||||
padding: 0;
|
||||
text-align: left;
|
||||
align-items: center;
|
||||
line-height: 1em;
|
||||
position: relative;
|
||||
}
|
||||
|
|
|
@ -101,6 +101,7 @@ addEventListener("unload", e => {
|
|||
}
|
||||
|
||||
await include("/ui/toolbar.js");
|
||||
UI.toolbarInit();
|
||||
{
|
||||
let handlers = {
|
||||
"options": e => {
|
||||
|
|
|
@ -18,7 +18,10 @@
|
|||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
{
|
||||
UI.toolbarInit = () => {
|
||||
if (UI.toolbarInit.done || UI.highContrast || UI.local.highContrast)
|
||||
return;
|
||||
UI.toolbarInit.done = true;
|
||||
let toolbar = document.getElementById("top");
|
||||
let spacer = toolbar.querySelector(".spacer");
|
||||
let hider = toolbar.querySelector(".hider");
|
||||
|
|
|
@ -222,6 +222,7 @@ var UI = (() => {
|
|||
},
|
||||
async toggle() {
|
||||
let hc = "highContrast" in UI ? UI.highContrast : await this.detect();
|
||||
if (UI.toolbarInit) UI.toolbarInit();
|
||||
if (hc) {
|
||||
if (this.css) {
|
||||
document.documentElement.appendChild(this.css);
|
||||
|
|
Loading…
Reference in New Issue