mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-10 10:22:29 +08:00
fix(client): add new tab not working in horizontal layout
This commit is contained in:
parent
f62e860b61
commit
13a997beb0
@ -88,8 +88,11 @@ export default class Component {
|
||||
|
||||
if (fun) {
|
||||
return this.callMethod(fun, data);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
if (!this.parent) {
|
||||
throw new Error(`Component "${this.componentId}" does not have a parent attached to propagate a command.`);
|
||||
}
|
||||
|
||||
return this.parent.triggerCommand(name, data);
|
||||
}
|
||||
}
|
||||
|
@ -94,13 +94,13 @@ export default class DesktopLayout {
|
||||
|
||||
const launcherPaneIsHorizontal = true;
|
||||
const launcherPane = this.#buildLauncherPane(launcherPaneIsHorizontal);
|
||||
const tabBar = new TabRowWidget();
|
||||
|
||||
return new RootContainer()
|
||||
.setParent(appContext)
|
||||
.optChild(launcherPaneIsHorizontal, new FlexContainer('row')
|
||||
.child(tabBar.class("full-width"))
|
||||
.optChild(launcherPaneIsHorizontal, new FlexContainer('row')
|
||||
.child(new TabRowWidget().class("full-width"))
|
||||
.css('height', '40px')
|
||||
.setParent(appContext)
|
||||
)
|
||||
.optChild(launcherPaneIsHorizontal, launcherPane)
|
||||
.child(new FlexContainer('row')
|
||||
@ -115,7 +115,7 @@ export default class DesktopLayout {
|
||||
.id('rest-pane')
|
||||
.css("flex-grow", "1")
|
||||
.optChild(!launcherPaneIsHorizontal, new FlexContainer('row')
|
||||
.child(tabBar)
|
||||
.child(new TabRowWidget())
|
||||
.child(new TitleBarButtonsWidget())
|
||||
.css('height', '40px')
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user