Fix for rotating tablet into PC mode.

This commit is contained in:
Blaz Kristan 2024-05-02 10:31:50 +02:00
parent d2984e9e16
commit 736a8b1b80

View File

@ -3062,11 +3062,11 @@ function togglePcMode(fromB = false)
if (fromB) { if (fromB) {
pcModeA = !pcModeA; pcModeA = !pcModeA;
localStorage.setItem('pcm', pcModeA); localStorage.setItem('pcm', pcModeA);
openTab(0, true);
} }
pcMode = (wW >= 1024) && pcModeA; pcMode = (wW >= 1024) && pcModeA;
if (cpick) cpick.resize(pcMode && wW>1023 && wW<1250 ? 230 : 260); // for tablet in landscape if (cpick) cpick.resize(pcMode && wW>1023 && wW<1250 ? 230 : 260); // for tablet in landscape
if (!fromB && ((wW < 1024 && lastw < 1024) || (wW >= 1024 && lastw >= 1024))) return; // no change in size and called from size() if (!fromB && ((wW < 1024 && lastw < 1024) || (wW >= 1024 && lastw >= 1024))) return; // no change in size and called from size()
if (pcMode) openTab(0, true);
gId('buttonPcm').className = (pcMode) ? "active":""; gId('buttonPcm').className = (pcMode) ? "active":"";
gId('bot').style.height = (pcMode && !cfg.comp.pcmbot) ? "0":"auto"; gId('bot').style.height = (pcMode && !cfg.comp.pcmbot) ? "0":"auto";
sCol('--bh', gId('bot').clientHeight + "px"); sCol('--bh', gId('bot').clientHeight + "px");