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 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"))
|
||||||
|
@ -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))
|
||||||
|
@ -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%');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user