fix(mobile): vertical layout not sized properly

This commit is contained in:
Elian Doran 2024-11-23 09:56:48 +02:00
parent fbae0062af
commit ba5371d76b
No known key found for this signature in database
3 changed files with 6 additions and 6 deletions

View File

@ -96,7 +96,7 @@ export default class DesktopLayout {
const launcherPaneIsHorizontal = (options.get("layoutOrientation") === "horizontal");
const launcherPane = this.#buildLauncherPane(launcherPaneIsHorizontal);
return new RootContainer()
return new RootContainer(launcherPaneIsHorizontal)
.setParent(appContext)
.optChild(launcherPaneIsHorizontal, new FlexContainer('row')
.child(new TabRowWidget().class("full-width"))

View File

@ -115,7 +115,7 @@ export default class MobileLayout {
getRootWidget(appContext) {
const launcherPaneIsHorizontal = (options.get("layoutOrientation") === "horizontal");
return new RootContainer()
return new RootContainer(launcherPaneIsHorizontal)
.setParent(appContext)
.cssBlock(MOBILE_CSS)
.child(this.#buildLauncherPane(launcherPaneIsHorizontal))
@ -178,13 +178,13 @@ export default class MobileLayout {
let launcherPane;
if (isHorizontal) {
launcherPane = new FlexContainer(isHorizontal ? "row" : "column")
launcherPane = new FlexContainer("row")
.class("horizontal")
.css("height", "53px")
.child(new LauncherContainer(true))
.child(new GlobalMenuWidget(true));
} else {
launcherPane = new FlexContainer(launcherPaneIsHorizontal ? "row" : "column")
launcherPane = new FlexContainer("column")
.class("vertical")
.css("width", "53px")
.child(new GlobalMenuWidget(false))

View File

@ -1,8 +1,8 @@
import FlexContainer from "./flex_container.js";
export default class RootContainer extends FlexContainer {
constructor() {
super('column');
constructor(isHorizontalLayout) {
super(isHorizontalLayout ? "column" : "row");
this.id('root-widget');
this.css('height', '100%');