Remove hideD class to use hide class instead

This commit is contained in:
Woody 2023-11-30 13:41:58 +01:00
parent bd620a764d
commit fa5648c0c3
No known key found for this signature in database
GPG Key ID: 9872D7F5072789B2
2 changed files with 5 additions and 17 deletions

View File

@ -1334,7 +1334,7 @@ TD .checkmark, TD .radiomark {
top: calc(var(--sti) + 42px);
}
.dialog:not(.hideD)::before {
.dialog:not(.hide)::before {
position: fixed;
top: 0;
left: 0;
@ -1360,19 +1360,7 @@ TD .checkmark, TD .radiomark {
box-shadow: 4px 4px 10px 4px var(--c-1);
}
.hideD {
top: -9999999999px;
}
#pallist.simplified {
overflow: scroll;
height: 500px;
/* Fix shadow */
margin: 0px -16px;
padding: 0px 16px 0px 16px;
}
#pallist.simplified .lstI.selected {
#pallist .lstI.sticky {
top: 42px;
}

View File

@ -2275,7 +2275,7 @@ function setPalette(paletteId = null)
}
if (simplifiedUI) {
gId("palw").lastChild.classList.toggle("hideD");
gId("palw").lastChild.classList.toggle("hide");
}
var obj = {"seg": {"pal": paletteId}};
@ -3050,13 +3050,13 @@ function simplifyUI() {
while (gId("palw").firstChild) {
div.appendChild(gId("palw").firstChild);
}
div.classList.add("hideD", "dialog");
div.classList.add("hide", "dialog");
let btn = document.createElement("button");
btn.classList.add("btn");
btn.innerText = "Change palette";
let togglePal = (e) => {
if (e.target != btn && e.target != div) return
gId("palw").lastChild.classList.toggle("hideD");
gId("palw").lastChild.classList.toggle("hide");
};
btn.addEventListener("click", togglePal);
div.addEventListener("click", togglePal);