mirror of
https://github.com/wled/WLED.git
synced 2025-07-19 08:46:34 +00:00
minor improvements
This commit is contained in:
parent
3e7cc8a0a0
commit
32af17317c
@ -758,10 +758,14 @@ input[type=range]::-moz-range-thumb {
|
||||
margin: 4px 0 0;
|
||||
}
|
||||
|
||||
/* Dynamically hide brightness slider label */
|
||||
/* Dynamically hide labels */
|
||||
.hd {
|
||||
display: var(--bhd);
|
||||
}
|
||||
/* Do not hide labels when in simplified mode */
|
||||
.simplified .hd {
|
||||
display: var(--bhd) !important;
|
||||
}
|
||||
|
||||
#briwrap {
|
||||
min-width: 300px;
|
||||
@ -1325,6 +1329,14 @@ TD .checkmark, TD .radiomark {
|
||||
top: calc(var(--sti) + 42px);
|
||||
}
|
||||
|
||||
#pallist.simplified {
|
||||
height: 300px;
|
||||
overflow: scroll;
|
||||
/* Fix shadow */
|
||||
margin: 0px -16px;
|
||||
padding: 0px 16px;
|
||||
}
|
||||
|
||||
#pallist.simplified .lstI.selected {
|
||||
top: 42px;
|
||||
}
|
||||
|
@ -3027,13 +3027,14 @@ function simplifyUI() {
|
||||
|
||||
// Put effects below palett list
|
||||
gId("Colors").innerHTML += gId("Effects").innerHTML;
|
||||
gId("modeLabel").classList.remove("hd");
|
||||
gId("fx").classList.add("simplified");
|
||||
// Put segments before palette list if there are multiple segments
|
||||
if (lastinfo.leds.seglc.length > 1) {
|
||||
gId("Colors").insertBefore(gId("segcont"), gId("pall"));
|
||||
}
|
||||
// Put preset quick load before palette list and segemts
|
||||
gId("Colors").insertBefore(gId("pql"), gId("pall"));
|
||||
gId("pql").classList.add("simplified");
|
||||
|
||||
// Create dropdown for palette list
|
||||
let div = document.createElement("div");
|
||||
@ -3047,6 +3048,11 @@ function simplifyUI() {
|
||||
btn.innerText = "Change palette";
|
||||
btn.addEventListener("click", () => {
|
||||
div.classList.toggle("hide");
|
||||
if (div.classList.contains("hide")) {
|
||||
btn.innerText = "Change palette";
|
||||
} else {
|
||||
btn.innerText = "Hide palettes";
|
||||
}
|
||||
});
|
||||
gId("palw").prepend(div);
|
||||
gId("palw").prepend(btn);
|
||||
@ -3066,13 +3072,7 @@ function simplifyUI() {
|
||||
gId("Segments").style.display = "none";
|
||||
gId("Presets").style.display = "none";
|
||||
|
||||
// Chage height of palette list
|
||||
gId("pallist").style.height = "300px";
|
||||
gId("pallist").style.overflow = "scroll";
|
||||
// Fix shadow
|
||||
gId("pallist").style.margin = "0px -16px";
|
||||
gId("pallist").style.padding = "0px 16px";
|
||||
// Set correct position of selected and sticky palette
|
||||
// Simplify palette list
|
||||
gId("pallist").classList.add("simplified");
|
||||
// We only want Effect Search to stay on top
|
||||
gId("palw").firstElementChild.classList.remove("staytop");
|
||||
|
Loading…
x
Reference in New Issue
Block a user