fix: Incorrectly calculating rest-pane width

This commit is contained in:
SiriusXT 2025-05-18 20:19:30 +08:00
parent 9682253ced
commit 0d09a7558f

View File

@ -23,7 +23,7 @@ function setupLeftPaneResizer(leftPaneVisible: boolean) {
// Window resizing causes `window.innerWidth` to change, so `reservedWidth` needs to be recalculated each time.
const reservedWidth = reservedPx / window.innerWidth * 100;
if (!leftPaneVisible) {
$("#rest-pane").css("width", layoutOrientation === "vertical" ? `${(100 - reservedWidth) * 100}%` : "100%");
$("#rest-pane").css("width", layoutOrientation === "vertical" ? `${100 - reservedWidth}%` : "100%");
return;
}