From 058995a0b63317c6f7a3e47d3fbebee783a344c5 Mon Sep 17 00:00:00 2001 From: Woody Date: Wed, 6 Dec 2023 18:57:34 +0100 Subject: [PATCH] fix selected effect position --- wled00/data/index.css | 9 +++++---- wled00/data/index.js | 8 ++------ 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/wled00/data/index.css b/wled00/data/index.css index 539c96d02..eab6e335f 100644 --- a/wled00/data/index.css +++ b/wled00/data/index.css @@ -376,7 +376,7 @@ button { } /* Button margin for simplified UI */ -#fx .btn, #palw .btn { +.simplified #fx .btn, .simplified #palw .btn { margin-top: 0; } @@ -772,8 +772,8 @@ input[type=range]::-moz-range-thumb { .hd { display: var(--bhd); } -/* Do not hide labels when in simplified mode */ -.simplified .hd { +/* Do not hide labels in simplified mode on small screen widths */ +.simplified > .hd { display: var(--bhd) !important; } @@ -1299,7 +1299,8 @@ TD .checkmark, TD .radiomark { margin-top: 0; } -#segcont.simple .lstI { +/* Simplify segments */ +.simplified #segcont .lstI { margin-top: 4px; min-height: unset; } diff --git a/wled00/data/index.js b/wled00/data/index.js index 7e8ce84de..6d633a3da 100644 --- a/wled00/data/index.js +++ b/wled00/data/index.js @@ -1531,6 +1531,7 @@ function setEffectParameters(idx) // set the bottom position of selected effect (sticky) as the top of sliders div function setSelectedEffectPosition() { + if (simplifiedUI) return; let top = parseInt(getComputedStyle(gId("sliders")).height); top += 5; let sel = d.querySelector('#fxlist .selected'); @@ -3077,6 +3078,7 @@ function simplifyUI() { _C.style.width = '100%' _C.style.setProperty('--n', 1); + gId("Colors").classList.add("simplified"); // Put effects below palett list gId("Colors").append(gId("fx")); gId("Colors").append(gId("sliders")); @@ -3113,12 +3115,6 @@ function simplifyUI() { gId("Segments").style.display = "none"; gId("Presets").style.display = "none"; - // We only want Effect Search to stay on top - gId("palw").firstElementChild.classList.remove("staytop"); - - // Simplify segments - gId("segcont").classList.add("simple"); - // Hide filter options gId("filters").style.display = "none"; }