From ca9bdd28b028a1daa0dfce57d6b8eb91e95139cf Mon Sep 17 00:00:00 2001 From: Martin Vladic Date: Mon, 16 Dec 2024 13:00:29 +0100 Subject: [PATCH] #659 fix show/hide components palette --- packages/project-editor/project/project.tsx | 19 ------------------- .../project-editor/store/layout-models.tsx | 8 +++----- 2 files changed, 3 insertions(+), 24 deletions(-) diff --git a/packages/project-editor/project/project.tsx b/packages/project-editor/project/project.tsx index 19d34595..5097a6c0 100644 --- a/packages/project-editor/project/project.tsx +++ b/packages/project-editor/project/project.tsx @@ -2040,25 +2040,6 @@ export class Project extends EezObject { LayoutModels.PROPERTIES_TAB_ID, settingsController.showComponentsPaletteInProjectEditor ); - - // make sure Properties tab width is not 0 - const propertiesNode = this._store.layoutModels.rootEditor.getNodeById( - LayoutModels.PROPERTIES_TAB_ID - ); - if (propertiesNode) { - const rect = propertiesNode.getRect(); - if (rect.width == 0) { - const parent = propertiesNode.getParent(); - if (parent) { - this._store.layoutModels.rootEditor.doAction( - FlexLayout.Actions.updateNodeAttributes( - parent.getId(), - { width: 420 } - ) - ); - } - } - } } get missingExtensions() { diff --git a/packages/project-editor/store/layout-models.tsx b/packages/project-editor/store/layout-models.tsx index dcddc572..c0041f10 100644 --- a/packages/project-editor/store/layout-models.tsx +++ b/packages/project-editor/store/layout-models.tsx @@ -387,8 +387,7 @@ export class LayoutModels extends AbstractLayoutModels { children: [ { type: "row", - weight: 0, - width: 350, + weight: 15, children: [ { type: "tabset", @@ -433,7 +432,7 @@ export class LayoutModels extends AbstractLayoutModels { }, { type: "tabset", - weight: 100, + weight: 65, enableDeleteWhenEmpty: false, enableClose: false, id: LayoutModels.EDITOR_MODE_EDITORS_TABSET_ID, @@ -441,8 +440,7 @@ export class LayoutModels extends AbstractLayoutModels { }, { type: "row", - weight: 0, - width: 420, + weight: 20, children: [ { type: "tabset",