mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-11 11:02:27 +08:00
fix(mobile): vertical layout not sized properly
This commit is contained in:
parent
fbae0062af
commit
ba5371d76b
@ -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"))
|
||||
|
@ -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))
|
||||
|
@ -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%');
|
||||
|
Loading…
x
Reference in New Issue
Block a user