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 launcherPaneIsHorizontal = (options.get("layoutOrientation") === "horizontal");
const launcherPane = this.#buildLauncherPane(launcherPaneIsHorizontal); const launcherPane = this.#buildLauncherPane(launcherPaneIsHorizontal);
return new RootContainer() return new RootContainer(launcherPaneIsHorizontal)
.setParent(appContext) .setParent(appContext)
.optChild(launcherPaneIsHorizontal, new FlexContainer('row') .optChild(launcherPaneIsHorizontal, new FlexContainer('row')
.child(new TabRowWidget().class("full-width")) .child(new TabRowWidget().class("full-width"))

View File

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

View File

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