From 000e04349f520f3d268512d265ef7a503481e15a Mon Sep 17 00:00:00 2001 From: geireann Date: Wed, 19 Jul 2023 11:48:36 -0400 Subject: got rid of Ctrl-O to open a new tab maximised. added style prop for header bar when tab is maximised. --- src/client/views/GlobalKeyHandler.ts | 4 ---- src/client/views/MainView.tsx | 1 - src/client/views/PropertiesView.tsx | 1 - .../views/collections/CollectionDockingView.scss | 4 ++++ .../views/collections/CollectionDockingView.tsx | 22 ---------------------- src/client/views/collections/TabDocView.tsx | 1 - src/client/views/nodes/DocumentView.tsx | 1 - 7 files changed, 4 insertions(+), 30 deletions(-) (limited to 'src') diff --git a/src/client/views/GlobalKeyHandler.ts b/src/client/views/GlobalKeyHandler.ts index 347c40c18..4c04fbad5 100644 --- a/src/client/views/GlobalKeyHandler.ts +++ b/src/client/views/GlobalKeyHandler.ts @@ -277,10 +277,6 @@ export class KeyManager { case 'p': Doc.ActiveTool = InkTool.Pen; break; - case 'o': - const target = SelectionManager.Docs().lastElement(); - target && CollectionDockingView.OpenFullScreen(target); - break; case 'r': preventDefault = false; break; diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx index efd8206bf..5ab8a2f55 100644 --- a/src/client/views/MainView.tsx +++ b/src/client/views/MainView.tsx @@ -704,7 +704,6 @@ export class MainView extends React.Component { // prettier-ignore switch (whereFields[0]) { case OpenWhere.lightbox: return LightboxView.AddDocTab(doc, location); - case OpenWhere.fullScreen: return CollectionDockingView.OpenFullScreen(doc); case OpenWhere.close: return CollectionDockingView.CloseSplit(doc, whereMods); case OpenWhere.toggle: return CollectionDockingView.ToggleSplit(doc, whereMods); case OpenWhere.add:default:return CollectionDockingView.AddSplit(doc, whereMods, undefined, undefined, keyValue); diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx index cb0663554..a6a99b3cc 100644 --- a/src/client/views/PropertiesView.tsx +++ b/src/client/views/PropertiesView.tsx @@ -1534,7 +1534,6 @@ export class PropertiesView extends React.Component { - diff --git a/src/client/views/collections/CollectionDockingView.scss b/src/client/views/collections/CollectionDockingView.scss index 4c15d5eed..06f23faa3 100644 --- a/src/client/views/collections/CollectionDockingView.scss +++ b/src/client/views/collections/CollectionDockingView.scss @@ -95,6 +95,10 @@ position: relative; } +.lm_maximised .lm_header { + background-color: #000000; +} + .lm_stack { position: relative; } diff --git a/src/client/views/collections/CollectionDockingView.tsx b/src/client/views/collections/CollectionDockingView.tsx index 8d1b46ebb..16982595d 100644 --- a/src/client/views/collections/CollectionDockingView.tsx +++ b/src/client/views/collections/CollectionDockingView.tsx @@ -126,28 +126,6 @@ export class CollectionDockingView extends CollectionSubView() { return false; } - @undoBatch - public static OpenFullScreen(doc: Doc) { - SelectionManager.DeselectAll(); - const instance = CollectionDockingView.Instance; - if (instance) { - if (doc._type_collection === CollectionViewType.Docking && doc.layout_fieldKey === 'layout') { - return DashboardView.openDashboard(doc); - } - const newItemStackConfig = { - type: 'stack', - content: [CollectionDockingView.makeDocumentConfig(Doc.MakeEmbedding(doc))], - }; - const docconfig = instance._goldenLayout.root.layoutManager.createContentItem(newItemStackConfig, instance._goldenLayout); - instance._goldenLayout.root.contentItems[0].addChild(docconfig); - docconfig.callDownwards('_$init'); - instance._goldenLayout._$maximiseItem(docconfig); - instance._goldenLayout.emit('stateChanged'); - instance.stateChanged(); - } - return true; - } - @undoBatch @action public static ReplaceTab(document: Doc, panelName: OpenWhereMod, stack: any, addToSplit?: boolean, keyValue?: boolean): boolean { diff --git a/src/client/views/collections/TabDocView.tsx b/src/client/views/collections/TabDocView.tsx index b9f13b188..67b7b39dd 100644 --- a/src/client/views/collections/TabDocView.tsx +++ b/src/client/views/collections/TabDocView.tsx @@ -377,7 +377,6 @@ export class TabDocView extends React.Component { } } return LightboxView.AddDocTab(doc, location); - case OpenWhere.fullScreen: return CollectionDockingView.OpenFullScreen(doc); case OpenWhere.close: return CollectionDockingView.CloseSplit(doc, whereMods); case OpenWhere.replace: return CollectionDockingView.ReplaceTab(doc, whereMods, this.stack, undefined, keyValue); case OpenWhere.toggle: return CollectionDockingView.ToggleSplit(doc, whereMods, this.stack, undefined, keyValue); diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx index 91390e488..38922cb24 100644 --- a/src/client/views/nodes/DocumentView.tsx +++ b/src/client/views/nodes/DocumentView.tsx @@ -70,7 +70,6 @@ export enum OpenWhere { addRight = 'add:right', addBottom = 'add:bottom', close = 'close', - fullScreen = 'fullScreen', toggle = 'toggle', toggleRight = 'toggle:right', replace = 'replace', -- cgit v1.2.3-70-g09d2