mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 10:26:08 +01:00 
			
		
		
		
	fix(client): add new tab not working in horizontal layout
This commit is contained in:
		| @@ -88,8 +88,11 @@ export default class Component { | ||||
|  | ||||
|         if (fun) { | ||||
|             return this.callMethod(fun, data); | ||||
|         } else { | ||||
|             if (!this.parent) { | ||||
|                 throw new Error(`Component "${this.componentId}" does not have a parent attached to propagate a command.`); | ||||
|             } | ||||
|         else { | ||||
|  | ||||
|             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")) | ||||
|                 .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') | ||||
|                     ) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user