Fix bug where if Big Picture mode was set as default layout switching layouts would look weird

This commit is contained in:
Speng Reb 2026-05-21 13:00:36 +02:00
parent 4d61a68e8b
commit 25d4be7aae

View file

@ -1773,6 +1773,9 @@ function clearTVMessageFadeTimer($msg) {
function detectCurrentLayoutName() { function detectCurrentLayoutName() {
var body = $("body"); var body = $("body");
if (body.hasClass("compact")) {
return "compact";
}
if (body.hasClass("hd")) { if (body.hasClass("hd")) {
return "hd"; return "hd";
} }
@ -1797,6 +1800,9 @@ function backToNormalLayout(event) {
if (!nextLayout || nextLayout === "tv") { if (!nextLayout || nextLayout === "tv") {
nextLayout = USEROPTS.layout; nextLayout = USEROPTS.layout;
} }
if (nextLayout === "default" && USEROPTS.layout === "tv") {
nextLayout = "fluid";
}
if (!nextLayout || nextLayout === "tv") { if (!nextLayout || nextLayout === "tv") {
nextLayout = "fluid"; nextLayout = "fluid";
} }
@ -1820,6 +1826,9 @@ function backToNormalLayout(event) {
case "hd": case "hd":
hdLayout(); hdLayout();
break; break;
case "compact":
compactLayout();
break;
default: default:
compactLayout(); compactLayout();
break; break;