Simple CSS bugfix.

This commit is contained in:
Blaz Kristan 2021-08-12 12:12:45 +02:00
parent 28f12a4874
commit 3640f977c8
5 changed files with 1798 additions and 1795 deletions

View File

@ -989,7 +989,7 @@ function updatePA(scrollto=false)
if (currentPreset > 0) { if (currentPreset > 0) {
var acv = gId(`p${currentPreset}o`); var acv = gId(`p${currentPreset}o`);
if (acv && !expanded[currentPreset+100]) { if (acv && !expanded[currentPreset+100]) {
acv.classList.add('selected');; acv.classList.add('selected');
if (scrollto) { if (scrollto) {
// scroll selected preset into view (on WS refresh) // scroll selected preset into view (on WS refresh)
acv.scrollIntoView({ acv.scrollIntoView({
@ -999,7 +999,7 @@ function updatePA(scrollto=false)
} }
} }
acv = gId(`p${currentPreset}qlb`); acv = gId(`p${currentPreset}qlb`);
if (acv) acv.classList.add('selected');; if (acv) acv.classList.add('selected');
} }
} }

View File

@ -604,6 +604,10 @@ input[type=number]::-webkit-outer-spin-button {
min-height: 24px; min-height: 24px;
} }
.selected { /* has to be after .lstI */
background: var(--c-5);
}
.lstI:hover { .lstI:hover {
background: var(--c-4); background: var(--c-4);
} }
@ -614,10 +618,6 @@ input[type=number]::-webkit-outer-spin-button {
padding-bottom: 10px; padding-bottom: 10px;
} }
*/ */
.lstI.selected {
background: var(--c-5);
}
.lstIcontent { .lstIcontent {
width: 100%; width: 100%;
vertical-align: middle; vertical-align: middle;

View File

@ -24,7 +24,7 @@
<button id="buttonNodes" onclick="toggleNodes()"><i class="icons">&#xe22d;</i><p class="tab-label">Nodes</p></button></div> <button id="buttonNodes" onclick="toggleNodes()"><i class="icons">&#xe22d;</i><p class="tab-label">Nodes</p></button></div>
<button onclick="window.location.href='/settings';"><i class="icons">&#xe0a2;</i><p class="tab-label">Config</p></button> <button onclick="window.location.href='/settings';"><i class="icons">&#xe0a2;</i><p class="tab-label">Config</p></button>
<button id="buttonCP" onclick="tglCP()"><i class="icons">&#xe2b3;</i><p class="tab-label">Expand</p></button> <button id="buttonCP" onclick="tglCP()"><i class="icons">&#xe2b3;</i><p class="tab-label">Expand</p></button>
<button id="buttonBri" onclick="tglBri()"><i class="icons">&#xe2a6;</i><p class="tab-label">Global</p></button> <button id="buttonBri" onclick="tglBri()"><i class="icons">&#xe2a6;</i><p class="tab-label">Brightness</p></button>
</div> </div>
<div id="briwrap"> <div id="briwrap">
<p class="labels hd">Global brightness</p> <p class="labels hd">Global brightness</p>

View File

@ -446,7 +446,7 @@ function populatePresets()
if (qll) pQL.push([i, qll, pName(i)]); if (qll) pQL.push([i, qll, pName(i)]);
is.push(i); is.push(i);
cn += `<div class="lstI c" id="p${i}o" onclick="setPreset(${i})">`; cn += `<div class="lstI c pres" id="p${i}o" onclick="setPreset(${i})">`;
//if (cfg.comp.pid) cn += `<div class="pid">${i}</div>`; //if (cfg.comp.pid) cn += `<div class="pid">${i}</div>`;
cn += `${isPlaylist(i)?"<i class='icons btn-icon'>&#xe139;</i>":""}<span class="lstIname">${pName(i)}</span></div>`; cn += `${isPlaylist(i)?"<i class='icons btn-icon'>&#xe139;</i>":""}<span class="lstIname">${pName(i)}</span></div>`;
pNum++; pNum++;
@ -785,17 +785,19 @@ function toggleBubble(e)
function updatePA(scrollto=false) function updatePA(scrollto=false)
{ {
var ps = gEBCN("psts"); // quick load var ps = gEBCN("pres");
for (let i = 0; i < ps.length; i++) { for (let i = 0; i < ps.length; i++) {
ps[i].style.backgroundColor = "var(--c-2)"; ps[i].classList.remove('selected');;
}
ps = gEBCN("psts");
for (let i = 0; i < ps.length; i++) {
ps[i].classList.remove('selected');;
} }
if (currentPreset > 0) { if (currentPreset > 0) {
var acv = gId(`p${currentPreset}o`); var acv = gId(`p${currentPreset}o`);
if (acv) { if (acv) acv.classList.add('selected');
acv.style.background = "var(--c-6)";
}
acv = gId(`p${currentPreset}qlb`); acv = gId(`p${currentPreset}qlb`);
if (acv) acv.style.background = "var(--c-6)"; if (acv) acv.classList.add('selected');
} }
} }

File diff suppressed because it is too large Load Diff